From boxbackup-dev@fluffy.co.uk  Wed Feb  1 07:59:58 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 08:59:58 +0100
Subject: [Box Backup-dev] makeparcels.pl - check for directory
Message-ID: <008c01c62705$7f244140$1601060a@cs>

Hi,

I have not taken any active part in development (yet) but I have
a suggestion for a very small change when generating the makefile.

Check for directory before it is created as indicated below.

Cheers,
Stefan

Index: infrastructure/makeparcels.pl
===================================================================
--- infrastructure/makeparcels.pl       (revision 354)
+++ infrastructure/makeparcels.pl       (working copy)
@@ -104,7 +104,7 @@
        print MAKE $target,":\n";

        my $dir = parcel_dir($parcel);
-       print MAKE "\tmkdir $dir\n";
+       print MAKE "\t[ -d $dir ] || mkdir $dir\n";

        open SCRIPT,">parcels/scripts/install-$parcel" or die "Can't open 
installer script for $parcel for writing";
        print SCRIPT "#!/bin/sh\n\n";


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 10:36:31 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 11:36:31 +0100
Subject: [Box Backup-dev] Missing libs when building on Solaris
Message-ID: <016b01c6271b$5d713ba0$1601060a@cs>

This is a multi-part message in MIME format.

------=_NextPart_000_0168_01C62723.BF1DD5E0
Content-Type: text/plain;
	charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

Hi,

I am not sure where to add it but on Solaris the additional
libraries "-lnsl -lsocket" are needed for linking to succeed.

Regards,
Stefan

------=_NextPart_000_0168_01C62723.BF1DD5E0
Content-Type: text/html;
	charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.2900.2769" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am not sure where to add it but on =
Solaris the=20
additional</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>libraries "-lnsl -lsocket" are needed =
for linking=20
to succeed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Stefan</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0168_01C62723.BF1DD5E0--


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 11:29:54 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 11:29:54 +0000
Subject: [Box Backup-dev] Missing libs when building on Solaris
In-Reply-To: <016b01c6271b$5d713ba0$1601060a@cs>
References: <016b01c6271b$5d713ba0$1601060a@cs>
Message-ID: <20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk>

Stefan Norlin <stefan.norlin@infoflexconnect.se> wrote:
> I am not sure where to add it but on Solaris the additional
> libraries "-lnsl -lsocket" are needed for linking to succeed.

They should be added by virtue of linking to libssl.so. I take it you 
are linking dynamically to openssl? If you link statically this problem 
can occur. There are other problems which occur if you link statically 
to openssl too.

If you are linking dynamically then try ldd on libssl.so to see what it says.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 11:36:37 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 11:36:37 +0000
Subject: [Box Backup-dev] makeparcels.pl - check for directory
In-Reply-To: <008c01c62705$7f244140$1601060a@cs>
References: <008c01c62705$7f244140$1601060a@cs>
Message-ID: <20060201113637.vctt5gh3xcgsgwko@ebourne.me.uk>

Stefan Norlin <stefan.norlin@infoflexconnect.se> wrote:
> Index: infrastructure/makeparcels.pl
> ===================================================================
> --- infrastructure/makeparcels.pl       (revision 354)
> +++ infrastructure/makeparcels.pl       (working copy)
> @@ -104,7 +104,7 @@
>        print MAKE $target,":\n";
>
>        my $dir = parcel_dir($parcel);
> -       print MAKE "\tmkdir $dir\n";
> +       print MAKE "\t[ -d $dir ] || mkdir $dir\n";
>
>        open SCRIPT,">parcels/scripts/install-$parcel" or die "Can't 
> open installer script for $parcel for writing";
>        print SCRIPT "#!/bin/sh\n\n";

Ben - make sense if I commit this?

Looks ok to me.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 11:42:37 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 1 Feb 2006 11:42:37 +0000
Subject: [Box Backup-dev] makeparcels.pl - check for directory
In-Reply-To: <20060201113637.vctt5gh3xcgsgwko@ebourne.me.uk>
References: <008c01c62705$7f244140$1601060a@cs> <20060201113637.vctt5gh3xcgsgwko@ebourne.me.uk>
Message-ID: <D76B202F-3DEA-4D10-84EC-C3D74DBAD5EB@fluffy.co.uk>

On 1 Feb 2006, at 11:36, Martin Ebourne wrote:

> Stefan Norlin <stefan.norlin@infoflexconnect.se> wrote:
>> Index: infrastructure/makeparcels.pl
>> ===================================================================
>> --- infrastructure/makeparcels.pl       (revision 354)
>> +++ infrastructure/makeparcels.pl       (working copy)
>> @@ -104,7 +104,7 @@
>>        print MAKE $target,":\n";
>>
>>        my $dir = parcel_dir($parcel);
>> -       print MAKE "\tmkdir $dir\n";
>> +       print MAKE "\t[ -d $dir ] || mkdir $dir\n";
>>
>>        open SCRIPT,">parcels/scripts/install-$parcel" or die  
>> "Can't open installer script for $parcel for writing";
>>        print SCRIPT "#!/bin/sh\n\n";
>
> Ben - make sense if I commit this?

OK. I assume it will copy updated binaries over the ones in the  
target directories?

Ben



From boxbackup-dev@fluffy.co.uk  Wed Feb  1 11:55:06 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 11:55:06 +0000
Subject: [Box Backup-dev] makeparcels.pl - check for directory
In-Reply-To: <D76B202F-3DEA-4D10-84EC-C3D74DBAD5EB@fluffy.co.uk>
References: <008c01c62705$7f244140$1601060a@cs>
 <20060201113637.vctt5gh3xcgsgwko@ebourne.me.uk>
 <D76B202F-3DEA-4D10-84EC-C3D74DBAD5EB@fluffy.co.uk>
Message-ID: <20060201115506.kkfpzhrhckwgcok8@ebourne.me.uk>

Ben Summers <ben@fluffy.co.uk> wrote:
> OK. I assume it will copy updated binaries over the ones in the  
> target directories?

Yes. (Barring permissions issues, say if someone ran make as different 
users in the same directory - asking for trouble!)

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 11:05:24 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  1 Feb 2006 11:05:24 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r355 - box/trunk/infrastructure
Message-ID: <20060201110524.7224A94@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-01 11:05:22 +0000 (Wed, 01 Feb 2006)
New Revision: 355

Modified:
   box/trunk/infrastructure/makeparcels.pl
Log:
Prevent failure from pre-existing directory when making parcels.

Modified: box/trunk/infrastructure/makeparcels.pl
===================================================================
--- box/trunk/infrastructure/makeparcels.pl	2006-01-31 11:52:57 UTC (rev 354)
+++ box/trunk/infrastructure/makeparcels.pl	2006-02-01 11:05:22 UTC (rev 355)
@@ -104,7 +104,7 @@
 	print MAKE $target,":\n";
 	
 	my $dir = parcel_dir($parcel);
-	print MAKE "\tmkdir $dir\n";
+	print MAKE "\ttest -d $dir || mkdir $dir\n";
 	
 	open SCRIPT,">parcels/scripts/install-$parcel" or die "Can't open installer script for $parcel for writing";
 	print SCRIPT "#!/bin/sh\n\n";


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 12:03:25 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 12:03:25 +0000
Subject: [Box Backup-dev] makeparcels.pl - check for directory
In-Reply-To: <008c01c62705$7f244140$1601060a@cs>
References: <008c01c62705$7f244140$1601060a@cs>
Message-ID: <20060201120325.4922ke15sk4w4cc8@ebourne.me.uk>

Stefan Norlin <stefan.norlin@infoflexconnect.se> wrote:
> I have not taken any active part in development (yet) but I have
> a suggestion for a very small change when generating the makefile.
>
> Check for directory before it is created as indicated below.

Committed, thanks.

But please next time patches as attachments only. By the time the tabs 
have been expanded and the lines wrapped even a trivial patch is broken.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 13:08:15 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 14:08:15 +0100
Subject: [Box Backup-dev] Missing libs when building on Solaris
References: <016b01c6271b$5d713ba0$1601060a@cs> <20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk>
Message-ID: <01e701c62730$903677c0$1601060a@cs>

>> I am not sure where to add it but on Solaris the additional
>> libraries "-lnsl -lsocket" are needed for linking to succeed.
>
> They should be added by virtue of linking to libssl.so. I take it you are 
> linking dynamically to openssl? If you link statically this problem can 
> occur. There are other problems which occur if you link statically to 
> openssl too.

Yes, dynamically.

Get the same problem on Solaris 7 and Solaris 10.

For example, on Solaris 10 I run:

./configure --with-ssl-lib=/usr/sfw/lib --with-ssl-headers=/usr/sfw/include

> If you are linking dynamically then try ldd on libssl.so to see what it 
> says.

-bash-3.00$ ldd /usr/sfw/lib/libssl.so
        libcrypto.so.0.9.7 =>    /usr/sfw/lib/libcrypto.so.0.9.7
        libc.so.1 =>     /lib/libc.so.1
        libsocket.so.1 =>        /lib/libsocket.so.1
        libnsl.so.1 =>   /lib/libnsl.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libmd5.so.1 =>   /lib/libmd5.so.1
        libscf.so.1 =>   /lib/libscf.so.1
        libdoor.so.1 =>  /lib/libdoor.so.1
        libuutil.so.1 =>         /lib/libuutil.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1
        /platform/SUNW,Sun-Fire-V210/lib/libmd5_psr.so.1

If I understand you correctly this should make nsl and socket libs
to be added "automatically"? Well, it does not seem to happen...

Stefan


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 13:48:30 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 1 Feb 2006 13:48:30 +0000
Subject: [Box Backup-dev] Win32 build
Message-ID: <47A7E19F-4518-4160-A1E4-9FCECAF3797E@fluffy.co.uk>

The current release candidate doesn't have the Win32 build  
environment in it, and I'm lead to believe the stuff in trunk is old  
anyway.

I don't have the necessary stuff to test or do anything with the  
Win32 side of things, so perhaps someone would like to set things up  
so that it's easy to build from the distribution archive?

I suggest...

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

goes into trunk, or something like it.

Then, add these dirs to

   distribution/boxbackup/DISTRIBUTION-MANIFEST.txt

so that they get copied into the archive.

Add

   distribution/boxbackup/WIN32.txt

and write some notes which explain how to build on win32, with all  
the various variants (which is Cygwin, Native with MinGW, Native with  
MSVC).

Clean up trunk/ -- there's a few bits there which look Win32-ish.

What's win32.bat? If it's important, add it to DISTRIBUTION- 
MANIFEST.txt, as it won't get copied by default. It implies it's for  
cygwin, is it also relevant to Win32 native?

Then run

   infrastructure/makedistribution.pl boxbackup

and then see if you can follow your instructions to build the  
unpacked archive.

Thanks!

Now the only thing is that everything is designed to be a generic  
framework for building files, and all this is terribly Box Backup  
specific. Given the way MSVC works, I don't think there's much that  
can be done.

And finally, it'd be nice not to build lib/win32 on non-win32 platforms.

Ben



From boxbackup-dev@fluffy.co.uk  Wed Feb  1 15:58:14 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 16:58:14 +0100
Subject: [Box Backup-dev] Missing libs when building on Solaris
References: <016b01c6271b$5d713ba0$1601060a@cs> <20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk> <01e701c62730$903677c0$1601060a@cs>
Message-ID: <031301c62748$4fcfe0f0$1601060a@cs>

After googling around a bit I added

AC_SEARCH_LIBS(gethostbyname, nsl socket resolv)
AC_SEARCH_LIBS(shutdown, nsl socket resolv)

to configure.ac and re-ran bootstrap and configure. That made the trick.

Stefan

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 16:15:13 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 17:15:13 +0100
Subject: [Box Backup-dev] Note on Solaris and openssl
Message-ID: <032e01c6274a$aeabb6b0$1601060a@cs>

It turned out the openssl libraries in Solaris 10 which are in the default
installation and are located in /usr/sfw/lib did not contain the AES 192
and AES 256 functions. Probably some export restriction thingy.

However, downloading and installing openssl from sunfreeware
resolved that problem.

Hope you do not feel "spammed" by my Solaris adventures but I feel
like getting this done since I finally managed to get going... :)

Once Sparc is done I will try Solaris x86 as well.

Regards,
Stefan

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 16:44:34 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 16:44:34 +0000
Subject: [Box Backup-dev] Missing libs when building on Solaris
In-Reply-To: <031301c62748$4fcfe0f0$1601060a@cs>
References: <016b01c6271b$5d713ba0$1601060a@cs>
 <20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk>
 <01e701c62730$903677c0$1601060a@cs> <031301c62748$4fcfe0f0$1601060a@cs>
Message-ID: <20060201164434.xycai0de00g8wc0k@ebourne.me.uk>

Stefan Norlin <stefan.norlin@infoflexconnect.se> wrote:
> After googling around a bit I added
>
> AC_SEARCH_LIBS(gethostbyname, nsl socket resolv)
> AC_SEARCH_LIBS(shutdown, nsl socket resolv)
>
> to configure.ac and re-ran bootstrap and configure. That made the trick.

That's a "work around" which we may go with, but there's two reasons 
it's not ideal:

1. It's not really up to us to know what openssl's dependencies are.

2. This directive adds libraries if they are present, not if they are 
necessary. Other platforms which have the libraries but don't need to 
link them (the functions are defined in libc say) will end up carrying 
unnecessary library dependencies.

Are you compiling with gcc on Solaris? And are you using the Sun linker 
or GNU ld? Certainly on linux with GNU ld the .so dependencies are 
followed automatically.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 16:46:59 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 16:46:59 +0000
Subject: [Box Backup-dev] Note on Solaris and openssl
In-Reply-To: <032e01c6274a$aeabb6b0$1601060a@cs>
References: <032e01c6274a$aeabb6b0$1601060a@cs>
Message-ID: <20060201164659.0kru9a77k000ccsk@ebourne.me.uk>

Stefan Norlin <stefan.norlin@infoflexconnect.se> wrote:
> Hope you do not feel "spammed" by my Solaris adventures but I feel
> like getting this done since I finally managed to get going... :)

I don't, can't speak for the others. ;)

The implication from your emails I'm getting is that you're seeing all 
tests (debug and release?) pass on at least some of the Solaris 
platforms. Is that the case? Good news if it is.

Cheers,

Martin/

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 17:25:51 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 18:25:51 +0100
Subject: [Box Backup-dev] Note on Solaris and openssl
References: <032e01c6274a$aeabb6b0$1601060a@cs> <20060201164659.0kru9a77k000ccsk@ebourne.me.uk>
Message-ID: <00c701c62754$8c8684c0$0301050a@stenorhem>

> The implication from your emails I'm getting is that you're seeing all 
> tests (debug and release?) pass on at least some of the Solaris 
> platforms. Is that the case? Good news if it is.

Not really, I was just trying to make it compile ok first.

Now I have run first tests on Solaris 10.

Both some debug and release test fails.

I uploaded the resulting logs in a tar archive here:

http://www.form2pdf.se/files/runtest.tar.bz2

It is only around 160 kB.

Stefan


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 17:54:47 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 18:54:47 +0100
Subject: [Box Backup-dev] Missing libs when building on Solaris
References: <016b01c6271b$5d713ba0$1601060a@cs><20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk><01e701c62730$903677c0$1601060a@cs> <031301c62748$4fcfe0f0$1601060a@cs> <20060201164434.xycai0de00g8wc0k@ebourne.me.uk>
Message-ID: <00d401c62758$973005f0$0301050a@stenorhem>

> Are you compiling with gcc on Solaris? And are you using the Sun linker 
> or GNU ld? Certainly on linux with GNU ld the .so dependencies are 
> followed automatically.

gcc, yes, but using SUN's ld (/usr/ccs/bin/ld).

On sunfreeware it says for binutils that "sometime using Sun ld is better".
I do not know exactly how to interpret that.

Anyway, I tried to remove the AC_SEARCH lines again, install
binutils and use GNU ld. bootstrap, configure and compile.

Same problem. Those symbols were not resolved. The nsl and socket
libs were not added.

Stefan


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 18:44:09 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 19:44:09 +0100
Subject: [Box Backup-dev] Missing libs when building on Solaris
References: <016b01c6271b$5d713ba0$1601060a@cs><20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk><01e701c62730$903677c0$1601060a@cs> <031301c62748$4fcfe0f0$1601060a@cs> <20060201164434.xycai0de00g8wc0k@ebourne.me.uk>
Message-ID: <000001c62760$b14ec130$0301050a@stenorhem>

I found the snippet below in configure.ac for curl and when
adding it to box' configure.ac it worked fine on Solaris.

It is a bit more intelligent, maybe that is the way to do it?

Stefan

dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************

dnl gethostbyname in the nsl lib?
AC_CHECK_FUNC(gethostbyname, , [ AC_CHECK_LIB(nsl, gethostbyname) ])

if test "$ac_cv_lib_nsl_gethostbyname" != "yes" -a 
"$ac_cv_func_gethostbyname" != "yes"; then
  dnl gethostbyname in the socket lib?
  AC_CHECK_FUNC(gethostbyname, , [ AC_CHECK_LIB(socket, gethostbyname) ])
fi

dnl At least one system has been identified to require BOTH nsl and
dnl socket libs to link properly.
if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname"; then
  AC_MSG_CHECKING([trying both nsl and socket libs])
  my_ac_save_LIBS=$LIBS
  LIBS="-lnsl -lsocket $LIBS"
  AC_TRY_LINK( ,
             [gethostbyname();],
             my_ac_link_result=success,
             my_ac_link_result=failure )

  if test "$my_ac_link_result" = "failure"; then
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
    dnl restore LIBS
    LIBS=$my_ac_save_LIBS
  else
    AC_MSG_RESULT([yes])
  fi
fi

dnl socket lib?
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 19:26:46 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 20:26:46 +0100
Subject: [Box Backup-dev] Missing libs when building on Solaris
References: <016b01c6271b$5d713ba0$1601060a@cs><20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk><01e701c62730$903677c0$1601060a@cs> <031301c62748$4fcfe0f0$1601060a@cs> <20060201164434.xycai0de00g8wc0k@ebourne.me.uk> <000001c62760$b14ec130$0301050a@stenorhem>
Message-ID: <002501c62765$710019d0$0301050a@stenorhem>

>I found the snippet below in configure.ac for curl and when
> adding it to box' configure.ac it worked fine on Solaris.

No, it did not work fine on Solaris as it first looked.

Stefan


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 20:00:08 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 21:00:08 +0100
Subject: [Box Backup-dev] Missing libs when building on Solaris
References: <016b01c6271b$5d713ba0$1601060a@cs><20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk><01e701c62730$903677c0$1601060a@cs> <031301c62748$4fcfe0f0$1601060a@cs> <20060201164434.xycai0de00g8wc0k@ebourne.me.uk>
Message-ID: <007801c6276a$1a8be430$0301050a@stenorhem>

> 2. This directive adds libraries if they are present, not if they are 
> necessary. Other platforms which have the libraries but don't need to link 
> them (the functions are defined in libc say) will end up carrying 
> unnecessary library dependencies.

Are you sure about this for AC_SEARCH_LIBS?

In the configure generated it seems it tries to link without any extra libs
first and only if that fails it searches for the function in the specified 
libs
and then tries to link with those. From my (sometimes limited) understanding
it would seem it performs exactly the kind of testing wanted.

For example libnsl is on linux but it not necessary in this case (only has
NIS functions and stuff) and it is not added to the makefile when the
AC_SEARCH_LIBS(gethostbyname, nsl socket resolv) is present
in configure.ac. From what I can tell it wouldn't even be added even
if gethostbyname was defined both in libc and libnsl (as an example)
since it tries to link without any extra libs first.

Stefan


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 20:07:35 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 20:07:35 +0000
Subject: [Box Backup-dev] Missing libs when building on Solaris
In-Reply-To: <00d401c62758$973005f0$0301050a@stenorhem>
References: <016b01c6271b$5d713ba0$1601060a@cs>
 <20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk>
 <01e701c62730$903677c0$1601060a@cs> <031301c62748$4fcfe0f0$1601060a@cs>
 <20060201164434.xycai0de00g8wc0k@ebourne.me.uk>
 <00d401c62758$973005f0$0301050a@stenorhem>
Message-ID: <1138824455.12937.5.camel@avenin.ebourne.me.uk>

On Wed, 2006-02-01 at 18:54 +0100, Stefan Norlin wrote:
> > Are you compiling with gcc on Solaris? And are you using the Sun linker 
> > or GNU ld? Certainly on linux with GNU ld the .so dependencies are 
> > followed automatically.
> 
> gcc, yes, but using SUN's ld (/usr/ccs/bin/ld).
> 
> On sunfreeware it says for binutils that "sometime using Sun ld is better".
> I do not know exactly how to interpret that.

Sun ld can be better on Solaris than GNU ld for C programs.

You should always use GNU ld with g++ for C++ programs though. The GNU
toolchain and the Solaris toolchain have different ideas on how to
implement templates and if you mix & match you can end up with huge
libraries and executables due to duplication of templates.

> Anyway, I tried to remove the AC_SEARCH lines again, install
> binutils and use GNU ld. bootstrap, configure and compile.
> 
> Same problem. Those symbols were not resolved. The nsl and socket
> libs were not added.

Are you sure it was using GNU ld? You generally have to recompile gcc to
tell it which linker to use (there's a --with-gnu-ld option to
configure). It usually hardcodes the location of the linker and doesn't
rely on your path. There's a --print-somethingorother option you can
give to gcc to get it to report what it will use.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 20:13:26 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 20:13:26 +0000
Subject: [Box Backup-dev] Missing libs when building on Solaris
In-Reply-To: <007801c6276a$1a8be430$0301050a@stenorhem>
References: <016b01c6271b$5d713ba0$1601060a@cs>
 <20060201112954.vxkkg6u1w0ccssgg@ebourne.me.uk>
 <01e701c62730$903677c0$1601060a@cs> <031301c62748$4fcfe0f0$1601060a@cs>
 <20060201164434.xycai0de00g8wc0k@ebourne.me.uk>
 <007801c6276a$1a8be430$0301050a@stenorhem>
Message-ID: <1138824806.12937.10.camel@avenin.ebourne.me.uk>

On Wed, 2006-02-01 at 21:00 +0100, Stefan Norlin wrote:
>
> > 2. This directive adds libraries if they are present, not if they are 
> > necessary. Other platforms which have the libraries but don't need to link 
> > them (the functions are defined in libc say) will end up carrying 
> > unnecessary library dependencies.
> 
> Are you sure about this for AC_SEARCH_LIBS?
> 
> In the configure generated it seems it tries to link without any extra libs
> first and only if that fails it searches for the function in the specified 
> libs
> and then tries to link with those. From my (sometimes limited) understanding
> it would seem it performs exactly the kind of testing wanted.

You're right. I should have remembered that AC_SEARCH_LIBS is different
to AC_CHECK_LIB in that respect. Thinking about it we do exactly the
same for librt and use AC_SEARCH_LIBS for just that reason.

I'll commit the change you suggested as soon as I get chance. Thanks for
the help!

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 20:27:20 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 21:27:20 +0100
Subject: [Box Backup-dev] Note on Solaris and openssl
References: <032e01c6274a$aeabb6b0$1601060a@cs> <20060201164659.0kru9a77k000ccsk@ebourne.me.uk> <00c701c62754$8c8684c0$0301050a@stenorhem>
Message-ID: <00be01c6276d$e802e460$0301050a@stenorhem>

> Both some debug and release test fails.

Test backupdiff fails since it takes 66 seconds to complete
on a V210 with double CPUs... :)

Stefan

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 20:32:25 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 1 Feb 2006 21:32:25 +0100
Subject: [Box Backup-dev] Note on Solaris and openssl
References: <032e01c6274a$aeabb6b0$1601060a@cs> <20060201164659.0kru9a77k000ccsk@ebourne.me.uk> <00c701c62754$8c8684c0$0301050a@stenorhem>
Message-ID: <00d101c6276e$9d084ad0$0301050a@stenorhem>

> Both some debug and release test fails.

Test bbackupd fails since tar on Solaris does not understand
the "z" in "tar xzf testfiles/test_base.tgz".

Something like "cat testfiles/test_base.tgz | gzip -d | tar xf -"
should be more portable.

Stefan


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 20:46:18 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 1 Feb 2006 20:46:18 +0000
Subject: [Box Backup-dev] makebuildenv.pl and Win32
Message-ID: <EC11C606-31E3-484A-A21C-49119D7B83A0@fluffy.co.uk>

I'd like this statement

    $env_flags{'IGNORE_lib/win32'} = 1;

to be executed at around line 40 of makebuildenv.pl if and only if  
the platform is Win32. What's the autoconf way of doing this?

The idea is to stop the win32 directory from being included,  
compiled, or anything, unless we're on win32.

Ben




From boxbackup-dev@fluffy.co.uk  Wed Feb  1 19:50:55 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  1 Feb 2006 19:50:55 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r356 - in box/trunk: lib/backupclient lib/crypto test/backupdiff
Message-ID: <20060201195055.CD98994@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-01 19:50:54 +0000 (Wed, 01 Feb 2006)
New Revision: 356

Modified:
   box/trunk/lib/backupclient/BackupStoreDirectory.cpp
   box/trunk/lib/backupclient/BackupStoreFile.cpp
   box/trunk/lib/backupclient/BackupStoreFile.h
   box/trunk/lib/backupclient/BackupStoreFileDiff.cpp
   box/trunk/lib/crypto/Random.cpp
   box/trunk/test/backupdiff/testbackupdiff.cpp
Log:
Get rid of the non-test compiler warnings seen on Darwin with gcc4

Modified: box/trunk/lib/backupclient/BackupStoreDirectory.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreDirectory.cpp	2006-02-01 11:05:22 UTC (rev 355)
+++ box/trunk/lib/backupclient/BackupStoreDirectory.cpp	2006-02-01 19:50:54 UTC (rev 356)
@@ -36,7 +36,7 @@
 	// Then a StreamableMemBlock for attributes
 } dir_StreamFormat;
 
-enum
+typedef enum
 {
 	Option_DependencyInfoPresent = 1
 } dir_StreamFormatOptions;

Modified: box/trunk/lib/backupclient/BackupStoreFile.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFile.cpp	2006-02-01 11:05:22 UTC (rev 355)
+++ box/trunk/lib/backupclient/BackupStoreFile.cpp	2006-02-01 19:50:54 UTC (rev 356)
@@ -1499,3 +1499,27 @@
 }
 
 
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    DiffTimer::DiffTimer();
+//		Purpose: Constructor
+//		Created: 2005/02/01
+//
+// --------------------------------------------------------------------------
+DiffTimer::DiffTimer()
+{
+}
+
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    DiffTimer::DiffTimer();
+//		Purpose: Destructor
+//		Created: 2005/02/01
+//
+// --------------------------------------------------------------------------
+DiffTimer::~DiffTimer()
+{	
+}

Modified: box/trunk/lib/backupclient/BackupStoreFile.h
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFile.h	2006-02-01 11:05:22 UTC (rev 355)
+++ box/trunk/lib/backupclient/BackupStoreFile.h	2006-02-01 19:50:54 UTC (rev 356)
@@ -47,6 +47,9 @@
 class DiffTimer
 {
 public:
+	DiffTimer();
+	virtual ~DiffTimer();
+public:
 	virtual void   DoKeepAlive() = 0;
 	virtual time_t GetTimeMgmtEpoch() = 0;
 	virtual int    GetMaximumDiffingTime() = 0;

Modified: box/trunk/lib/backupclient/BackupStoreFileDiff.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-01 11:05:22 UTC (rev 355)
+++ box/trunk/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-01 19:50:54 UTC (rev 356)
@@ -835,7 +835,9 @@
 	ASSERT(pFirstInHashList != 0);
 	ASSERT(pIndex != 0);
 
-	uint16_t Hash = fastSum.GetComponentForHashing();
+#ifndef NDEBUG
+	uint16_t DEBUG_Hash = fastSum.GetComponentForHashing();
+#endif
 	uint32_t Checksum = fastSum.GetChecksum();
 
 	// Before we go to the expense of the MD5, make sure it's a darn good match on the checksum we already know.
@@ -873,7 +875,7 @@
 	{
 		//TRACE3("scan size %d, block size %d, hash %d\n", scan->mSize, BlockSize, Hash);
 		ASSERT(scan->mSize == BlockSize);
-		ASSERT(RollingChecksum::ExtractHashingComponent(scan->mWeakChecksum) == Hash);
+		ASSERT(RollingChecksum::ExtractHashingComponent(scan->mWeakChecksum) == DEBUG_Hash);
 	
 		// Compare?
 		if(strong.DigestMatches(scan->mStrongChecksum))

Modified: box/trunk/lib/crypto/Random.cpp
===================================================================
--- box/trunk/lib/crypto/Random.cpp	2006-02-01 11:05:22 UTC (rev 355)
+++ box/trunk/lib/crypto/Random.cpp	2006-02-01 19:50:54 UTC (rev 356)
@@ -69,7 +69,7 @@
 std::string Random::GenerateHex(int Length)
 {
 	uint8_t r[256];
-	if(Length > sizeof(r))
+	if(Length > (int)sizeof(r))
 	{
 		THROW_EXCEPTION(CipherException, LengthRequestedTooLongForRandomHex)
 	}

Modified: box/trunk/test/backupdiff/testbackupdiff.cpp
===================================================================
--- box/trunk/test/backupdiff/testbackupdiff.cpp	2006-02-01 11:05:22 UTC (rev 355)
+++ box/trunk/test/backupdiff/testbackupdiff.cpp	2006-02-01 19:50:54 UTC (rev 356)
@@ -83,7 +83,7 @@
 	fclose(f);
 	free(b);
 
-	TEST_THAT(TestGetFileSize(filename) == size);
+	TEST_THAT((size_t)TestGetFileSize(filename) == size);
 }
 
 


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 23:32:00 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Thu, 2 Feb 2006 00:32:00 +0100
Subject: [Box Backup-dev] Box on Solaris 10 x86
Message-ID: <018201c62787$b362e970$0301050a@stenorhem>

Well, it compiles with one additional change:

Include file asm/byteorder.h is present but the

#define box_hton64(x) __cpu_to_be64(x)
#define box_ntoh64(x) __be64_to_cpu(x)

does not work.

__cpu_to_be64 and __be64_to_cpu cannot be found when linking.

Also tests fails due to that the pid file does not get created it seems.

Sample test output:

TEST: test/bbackupd
Removing old test files...
Copying new test files...
Account 1234567 created
Running test bbackupd in debug mode...
Exception thrown: CommonException(OSFileError) at 
BackupClientFileAttributes.cpp(298)
Exception thrown: CommonException(OSFileError) at 
BackupClientFileAttributes.cpp(682)
Exception thrown: BackupStoreException(AttributesNotLoaded) at 
BackupClientFileAttributes.cpp(578)
Server: ../../bin/bbstored/bbstored testfiles/bbstored.conf
FAILURE: Server didn't save PID file at ../../lib/common/Test.h(94)
FAILURE: Condition [bbstored_pid != -1 && bbstored_pid != 0] failed at 
testbbackupd.cpp(388)
FAILED: 2 tests failed
--------
bbackupd: FAILED: 2 tests failed

Stefan 


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 23:44:27 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Wed, 01 Feb 2006 15:44:27 -0800
Subject: [Box Backup-dev] Box on Solaris 10 x86
In-Reply-To: <018201c62787$b362e970$0301050a@stenorhem>
References: <018201c62787$b362e970$0301050a@stenorhem>
Message-ID: <43E147DB.8020701@reedtz.com>

On 2/1/06 3:32 PM, Stefan Norlin wrote:
> Well, it compiles with one additional change:
>
> Include file asm/byteorder.h is present but the
>
> #define box_hton64(x) __cpu_to_be64(x)
> #define box_ntoh64(x) __be64_to_cpu(x)
>
> does not work.
>
> __cpu_to_be64 and __be64_to_cpu cannot be found when linking.
>
> Also tests fails due to that the pid file does not get created it seems.
Check if you have a bbstored process running. I had (as you may have
seen) the exact same symptoms, and I had a bbstored process running that
appeared to hang on to the socket, so the new process wouldn't start.

HTH,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 23:51:20 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Thu, 2 Feb 2006 00:51:20 +0100
Subject: [Box Backup-dev] Box on Solaris 10 x86
References: <018201c62787$b362e970$0301050a@stenorhem> <43E147DB.8020701@reedtz.com>
Message-ID: <01af01c6278a$66dd7f40$0301050a@stenorhem>

I obviously did not go through your posts careful enough.

It indeed seems to be related. Thanks a lot for pointing that out!

However, it happens some way through the tests again, and again.

Maybe the daemons are not always shut down correctly?

I will a look at it tomorrow... bedtime. :-)

Stefan


----- Original Message ----- 
From: "Per Thomsen" <pthomsen@reedtz.com>
To: <boxbackup-dev@fluffy.co.uk>
Sent: Thursday, February 02, 2006 12:44 AM
Subject: Re: [Box Backup-dev] Box on Solaris 10 x86


> On 2/1/06 3:32 PM, Stefan Norlin wrote:
>> Well, it compiles with one additional change:
>>
>> Include file asm/byteorder.h is present but the
>>
>> #define box_hton64(x) __cpu_to_be64(x)
>> #define box_ntoh64(x) __be64_to_cpu(x)
>>
>> does not work.
>>
>> __cpu_to_be64 and __be64_to_cpu cannot be found when linking.
>>
>> Also tests fails due to that the pid file does not get created it seems.
> Check if you have a bbstored process running. I had (as you may have
> seen) the exact same symptoms, and I had a bbstored process running that
> appeared to hang on to the socket, so the new process wouldn't start.
> 
> HTH,
> Per
> 
> -- 
> Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
> V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
> GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen
> 
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev
>

From boxbackup-dev@fluffy.co.uk  Wed Feb  1 23:53:24 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 01 Feb 2006 23:53:24 +0000
Subject: [Box Backup-dev] Box on Solaris 10 x86
In-Reply-To: <018201c62787$b362e970$0301050a@stenorhem>
References: <018201c62787$b362e970$0301050a@stenorhem>
Message-ID: <1138838004.13630.3.camel@avenin.ebourne.me.uk>

On Thu, 2006-02-02 at 00:32 +0100, Stefan Norlin wrote:
> Well, it compiles with one additional change:
> 
> Include file asm/byteorder.h is present but the
> 
> #define box_hton64(x) __cpu_to_be64(x)
> #define box_ntoh64(x) __be64_to_cpu(x)
> 
> does not work.
> 
> __cpu_to_be64 and __be64_to_cpu cannot be found when linking.

That somewhat implies that the functions are there and are valid, but we
are missing a library or something. Any clues anywhere for a 64 bit byte
swapping function? Or what library these might be in?

Any sign of endian.h? hton64?

> FAILURE: Server didn't save PID file at ../../lib/common/Test.h(94)
> FAILURE: Condition [bbstored_pid != -1 && bbstored_pid != 0] failed at 

Stray bbstored process from a previous failed run most probably.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 23:58:33 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Wed, 01 Feb 2006 15:58:33 -0800
Subject: [Box Backup-dev] Box on Solaris 10 x86
In-Reply-To: <01af01c6278a$66dd7f40$0301050a@stenorhem>
References: <018201c62787$b362e970$0301050a@stenorhem> <43E147DB.8020701@reedtz.com> <01af01c6278a$66dd7f40$0301050a@stenorhem>
Message-ID: <43E14B29.60401@reedtz.com>

On 2/1/06 3:51 PM, Stefan Norlin wrote:
> I obviously did not go through your posts careful enough.
>
> It indeed seems to be related. Thanks a lot for pointing that out!
>
> However, it happens some way through the tests again, and again.
>
> Maybe the daemons are not always shut down correctly?
What happened to me (AFAICT), was that I aborted a test, while it was
running, and the bbstored process had been started (and daemonized), but
I killed the script before it could shut it down. So, the process was
staying around, and holding on to the bbstored socket. Whenever the
tests tried to start a bbstored process, it would die, because it
couldn't access the socket.

So it was the same (old) bbstored process that kept hanging around
through about 25 test runs, until I noticed it. After it was gone,
everything was hunky-dory again.
>
> I will a look at it tomorrow... bedtime. :-)
Goodnight! :-)

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 23:38:30 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  1 Feb 2006 23:38:30 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r357 - box/trunk
Message-ID: <20060201233830.8598E94@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-01 23:38:28 +0000 (Wed, 01 Feb 2006)
New Revision: 357

Modified:
   box/trunk/configure.ac
Log:
Detect network libraries for OpenSSL, needed on Solaris

Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2006-02-01 19:50:54 UTC (rev 356)
+++ box/trunk/configure.ac	2006-02-01 23:38:28 UTC (rev 357)
@@ -52,6 +52,8 @@
 ])
 
 ## Check for Open SSL, use old versions only if explicitly requested
+AC_SEARCH_LIBS([gethostbyname], [nsl socket resolv])
+AC_SEARCH_LIBS([shutdown], [nsl socket resolv])
 AX_CHECK_SSL(, [AC_MSG_ERROR([[OpenSSL is not installed but is required]])])
 AC_ARG_ENABLE(
   [old-ssl],


From boxbackup-dev@fluffy.co.uk  Wed Feb  1 23:54:31 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  1 Feb 2006 23:54:31 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r358 - in box/trunk: distribution/boxbackup test/bbackupd
Message-ID: <20060201235431.9ADB194@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-01 23:54:29 +0000 (Wed, 01 Feb 2006)
New Revision: 358

Modified:
   box/trunk/distribution/boxbackup/THANKS.txt
   box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Use gzip directly to avoid GNU specific tar options.

NOTE: Can someone test that this doesn't break Windows please?

Modified: box/trunk/distribution/boxbackup/THANKS.txt
===================================================================
--- box/trunk/distribution/boxbackup/THANKS.txt	2006-02-01 23:38:28 UTC (rev 357)
+++ box/trunk/distribution/boxbackup/THANKS.txt	2006-02-01 23:54:29 UTC (rev 358)
@@ -64,3 +64,6 @@
 John Pybus
   - Ideas and feature requests
   - Useful little patches to code
+
+Stefan Norlin
+  - Help with testing and fixes on lots of different Solaris platforms

Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp	2006-02-01 23:38:28 UTC (rev 357)
+++ box/trunk/test/bbackupd/testbbackupd.cpp	2006-02-01 23:54:29 UTC (rev 358)
@@ -516,7 +516,7 @@
 	// unpack the files for the initial test
 	TEST_THAT(::system("rm -rf testfiles/TestDir1") == 0);
 	TEST_THAT(::system("mkdir testfiles/TestDir1") == 0);
-	TEST_THAT(::system("tar xzf testfiles/spacetest1.tgz -C testfiles/TestDir1/") == 0);
+	TEST_THAT(::system("gzip -d < testfiles/spacetest1.tgz | tar xf - -C testfiles/TestDir1/") == 0);
 
 	int pid = LaunchServer("../../bin/bbackupd/bbackupd testfiles/bbackupd.conf", "testfiles/bbackupd.pid");
 	TEST_THAT(pid != -1 && pid != 0);
@@ -535,7 +535,7 @@
 		TestRemoteProcessMemLeaks("bbstoreaccounts.memleaks");
 
 		// Unpack some more files
-		TEST_THAT(::system("tar xzf testfiles/spacetest2.tgz -C testfiles/TestDir1/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/spacetest2.tgz | tar xf - -C testfiles/TestDir1/") == 0);
 		// Delete a file and a directory
 		TEST_THAT(::unlink("testfiles/TestDir1/spacetest/d1/f3") == 0);
 		TEST_THAT(::system("rm -rf testfiles/TestDir1/spacetest/d3/d4") == 0);
@@ -556,7 +556,7 @@
 		TEST_THAT(!TestFileExists("testfiles/notifyran.store-full.2"));
 		
 		// unpack the initial files again
-		TEST_THAT(::system("tar xzf testfiles/test_base.tgz -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test_base.tgz | tar xf - -C testfiles/") == 0);
 
 		// wait for it to do it's stuff
 		wait_for_backup_operation();
@@ -656,7 +656,7 @@
 		// Add some more files
 		// Because the 'm' option is not used, these files will look very old to the daemon.
 		// Lucky it'll upload them then!
-		TEST_THAT(::system("tar xzf testfiles/test2.tgz -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test2.tgz | tar xf - -C testfiles/") == 0);
 		::chmod("testfiles/TestDir1/sub23/dhsfdss/blf.h", 0415);
 		
 		// Wait and test
@@ -693,7 +693,7 @@
 
 		// Add some files and directories which are marked as excluded
 		printf("Add files and dirs for exclusion test\n");
-		TEST_THAT(::system("tar xzf testfiles/testexclude.tgz -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/testexclude.tgz | tar xf - -C testfiles/") == 0);
 		// Wait and test
 		wait_for_backup_operation();
 		compareReturnValue = ::system("../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query3c.log \"compare -ac\" quit");
@@ -830,7 +830,7 @@
 	
 		// Add some more files and modify others
 		// Use the m flag this time so they have a recent modification time
-		TEST_THAT(::system("tar xzmf testfiles/test3.tgz -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test3.tgz | tar xmf - -C testfiles/") == 0);
 		
 		// Wait and test
 		wait_for_backup_operation();
@@ -1035,7 +1035,7 @@
 	BackupClientCryptoKeys_Setup("testfiles/bbackupd.keys");
 
 	// Initial files
-	TEST_THAT(::system("tar xzf testfiles/test_base.tgz -C testfiles/") == 0);
+	TEST_THAT(::system("gzip -d < testfiles/test_base.tgz | tar xf - -C testfiles/") == 0);
 
 	// Do the tests
 


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 00:22:28 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu,  2 Feb 2006 00:22:28 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r359 - in box/trunk: bin/bbackupd infrastructure
Message-ID: <20060202002228.9E7ED94@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-02 00:22:26 +0000 (Thu, 02 Feb 2006)
New Revision: 359

Modified:
   box/trunk/bin/bbackupd/BackupDaemon.h
   box/trunk/infrastructure/makebuildenv.pl
Log:
Ignore windows sources in lib/win32 on non-windows platforms.

Modified: box/trunk/bin/bbackupd/BackupDaemon.h
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.h	2006-02-01 23:54:29 UTC (rev 358)
+++ box/trunk/bin/bbackupd/BackupDaemon.h	2006-02-02 00:22:26 UTC (rev 359)
@@ -19,7 +19,9 @@
 #include "Socket.h"
 #include "SocketListen.h"
 #include "SocketStream.h"
-#include "WinNamedPipeStream.h"
+#ifdef WIN32
+	#include "WinNamedPipeStream.h"
+#endif
 
 class BackupClientDirectoryRecord;
 class BackupClientContext;

Modified: box/trunk/infrastructure/makebuildenv.pl
===================================================================
--- box/trunk/infrastructure/makebuildenv.pl	2006-02-01 23:54:29 UTC (rev 358)
+++ box/trunk/infrastructure/makebuildenv.pl	2006-02-02 00:22:26 UTC (rev 359)
@@ -38,6 +38,13 @@
 # flags about the environment
 my %env_flags;
 
+my $windows_include_path = "-I../../lib/win32 ";
+if ($target_os ne "mingw32" && $target_os ne "winnt")
+{
+	$windows_include_path = "";
+	$env_flags{'IGNORE_lib/win32'} = 1;
+}
+
 # print "Flag: $_\n" for(keys %env_flags);
 
 # seed autogen code
@@ -447,7 +454,7 @@
 	
 
 	# make include path
-	my $include_paths = "-I../../lib/win32 " .
+	my $include_paths = $windows_include_path .
 		join(' ',map {'-I../../'.$_} @all_deps_for_module);
 
 	# is target a library?


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 01:28:13 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Thu, 02 Feb 2006 01:28:13 +0000
Subject: [Box Backup-dev] COMMIT r359 - in box/trunk: bin/bbackupd
 infrastructure
In-Reply-To: <20060202002228.9E7ED94@s0g0.pems.testserver.co.uk>
References: <20060202002228.9E7ED94@s0g0.pems.testserver.co.uk>
Message-ID: <1138843694.13673.5.camel@avenin.ebourne.me.uk>

On Thu, 2006-02-02 at 00:22 +0000, subversion@fluffy.co.uk wrote:
> Author: martin
> Date: 2006-02-02 00:22:26 +0000 (Thu, 02 Feb 2006)
> New Revision: 359

The clock appears to be an hour out on fluffy.co.uk.

It's 1:26 here and I'm less than 10 minutes walk away from the
meridian. :)

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 09:33:02 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Thu, 2 Feb 2006 09:33:02 +0000
Subject: [Box Backup-dev] Deficiency in test system (was:  Box on Solaris 10 x86)
In-Reply-To: <43E14B29.60401@reedtz.com>
References: <018201c62787$b362e970$0301050a@stenorhem> <43E147DB.8020701@reedtz.com> <01af01c6278a$66dd7f40$0301050a@stenorhem> <43E14B29.60401@reedtz.com>
Message-ID: <24FAB268-7972-4670-B713-00D71F227BD8@fluffy.co.uk>

On 1 Feb 2006, at 23:58, Per Thomsen wrote:
>
> So it was the same (old) bbstored process that kept hanging around
> through about 25 test runs, until I noticed it. After it was gone,
> everything was hunky-dory again.

Perhaps we need to spew out a note about this when running tests. Two  
things it needs to point out

1) Some of the tests are a bit timing dependent, so failure does not  
necessarily mean it hasn't worked.

2) Failure in one daemon based test may stop the next tests from  
running because of bbstored and bbackupd processes kicking around.

1 is hard to fix, given the nature of the thing we're testing,  
although we might want to mark some of the tests as "timing  
dependent" and report their failure separately. However, 2 could be  
fixed by somehow killing off any processes started by the test. I'm  
not sure there's some wonderful cross platform way of finding them  
automatically though.

Ben




From boxbackup-dev@fluffy.co.uk  Thu Feb  2 09:41:01 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Thu, 2 Feb 2006 10:41:01 +0100
Subject: [Box Backup-dev] Deficiency in test system (was:  Box on Solaris 10 x86)
References: <018201c62787$b362e970$0301050a@stenorhem> <43E147DB.8020701@reedtz.com> <01af01c6278a$66dd7f40$0301050a@stenorhem> <43E14B29.60401@reedtz.com> <24FAB268-7972-4670-B713-00D71F227BD8@fluffy.co.uk>
Message-ID: <012e01c627dc$c75a2560$0301050a@stenorhem>

> 2) Failure in one daemon based test may stop the next tests from  running 
> because of bbstored and bbackupd processes kicking around.
...
> dependent" and report their failure separately. However, 2 could be  fixed 
> by somehow killing off any processes started by the test. I'm  not sure 
> there's some wonderful cross platform way of finding them  automatically 
> though.

Just getting a notification that "bbackupd is already running" or
something similar would be of great help. Maybe even the test should
refuse to continue before fixed manually.

I do not know about windows but pkill is not always availble on *nix.
We use something similar to "kill -9 `ps -efa|grep '[e]mgd'|awk '{print 
$2}'"
to kill "emgd" processes, one of our products, from test suite scripts.
Works ok provided you run tests as a non-root user and that user does
not have any other valid "emgd" processes running.

Stefan


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 11:52:32 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Thu, 2 Feb 2006 12:52:32 +0100
Subject: [Box Backup-dev] Box on Solaris 10 x86
References: <018201c62787$b362e970$0301050a@stenorhem> <1138838004.13630.3.camel@avenin.ebourne.me.uk>
Message-ID: <01ee01c627ef$26e75680$0301050a@stenorhem>

This is a multi-part message in MIME format.

------=_NextPart_000_01EB_01C627F7.88511B60
Content-Type: text/plain;
	format=flowed;
	charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit

>> Well, it compiles with one additional change:
>>
>> Include file asm/byteorder.h is present but the
>>
>> #define box_hton64(x) __cpu_to_be64(x)
>> #define box_ntoh64(x) __be64_to_cpu(x)
>>
>> does not work.
>>
>> __cpu_to_be64 and __be64_to_cpu cannot be found when linking.
>
> That somewhat implies that the functions are there and are valid, but we
> are missing a library or something. Any clues anywhere for a 64 bit byte
> swapping function? Or what library these might be in?

It fails when compiling not linking, sorry for for the confusion.

Anymay when I take away that part, compilation and linking works
from trunk now. However, all tests but 4 "bbackupd" tests fail:

FAILURE: Condition [compareReturnValue == 1*256] failed at 
testbbackupd.cpp(838)
FAILURE: Condition [compareReturnValue == 1*256] failed at 
testbbackupd.cpp(846)
FAILURE: Condition [compareReturnValue == 1*256] failed at 
testbbackupd.cpp(850)
FAILURE: Condition [compareReturnValue == 1*256] failed at 
testbbackupd.cpp(860)

Output attached. This is on Solaris 10 x86.

Stefan

------=_NextPart_000_01EB_01C627F7.88511B60
Content-Type: application/octet-stream;
	name="runtest-bbackupd-debug.txt.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="runtest-bbackupd-debug.txt.gz"

[encoded data, 5390 characters]
2B9bcOhwAAA=

------=_NextPart_000_01EB_01C627F7.88511B60--


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 20:36:12 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu,  2 Feb 2006 20:36:12 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r360 - box/chris/win32
Message-ID: <20060202203612.8EDB494@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-02 20:36:09 +0000 (Thu, 02 Feb 2006)
New Revision: 360

Added:
   box/chris/win32/lecklider-fixes/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/lecklider-fixes
- Created a branch to implement Charles Lecklider's suggested fixes


Copied: box/chris/win32/lecklider-fixes (from rev 359, box/trunk)


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 20:39:37 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu,  2 Feb 2006 20:39:37 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r361 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060202203937.0C28094@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-02 20:39:36 +0000 (Thu, 02 Feb 2006)
New Revision: 361

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
Log:
* bin/bbackupd/BackupDaemon.cpp
- Microsoft's VC compiler does not recognise #warning


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-02 20:36:09 UTC (rev 360)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-02 20:39:36 UTC (rev 361)
@@ -1700,7 +1700,9 @@
 	char newStateSize = sprintf(newState, "state %d\n", State);
 
 #ifdef WIN32
-	#warning FIX ME: race condition
+	#ifndef _MSC_VER
+		#warning FIX ME: race condition
+	#endif
 
 	// what happens if the socket is closed by the other thread before
 	// we can write to it? Null pointer deref at best.


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 22:47:37 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 2 Feb 2006 22:47:37 +0000 (GMT)
Subject: [Box Backup-dev] Win32 dist, bb-save-state merged, MSVC files?
 (was: COMMIT r348 - in box/chris/bb-save-state: . bin/bbackupd lib/common
 lib/server)
In-Reply-To: <9506006B-3EE4-4625-A694-D17E1F29445E@fluffy.co.uk>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk>
 <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk>
 <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com>
 <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk>
 <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com>
 <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk>
 <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com>
 <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk>
 <1138652704.6319.9.camel@avenin.ebourne.me.uk> <9506006B-3EE4-4625-A694-D17E1F29445E@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602022242310.14656@top.qwarx.com>

Hi Ben,

> Now, where are these new MSVC project files? If they're easy to get out 
> (which I'm not sure they are on their own) then let's get them in. It 
> may just be easier if Chris just checks them into trunk. If only the 
> Win32 project files are touched, then I have no problems whatsoever.

Sorry, I know I'm a bit late, as I thought I would be (it's been a busy 
week).

You can find just those files at 
[http://bbdev.fluffy.co.uk/svn/box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/], 
but it's not enough to make Box compile on MSVC by itself. I'm working on 
cleaning up the whole vc2005-compile-fixes branch so that it can be 
approved for merging, I hope.

> What Win32 files should I include in the release candidate?

All these, and everything in lib/win32 and test/win32, please.

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 |


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 23:38:20 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 2 Feb 2006 23:38:20 +0000 (GMT)
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <47A7E19F-4518-4160-A1E4-9FCECAF3797E@fluffy.co.uk>
References: <47A7E19F-4518-4160-A1E4-9FCECAF3797E@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602022331480.14656@top.qwarx.com>

Hi Ben,

> The current release candidate doesn't have the Win32 build environment 
> in it, and I'm lead to believe the stuff in trunk is old anyway.

I'm confused - there are two Win32 build environments, MinGW and Visual 
C++. The last release was built from trunk (with a few patches which were 
subsequently merged) using MinGW, and seems to have worked well. Visual 
C++ support, however, is not in trunk yet.

> I don't have the necessary stuff to test or do anything with the Win32 
> side of things, so perhaps someone would like to set things up so that 
> it's easy to build from the distribution archive?

I will do my best, but I'm not a huge fan of Visual C++.

> I suggest...
>
>   http://bbdev.fluffy.co.uk/svn/box/chris/win32/vc2005-compile- 
> fixes/infrastructure/msvc/
>
> goes into trunk, or something like it.

Yes please.

> Add
>
>  distribution/boxbackup/WIN32.txt
>
> and write some notes which explain how to build on win32, with all the 
> various variants (which is Cygwin, Native with MinGW, Native with MSVC).

There are already some notes in trunk/docs/backup which describe how to 
build with MinGW on Windows and MinGW on Linux. I've yet to write up how 
to build with MSVC, except on the Wiki, but the text of that page could 
probably be copied into a text file reasonably easily.

> Clean up trunk/ -- there's a few bits there which look Win32-ish.

Please point them out - I'm working on removing #ifdef WIN32 where I can, 
but we don't have a platform define for it yet, and some things seem to 
make more sense as being conditional on WIN32 rather than conditional on a 
particular compiler.

> What's win32.bat? If it's important, add it to 
> DISTRIBUTION-MANIFEST.txt, as it won't get copied by default. It implies 
> it's for cygwin, is it also relevant to Win32 native?

It's the equivalent of "configure" for win32 msvc, and it's only relevant 
for that platform.

> Now the only thing is that everything is designed to be a generic 
> framework for building files, and all this is terribly Box Backup 
> specific. Given the way MSVC works, I don't think there's much that can 
> be done.

Sorry, I don't understand what you're suggesting should be done (ideally).

> And finally, it'd be nice not to build lib/win32 on non-win32 platforms.

Yes. Should be easy with platforms.txt and ONLY:mingw32.

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 |


From boxbackup-dev@fluffy.co.uk  Thu Feb  2 23:55:02 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Thu, 02 Feb 2006 23:55:02 +0000
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <Pine.LNX.4.62.0602022331480.14656@top.qwarx.com>
References: <47A7E19F-4518-4160-A1E4-9FCECAF3797E@fluffy.co.uk>
 <Pine.LNX.4.62.0602022331480.14656@top.qwarx.com>
Message-ID: <1138924502.15713.34.camel@avenin.ebourne.me.uk>

On Thu, 2006-02-02 at 23:38 +0000, Chris Wilson wrote:
> I'm confused - there are two Win32 build environments, MinGW and Visual 
> C++. The last release was built from trunk (with a few patches which were 
> subsequently merged) using MinGW, and seems to have worked well. Visual 
> C++ support, however, is not in trunk yet.

Does the mingw build use the same build system as the unix platforms -
are the extra build hacks only for msvc? If so and it produces a working
win32 binary then is there any reason to support two platforms for
win32?

Maintaining two completely separate build systems is a bad idea and a
long term maintenance headache, especially because unix developers
cannot change the windows one. We should only do it if we have to.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 00:03:25 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Fri, 3 Feb 2006 00:03:25 +0000 (GMT)
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <1138924502.15713.34.camel@avenin.ebourne.me.uk>
References: <47A7E19F-4518-4160-A1E4-9FCECAF3797E@fluffy.co.uk>
 <Pine.LNX.4.62.0602022331480.14656@top.qwarx.com> <1138924502.15713.34.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602022359520.14656@top.qwarx.com>

Hi Martin,

> Does the mingw build use the same build system as the unix platforms - 
> are the extra build hacks only for msvc?

Yes, that's right.

> If so and it produces a working win32 binary then is there any reason to 
> support two platforms for win32?

Only that the MinGW build requires Cygwin, which some developers are 
opposed to or just not used to. If we drop support for MSVC and Cygwin 
then we will likely lose the support of Nick and Charles.

> Maintaining two completely separate build systems is a bad idea and a 
> long term maintenance headache, especially because unix developers 
> cannot change the windows one. We should only do it if we have to.

Perhaps we can find a way to auto-generate win32.bat and the MSVC 
project files at release time? If so, and we can react appropriately to 
bug reports from MSVC users, then it doesn't look so bad to me.

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 |


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 00:09:04 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Thu, 2 Feb 2006 16:09:04 -0800 (PST)
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <Pine.LNX.4.62.0602022331480.14656@top.qwarx.com>
Message-ID: <20060203000904.63597.qmail@web36708.mail.mud.yahoo.com>

> subsequently merged) using MinGW, and seems to have worked well. Visual 
> C++ support, however, is not in trunk yet.

Considering the fact that Visual Studio 2005 Express is free, and the the prevailing platform for
Windows development, I think long-term it would be beneficial for Box to fully support Visual
Studio 2005 (new developers, ease of debugging, etc.)

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Fri Feb  3 00:13:31 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Thu, 2 Feb 2006 16:13:31 -0800 (PST)
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <Pine.LNX.4.62.0602022359520.14656@top.qwarx.com>
Message-ID: <20060203001331.22171.qmail@web36707.mail.mud.yahoo.com>

> Only that the MinGW build requires Cygwin, which some developers are 
> opposed to or just not used to.

Running Box under Cygwin is more of a Windows hack, rather than true [Windows] platform support. I
understand Cygwin was introduced at all in 0.9, because a Windows port has not been completed. Now
that we have Nick's code, I think we should take advantage of it, and build native Windows with
VS2K5.

What is the state of the native Windows version/build system?

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Fri Feb  3 00:29:06 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Fri, 3 Feb 2006 00:29:06 +0000 (GMT)
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <20060203001331.22171.qmail@web36707.mail.mud.yahoo.com>
References: <20060203001331.22171.qmail@web36707.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602030023130.14656@top.qwarx.com>

Hi Gary,

> Running Box under Cygwin is more of a Windows hack, rather than true 
> [Windows] platform support. I understand Cygwin was introduced at all in 
> 0.9, because a Windows port has not been completed. Now that we have 
> Nick's code, I think we should take advantage of it, and build native 
> Windows with VS2K5.

That's not what I meant. Building Box with MinGW (on Windows) requires 
Cygwin, but you don't need Cygwin to run it - it's a native build. That 
build process uses autoconf and Makefiles, and it seems unlikely that it 
could work without Cygwin, or else having been pre-run on a Unix box 
before distribution of the sources. Maybe MSYS is another option, I 
haven't tested it.

Personally, I do not want to distribute binaries built with VS2005 because 
it's a right royal pain in the posterior. Microsoft have just created a 
whole new kind of DLL hell, just for us. Fortunately, MiNGW allows me to 
escape this and distribute usable DLLs.

> What is the state of the native Windows version/build system?

I have built Box on VS2005, but it requires patches which are not yet in 
trunk (use /svn/box/chris/win32/vc2005-compile-fixes). It also requires an 
ugly hack of running a batch file (win32.bat) instead of "configure", and 
that batch file is not currently maintained and may go out of date, as 
Martin pointed out. I think we should try to auto-generate the VS2005 
project files and win32.bat as part of the release process.

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 |


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 00:44:14 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 00:44:14 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r362 - in box/trunk: . infrastructure infrastructure/m4 lib/common
Message-ID: <20060203004414.50F6D94@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-03 00:44:12 +0000 (Fri, 03 Feb 2006)
New Revision: 362

Added:
   box/trunk/infrastructure/m4/ax_bswap64.m4
Modified:
   box/trunk/configure.ac
   box/trunk/infrastructure/makebuildenv.pl
   box/trunk/lib/common/Box.h
Log:
Beef up configure checks for 64 bit endian swapping function.

NOTE: Needs testing on other platforms, especially BSD.

Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2006-02-02 20:39:36 UTC (rev 361)
+++ box/trunk/configure.ac	2006-02-03 00:44:12 UTC (rev 362)
@@ -77,9 +77,8 @@
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([execinfo.h regex.h signal.h syslog.h time.h])
-AC_CHECK_HEADERS([asm/byteorder.h])
 AC_CHECK_HEADERS([netinet/in.h])
-AC_CHECK_HEADERS([sys/endian.h sys/param.h sys/types.h sys/wait.h sys/xattr.h sys/time.h])
+AC_CHECK_HEADERS([sys/param.h sys/types.h sys/wait.h sys/xattr.h sys/time.h])
 
 
 ### Checks for typedefs, structures, and compiler characteristics.
@@ -109,6 +108,9 @@
 AC_SYS_LARGEFILE
 AX_CHECK_LLONG_MINMAX
 AX_CHECK_DEFINE_PRAGMA
+if test "x$ac_cv_c_bigendian" != "xyes"; then
+  AX_BSWAP64
+fi
 if test "$target_os" != "mingw32"; then
   AX_RANDOM_DEVICE
 fi

Added: box/trunk/infrastructure/m4/ax_bswap64.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_bswap64.m4	2006-02-02 20:39:36 UTC (rev 361)
+++ box/trunk/infrastructure/m4/ax_bswap64.m4	2006-02-03 00:44:12 UTC (rev 362)
@@ -0,0 +1,52 @@
+dnl @synopsis AX_BSWAP64
+dnl
+dnl This macro will check for a built in way of endian reversing an int64_t.
+dnl If one is found then HAVE_BSWAP64 is set to 1 and BSWAP64 will be defined
+dnl to the name of the endian swap function.
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2006/02/02
+dnl @license AllPermissive
+
+AC_DEFUN([AX_BSWAP64], [
+  bswap64_function=""
+  AC_CHECK_HEADERS([sys/endian.h asm/byteorder.h])
+  if test "x$ac_cv_header_sys_endian_h" = "xyes"; then
+    AC_CACHE_CHECK([for htobe64], [have_htobe64],
+      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+          $ac_includes_default
+          #include <sys/endian.h>
+          ]], [[
+          htobe64(0);
+          return 1;
+        ]])],
+        [have_htobe64=yes], [have_htobe64=no]
+      )])
+    if test "x$have_htobe64" = "xyes"; then
+      bswap64_function=htobe64
+    fi
+  fi
+  if test "x$bswap64_function" = "x" && \
+     test "x$ac_cv_header_asm_byteorder_h" = "xyes"; then
+    AC_CACHE_CHECK([for __cpu_to_be64], [have___cpu_to_be64],
+      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+          $ac_includes_default
+          #include <asm/byteorder.h>
+          ]], [[
+          __cpu_to_be64(0);
+          return 1;
+        ]])],
+        [have___cpu_to_be64=yes], [have___cpu_to_be64=no]
+      )])
+    if test "x$have___cpu_to_be64" = "xyes"; then
+      bswap64_function=__cpu_to_be64
+    fi
+  fi
+
+  if test "x$bswap64_function" != "x"; then
+    AC_DEFINE([HAVE_BSWAP64], 1,
+              [Define to 1 if BSWAP64 is defined to the name of a valid 64 bit endian swapping function])
+    AC_DEFINE_UNQUOTED([BSWAP64], [$bswap64_function], [Name of the 64 bit endian swapping function])
+  fi
+  ])dnl

Modified: box/trunk/infrastructure/makebuildenv.pl
===================================================================
--- box/trunk/infrastructure/makebuildenv.pl	2006-02-02 20:39:36 UTC (rev 361)
+++ box/trunk/infrastructure/makebuildenv.pl	2006-02-03 00:44:12 UTC (rev 362)
@@ -350,8 +350,8 @@
 {
 	opendir DIR,$mod;
 	for my $h (grep /\.h\Z/i, readdir DIR)
-	{	
-		next if /\A\._/;	# Temp Mac OS Resource hack
+	{
+		next if $h =~ /\A\./;		# Ignore Mac resource forks, autosaves, etc
 
 		open FL,"$mod/$h" or die "can't open $mod/$h";
 		my $f;

Modified: box/trunk/lib/common/Box.h
===================================================================
--- box/trunk/lib/common/Box.h	2006-02-02 20:39:36 UTC (rev 361)
+++ box/trunk/lib/common/Box.h	2006-02-03 00:44:12 UTC (rev 362)
@@ -134,21 +134,19 @@
 #ifdef WORDS_BIGENDIAN
 	#define box_hton64(x) (x)
 	#define box_ntoh64(x) (x)
-#else
+#elif defined(HAVE_BSWAP64)
 	#ifdef HAVE_SYS_ENDIAN_H
 		#include <sys/endian.h>
-		// betoh64 (OpenBSD) is sometimes called be64toh (FreeBSD, NetBSD).
-		// Rather than check for it just reuse htobe64 since they are symmetrical
-		#define box_hton64(x) htobe64(x)
-		#define box_ntoh64(x) htobe64(x)
-	#elif HAVE_ASM_BYTEORDER_H
+	#endif
+	#ifdef HAVE_ASM_BYTEORDER_H
 		#include <asm/byteorder.h>
-		#define box_hton64(x) __cpu_to_be64(x)
-		#define box_ntoh64(x) __be64_to_cpu(x)
-	#else
-		#define box_hton64(x) box_swap64(x)
-		#define box_ntoh64(x) box_swap64(x)
 	#endif
+
+	#define box_hton64(x) BSWAP64(x)
+	#define box_ntoh64(x) BSWAP64(x)
+#else
+	#define box_hton64(x) box_swap64(x)
+	#define box_ntoh64(x) box_swap64(x)
 #endif
 
 #endif // BOX__H


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 01:18:06 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Thu, 2 Feb 2006 17:18:06 -0800 (PST)
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <Pine.LNX.4.62.0602030023130.14656@top.qwarx.com>
Message-ID: <20060203011806.39535.qmail@web36706.mail.mud.yahoo.com>

Chris,

> That's not what I meant. Building Box with MinGW (on Windows) requires 
> Cygwin, but you don't need Cygwin to run it - it's a native build.

Ahhh, I see now, sorry. So this is native MinGW vs. native VS2K5.

> Martin pointed out. I think we should try to auto-generate the VS2005 
> project files and win32.bat as part of the release process.

How about auto-generating some kind of a VS2K5 preprocessor file, and relying on "manual" VS2K5
project file creation? Would be much less work, and would still allow for VS2K5-only builds. VS2K5
is way easier to work with when it comes to debugging, etc. than any other complier...

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Fri Feb  3 01:40:36 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Fri, 03 Feb 2006 01:40:36 +0000
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <Pine.LNX.4.62.0602022359520.14656@top.qwarx.com>
References: <47A7E19F-4518-4160-A1E4-9FCECAF3797E@fluffy.co.uk>
 <Pine.LNX.4.62.0602022331480.14656@top.qwarx.com>
 <1138924502.15713.34.camel@avenin.ebourne.me.uk>
 <Pine.LNX.4.62.0602022359520.14656@top.qwarx.com>
Message-ID: <1138930836.15713.46.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-03 at 00:03 +0000, Chris Wilson wrote:
> > Does the mingw build use the same build system as the unix platforms - 
> > are the extra build hacks only for msvc?
> 
> Yes, that's right.
> 
> > If so and it produces a working win32 binary then is there any reason to 
> > support two platforms for win32?
> 
> Only that the MinGW build requires Cygwin, which some developers are 
> opposed to or just not used to. If we drop support for MSVC and Cygwin 
> then we will likely lose the support of Nick and Charles.

Nick seemed in favour of building native win32 binaries under cygwin
when it was discussed before:

http://lists.warhead.org.uk/pipermail/boxbackup/2004-December/000956.html

Of course, he has the right to change his mind. :)

The message seems to have not been threaded properly, but it started
here:

http://lists.warhead.org.uk/pipermail/boxbackup/2004-December/000901.html

Building under the current system using cygwin doesn't even require
mingw - you can also build using VC as discussed in the thread.

As to requiring cygwin, you don't need the whole thing, only 4-5
packages which is not too onerous. Compared to the pain of two totally
independent build systems this seems to make good sense.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 07:45:15 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Fri, 3 Feb 2006 08:45:15 +0100
Subject: [Box Backup-dev] make clean
Message-ID: <007901c62895$c5ad60b0$1601060a@cs>

This is a multi-part message in MIME format.

------=_NextPart_000_0076_01C6289E.272A3860
Content-Type: text/plain;
	charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

"make clean" from top-level only deletes packages and not
object files... I find this a bit confusing sometimes (I am very
easily confused). :-)

Stefan

------=_NextPart_000_0076_01C6289E.272A3860
Content-Type: text/html;
	charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.2900.2769" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>"make clean" from top-level only =
deletes packages=20
and </FONT><FONT face=3DArial size=3D2>not</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>object files... I find this a bit =
confusing=20
sometimes (I am very</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>easily confused). :-)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Stefan</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0076_01C6289E.272A3860--


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 09:27:57 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Fri, 3 Feb 2006 09:27:57 +0000 (GMT)
Subject: [Box Backup-dev] make clean
In-Reply-To: <007901c62895$c5ad60b0$1601060a@cs>
References: <007901c62895$c5ad60b0$1601060a@cs>
Message-ID: <Pine.LNX.4.62.0602030923210.14656@top.qwarx.com>

Hi Stefan,

> "make clean" from top-level only deletes packages and not
> object files... I find this a bit confusing sometimes (I am very
> easily confused). :-)

I agree that "make clean" should be fixed. I have a patch in the Boxi tree 
that does this; basically it does:

 	find . -name '*.o'   | xargs -r rm
 	find . -name '*.a'   | xargs -r rm

But now that I think about it, it would probably be better to do:

 	find release -type f | xargs -r rm
 	find debug   -type f | xargs -r rm

Or even to wipe out the release and debug trees, and recreate them.

However, if we did this, it would no longer be possible to use "make" to 
do an incremental rebuild of box, because "make" fails if the parcels 
already exist, and "make clean" is the only target that just removes them 
(and not the built object files). I think that "make all" should not die 
if the parcels already exist, but delete or overwrite them.

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 |


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 09:45:58 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 3 Feb 2006 09:45:58 +0000
Subject: [Box Backup-dev] make clean
In-Reply-To: <Pine.LNX.4.62.0602030923210.14656@top.qwarx.com>
References: <007901c62895$c5ad60b0$1601060a@cs> <Pine.LNX.4.62.0602030923210.14656@top.qwarx.com>
Message-ID: <FAAD7550-258C-4C6B-B015-703A683AD4E9@fluffy.co.uk>

On 3 Feb 2006, at 09:27, Chris Wilson wrote:

> Hi Stefan,
>
>> "make clean" from top-level only deletes packages and not
>> object files... I find this a bit confusing sometimes (I am very
>> easily confused). :-)
>
> I agree that "make clean" should be fixed. I have a patch in the  
> Boxi tree that does this; basically it does:
>
> 	find . -name '*.o'   | xargs -r rm
> 	find . -name '*.a'   | xargs -r rm
>
> But now that I think about it, it would probably be better to do:
>
> 	find release -type f | xargs -r rm
> 	find debug   -type f | xargs -r rm
>
> Or even to wipe out the release and debug trees, and recreate them.
>
> However, if we did this, it would no longer be possible to use  
> "make" to do an incremental rebuild of box, because "make" fails if  
> the parcels already exist, and "make clean" is the only target that  
> just removes them (and not the built object files). I think that  
> "make all" should not die if the parcels already exist, but delete  
> or overwrite them.

I never use make in the top level while developing. If you make in a  
test/* directory, it all works as you need. make in the top level is  
really just for people compiling it ready to actually use.

Ben




From boxbackup-dev@fluffy.co.uk  Fri Feb  3 09:47:59 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Fri, 3 Feb 2006 10:47:59 +0100
Subject: [Box Backup-dev] make clean
References: <007901c62895$c5ad60b0$1601060a@cs> <Pine.LNX.4.62.0602030923210.14656@top.qwarx.com>
Message-ID: <017e01c628a6$eaa79050$1601060a@cs>

> However, if we did this, it would no longer be possible to use "make" to 
> do an incremental rebuild of box, because "make" fails if the parcels 
> already exist, and "make clean" is the only target that just removes them 
> (and not the built object files). I think that "make all" should not die 
> if the parcels already exist, but delete or overwrite them.

Yeah, I just realize that the patch Martin committed for me that checks
if the parcel directory exists before creating it in fact confuses things a 
bit
since then a "make" will be return silently even if source files have 
changed.
Before an error message was generated "reminding" you to run "make clean"
first and then changed files were compiled...

However, the underlying problem seems to be the whole chain of
dependencies may need some rework...?

Stefan


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 09:49:24 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Fri, 3 Feb 2006 10:49:24 +0100
Subject: [Box Backup-dev] make clean
References: <007901c62895$c5ad60b0$1601060a@cs> <Pine.LNX.4.62.0602030923210.14656@top.qwarx.com> <FAAD7550-258C-4C6B-B015-703A683AD4E9@fluffy.co.uk>
Message-ID: <018101c628a7$1d51fe00$1601060a@cs>

>> However, if we did this, it would no longer be possible to use  
>> "make" to do an incremental rebuild of box, because "make" fails if  
>> the parcels already exist, and "make clean" is the only target that  
>> just removes them (and not the built object files). I think that  
>> "make all" should not die if the parcels already exist, but delete  
>> or overwrite them.
> 
> I never use make in the top level while developing. If you make in a  
> test/* directory, it all works as you need. make in the top level is  
> really just for people compiling it ready to actually use.

Haha (I saw this post 2 secs too late)... people like me, then... ;-)


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 09:59:55 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 3 Feb 2006 09:59:55 +0000
Subject: [Box Backup-dev] Win32 build
In-Reply-To: <Pine.LNX.4.62.0602022331480.14656@top.qwarx.com>
References: <47A7E19F-4518-4160-A1E4-9FCECAF3797E@fluffy.co.uk> <Pine.LNX.4.62.0602022331480.14656@top.qwarx.com>
Message-ID: <83367A48-1C05-471D-B601-D948CE347216@fluffy.co.uk>

On 2 Feb 2006, at 23:38, Chris Wilson wrote:

>> Add
>>
>>  distribution/boxbackup/WIN32.txt
>>
>> and write some notes which explain how to build on win32, with all  
>> the various variants (which is Cygwin, Native with MinGW, Native  
>> with MSVC).
>
> There are already some notes in trunk/docs/backup which describe  
> how to build with MinGW on Windows and MinGW on Linux. I've yet to  
> write up how to build with MSVC, except on the Wiki, but the text  
> of that page could probably be copied into a text file reasonably  
> easily.

Sorry, missed those. Since it's so different for Win32 users, it  
perhaps this file should live in the root?

>
>> Clean up trunk/ -- there's a few bits there which look Win32-ish.
>
> Please point them out - I'm working on removing #ifdef WIN32 where  
> I can, but we don't have a platform define for it yet, and some  
> things seem to make more sense as being conditional on WIN32 rather  
> than conditional on a particular compiler.

bbackupctl.vcproj
bbackupd.vcproj
boxbackup.sln
boxbackup.suo
boxquery.vcproj
common.vcproj
win32test.vcproj

>
>> What's win32.bat? If it's important, add it to DISTRIBUTION- 
>> MANIFEST.txt, as it won't get copied by default. It implies it's  
>> for cygwin, is it also relevant to Win32 native?
>
> It's the equivalent of "configure" for win32 msvc, and it's only  
> relevant for that platform.

OK.

Looks like we could auto-generate it on creation of the distribution  
archive by scanning the Makefiles for directives.

>
>> Now the only thing is that everything is designed to be a generic  
>> framework for building files, and all this is terribly Box Backup  
>> specific. Given the way MSVC works, I don't think there's much  
>> that can be done.
>
> Sorry, I don't understand what you're suggesting should be done  
> (ideally).

I build other things using this framework. The Win32 stuff is all  
very Box Backup specific.

>
>> And finally, it'd be nice not to build lib/win32 on non-win32  
>> platforms.
>
> Yes. Should be easy with platforms.txt and ONLY:mingw32.

Martin has committed some changes to makebuildev.pl which do the  
trick. It needed to be a bit more clever because of the way things  
were structured.

Ben




From boxbackup-dev@fluffy.co.uk  Fri Feb  3 10:26:30 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 10:26:30 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r363 - in box/trunk/distribution: . boxbackup
Message-ID: <20060203102630.55A5894@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-03 10:26:29 +0000 (Fri, 03 Feb 2006)
New Revision: 363

Modified:
   box/trunk/distribution/COMMON-MANIFEST.txt
   box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
Log:
Include all the right win32 directories in distributions

Modified: box/trunk/distribution/COMMON-MANIFEST.txt
===================================================================
--- box/trunk/distribution/COMMON-MANIFEST.txt	2006-02-03 00:44:12 UTC (rev 362)
+++ box/trunk/distribution/COMMON-MANIFEST.txt	2006-02-03 10:26:29 UTC (rev 363)
@@ -3,12 +3,14 @@
 lib/crypto
 lib/server
 lib/compress
+lib/win32
 test/common
 test/common/testfiles
 test/basicserver
 test/basicserver/testfiles
 test/crypto
 test/compress
+test/win32
 docs/common notes
 docs/common/lib_common notes/lib_common
 docs/common/lib_crypto notes/lib_crypto

Modified: box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
===================================================================
--- box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt	2006-02-03 00:44:12 UTC (rev 362)
+++ box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt	2006-02-03 10:26:29 UTC (rev 363)
@@ -3,7 +3,6 @@
 test/raidfile/testfiles
 lib/backupclient
 lib/backupstore
-lib/win32
 bin/bbstored
 bin/bbstoreaccounts
 bin/bbackupd


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 10:28:20 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 3 Feb 2006 10:28:20 +0000
Subject: [Box Backup-dev] Win32 dist, bb-save-state merged, MSVC files? (was: COMMIT r348 - in box/chris/bb-save-state: . bin/bbackupd lib/common lib/server)
In-Reply-To: <Pine.LNX.4.62.0602022242310.14656@top.qwarx.com>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk> <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk> <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com> <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk> <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com> <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk> <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com> <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk> <1138652704.6319.9.camel@avenin.ebourne.me.uk> <9506006B-3EE4-4625-A694-D17E1F29445E@fluffy.co.uk> <Pine.LNX.4.62.0602022242310.14656@top.qwarx.com>
Message-ID: <F5ACB299-5E3D-437C-9549-21092860A213@fluffy.co.uk>

On 2 Feb 2006, at 22:47, Chris Wilson wrote:

> Hi Ben,
>
>> Now, where are these new MSVC project files? If they're easy to  
>> get out (which I'm not sure they are on their own) then let's get  
>> them in. It may just be easier if Chris just checks them into  
>> trunk. If only the Win32 project files are touched, then I have no  
>> problems whatsoever.
>
> Sorry, I know I'm a bit late, as I thought I would be (it's been a  
> busy week).
>
> You can find just those files at [http://bbdev.fluffy.co.uk/svn/box/ 
> chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/], but  
> it's not enough to make Box compile on MSVC by itself. I'm working  
> on cleaning up the whole vc2005-compile-fixes branch so that it can  
> be approved for merging, I hope.

Great, thanks.

>
>> What Win32 files should I include in the release candidate?
>
> All these, and everything in lib/win32 and test/win32, please.

I've adjusted how lib/win32 and test/win32 are included.

On a related note, is this relevant and in the right place?

   http://bbdev.fluffy.co.uk/svn/box/trunk/bin/bbackupd/win32/

I can't think of a totally convincing place for it, but contrib and  
infrastructure seem better to me.

Ben





From boxbackup-dev@fluffy.co.uk  Fri Feb  3 19:59:07 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 19:59:07 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r364 - in box/chris/win32/vc2005-compile-fixes: bin/bbackupctl bin/bbackupd lib/backupclient lib/common lib/server lib/win32 test/win32
Message-ID: <20060203195907.CA39194@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 19:58:38 +0000 (Fri, 03 Feb 2006)
New Revision: 364

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupctl/bbackupctl.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientFileAttributes.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientRestore.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.h
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.h
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCmbDiff.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCmbIdx.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCombine.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileEncodeStream.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileRevDiff.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilename.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilenameClear.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/BoxTimeToUnix.h
   box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.h
   box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h
   box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/Guards.h
   box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.h
   box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/Test.h
   box/chris/win32/vc2005-compile-fixes/lib/common/Utils.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/WaitForEvent.cpp
   box/chris/win32/vc2005-compile-fixes/lib/server/Protocol.cpp
   box/chris/win32/vc2005-compile-fixes/lib/server/Protocol.h
   box/chris/win32/vc2005-compile-fixes/lib/server/SocketStream.cpp
   box/chris/win32/vc2005-compile-fixes/lib/server/SocketStreamTLS.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/test/win32/testlibwin32.cpp
Log:
* test/win32/testlibwin32.cpp
- Include emulation header
- Rename _chdir back to chdir, since emu.h #defines the new to the old

* lib/win32/emu.cpp
- Moved '#include <process.h>' to sit next to unistd.h
- Improved comment formatting
- Renamed tTimer to Timer_t

* lib/backupclient/BackupClientRestore.cpp
* lib/backupclient/BackupStoreFileDiff.cpp
* lib/backupclient/BackupClientFileAttributes.cpp
* lib/backupclient/BackupStoreFileEncodeStream.cpp
* lib/backupclient/BackupStoreDirectory.h
* lib/backupclient/BackupStoreFileCombine.cpp
* lib/backupclient/BackupStoreFile.cpp
* lib/backupclient/BackupStoreFilename.cpp
* lib/backupclient/BackupStoreFilenameClear.cpp
* lib/backupclient/BackupStoreFileCmbDiff.cpp
* lib/backupclient/BackupStoreDirectory.cpp
* lib/backupclient/BackupStoreFileCmbIdx.cpp
* lib/backupclient/BackupStoreFile.h
* lib/backupclient/BackupStoreFileRevDiff.cpp
* lib/server/Protocol.cpp
* lib/server/SocketStream.cpp
* lib/server/Protocol.h
* lib/server/SocketStreamTLS.cpp
* lib/common/ReadGatherStream.cpp
* lib/common/IOStreamGetLine.cpp
* lib/common/FdGetLine.cpp
* lib/common/MemBlockStream.h
* lib/common/WaitForEvent.cpp
* lib/common/CollectInBufferStream.cpp
* lib/common/StreamableMemBlock.cpp
* lib/common/Utils.cpp
* lib/common/MemBlockStream.cpp
* lib/common/CollectInBufferStream.h
* lib/common/ExcludeList.h
* lib/common/BoxTimeToUnix.h
* bin/bbackupctl/bbackupctl.cpp
* bin/bbackupd/BackupClientDirectoryRecord.cpp
* bin/bbackupd/BackupDaemon.cpp
- Undo type changes and type casts
- Undo formatting changes to reduce white space noise

* lib/common/Test.h
* lib/common/Guards.h
- Remove #included "Box.h" from header file as requested by Ben


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupctl/bbackupctl.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupctl/bbackupctl.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -215,7 +215,7 @@
 		// No? Just send the command given plus a quit command.
 		std::string cmd(argv[0]);
 		cmd += "\nquit\n";
-		connection.Write(cmd.c_str(), (int)cmd.size());
+		connection.Write(cmd.c_str(), cmd.size());
 	}
 	
 	// Read the response

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -260,7 +260,7 @@
 				checksum_info.mAttributeModificationTime = FileAttrModificationTime(st);
 				checksum_info.mSize = st.st_size;
 				currentStateChecksum.Add(&checksum_info, sizeof(checksum_info));
-				currentStateChecksum.Add(en->d_name, (int)strlen(en->d_name));
+				currentStateChecksum.Add(en->d_name, strlen(en->d_name));
 				
 				// If the file has been modified madly into the future, download the 
 				// directory record anyway to ensure that it doesn't get uploaded

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -265,7 +265,7 @@
 				conf.GetKeyValueInt("MaxUploadWait"),
 				mState);
 
-			mpCommandSocketInfo->mListeningSocket.Write(summary, (int)summarySize);
+			mpCommandSocketInfo->mListeningSocket.Write(summary, summarySize);
 			mpCommandSocketInfo->mListeningSocket.Write("ping\n", 5);
 
 			IOStreamGetLine readLine(mpCommandSocketInfo->mListeningSocket);
@@ -320,7 +320,7 @@
 				{
 					const char* response = sendOK ? "ok\n" : "error\n";
 					mpCommandSocketInfo->mListeningSocket.Write(
-						response, (int)strlen(response));
+						response, strlen(response));
 				}
 
 				if (disconnect) 
@@ -523,7 +523,7 @@
 					{
 						// No command socket or connection, just do a normal sleep
 						time_t sleepSeconds = BoxTimeToSeconds(requiredDelay);
-						::sleep((unsigned int)((sleepSeconds <= 0)?1:sleepSeconds));
+						::sleep((sleepSeconds <= 0)?1:sleepSeconds);
 					}
 				}
 				
@@ -678,8 +678,7 @@
 				}
 				
 				// Calculate when the next sync run should be
-				nextSyncTime = currentSyncStartTime + updateStoreInterval + 
-					Random::RandomInt((uint32_t)updateStoreInterval >> SYNC_PERIOD_RANDOM_EXTRA_TIME_SHIFT_BY);
+				nextSyncTime = currentSyncStartTime + updateStoreInterval + Random::RandomInt(updateStoreInterval >> SYNC_PERIOD_RANDOM_EXTRA_TIME_SHIFT_BY);
 			
 				// Commit the ID Maps
 				CommitIDMapsAfterSync();

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientFileAttributes.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientFileAttributes.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientFileAttributes.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -632,7 +632,7 @@
 		}
 #endif
 
-		xattrOffset += (int)std::strlen(reinterpret_cast<char*>(pattr+1))+1;
+		xattrOffset += std::strlen(reinterpret_cast<char*>(pattr+1))+1;
 	}
 	
 	// If working as root, set user IDs
@@ -986,7 +986,7 @@
 	MD5Digest digest;
 	digest.Add(&hashData, sizeof(hashData));
 	digest.Add(xattr.GetBuffer(), xattr.GetSize());
-	digest.Add(leafname.c_str(), (int)leafname.size());
+	digest.Add(leafname.c_str(), leafname.size());
 	digest.Add(sAttributeHashSecret, sAttributeHashSecretLength);
 	digest.Finish();
 	

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientRestore.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientRestore.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientRestore.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -104,9 +104,9 @@
 			// ID
 			rWrite.Write(&mNextLevelID, sizeof(mNextLevelID));
 			// Name string
-			std::string::size_type nsize = mNextLevelLocalName.size();
+			int32_t nsize = mNextLevelLocalName.size();
 			rWrite.Write(&nsize, sizeof(nsize));
-			rWrite.Write(mNextLevelLocalName.c_str(), (int)nsize);
+			rWrite.Write(mNextLevelLocalName.c_str(), nsize);
 			// And then the level itself
 			mpNextLevel->SaveLevel(rWrite);
 		}

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -192,7 +192,7 @@
 void BackupStoreDirectory::WriteToStream(IOStream &rStream, int16_t FlagsMustBeSet, int16_t FlagsNotToBeSet, bool StreamAttributes, bool StreamDependencyInfo) const
 {
 	// Get count of entries
-	std::vector<Entry*>::size_type count = mEntries.size();
+	int32_t count = mEntries.size();
 	if(FlagsMustBeSet != Entry::Flags_INCLUDE_EVERYTHING || FlagsNotToBeSet != Entry::Flags_EXCLUDE_NOTHING)
 	{
 		// Need to count the entries
@@ -230,7 +230,7 @@
 	// Build header
 	dir_StreamFormat hdr;
 	hdr.mMagicValue = htonl(OBJECTMAGIC_DIR_MAGIC_VALUE);
-	hdr.mNumEntries = htonl((u_long)count);
+	hdr.mNumEntries = htonl(count);
 	hdr.mObjectID = box_hton64(mObjectID);
 	hdr.mContainerID = box_hton64(mContainerID);
 	hdr.mAttributesModTime = box_hton64(mAttributesModTime);

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -146,8 +146,7 @@
 	int64_t GetRevisionID() const {return mRevisionID;}
 	void SetRevisionID(int64_t RevisionID) {mRevisionID = RevisionID;}
 	
-	unsigned int GetNumberOfEntries() const 
-		{return (unsigned int)mEntries.size();}
+	unsigned int GetNumberOfEntries() const {return mEntries.size();}
 
 	// User info -- not serialised into streams
 	int64_t GetUserInfo1_SizeInBlocks() const {return mUserInfo1;}

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -522,22 +522,21 @@
 	if(mNumBlocks > 0)
 	{
 		// Find the maximum encoded data size
-		uint64_t maxEncodedDataSize = 0;
+		int32_t maxEncodedDataSize = 0;
 		const file_BlockIndexEntry *entry = (file_BlockIndexEntry *)mpBlockIndex;
 		ASSERT(entry != 0);
 		for(int64_t e = 0; e < mNumBlocks; e++)
 		{
 			// Get the clear and encoded size
-			uint64_t encodedSize = box_ntoh64(entry[e].mEncodedSize);
+			int32_t encodedSize = box_ntoh64(entry[e].mEncodedSize);
 			ASSERT(encodedSize > 0);
 			
 			// Larger?
-			if(encodedSize > maxEncodedDataSize) 
-				maxEncodedDataSize = encodedSize;
+			if(encodedSize > maxEncodedDataSize) maxEncodedDataSize = encodedSize;
 		}
 		
 		// Allocate those blocks!
-		mpEncodedData = (uint8_t*)BackupStoreFile::CodingChunkAlloc((int)maxEncodedDataSize + 32);
+		mpEncodedData = (uint8_t*)BackupStoreFile::CodingChunkAlloc(maxEncodedDataSize + 32);
 
 		// Allocate the block for the clear data, using the hint from the header.
 		// If this is wrong, things will exception neatly later on, so it can't be used
@@ -605,15 +604,14 @@
 		int64_t indexSize = sizeof(file_BlockIndexEntry) * mNumBlocks;
 		
 		// Allocate some memory
-		mpBlockIndex = ::malloc((size_t)indexSize);
+		mpBlockIndex = ::malloc(indexSize);
 		if(mpBlockIndex == 0)
 		{
 			throw std::bad_alloc();
 		}
 		
 		// Read it in
-		if(!mrEncodedFile.ReadFullBuffer(mpBlockIndex, (int)indexSize, 
-			0 /* not interested in bytes read if this fails */, mTimeout))
+		if(!mrEncodedFile.ReadFullBuffer(mpBlockIndex, indexSize, 0 /* not interested in bytes read if this fails */, mTimeout))
 		{
 			// Couldn't read header
 			THROW_EXCEPTION(BackupStoreException, WhenDecodingExpectedToReadButCouldnt)
@@ -680,7 +678,7 @@
 		
 			// Get the size from the block index
 			const file_BlockIndexEntry *entry = (file_BlockIndexEntry *)mpBlockIndex;
-			uint64_t encodedSize = box_ntoh64(entry[mCurrentBlock].mEncodedSize);
+			int32_t encodedSize = box_ntoh64(entry[mCurrentBlock].mEncodedSize);
 			if(encodedSize <= 0)
 			{
 				// The caller is attempting to decode a file which is the direct result of a diff
@@ -690,16 +688,14 @@
 			}
 			
 			// Load in next block
-			if(!mrEncodedFile.ReadFullBuffer(mpEncodedData, (int)encodedSize, 
-				0 /* not interested in bytes read if this fails */, mTimeout))
+			if(!mrEncodedFile.ReadFullBuffer(mpEncodedData, encodedSize, 0 /* not interested in bytes read if this fails */, mTimeout))
 			{
 				// Couldn't read header
 				THROW_EXCEPTION(BackupStoreException, WhenDecodingExpectedToReadButCouldnt)
 			}
 			
 			// Decode the data
-			mCurrentBlockClearSize = BackupStoreFile::DecodeChunk(mpEncodedData, 
-				(int)encodedSize, mpClearData, mClearDataSize);
+			mCurrentBlockClearSize = BackupStoreFile::DecodeChunk(mpEncodedData, encodedSize, mpClearData, mClearDataSize);
 
 			// Calculate IV for this entry
 			uint64_t iv = mEntryIVBase;
@@ -938,7 +934,7 @@
 	}
 	
 	// Check alignment of the block
-	ASSERT((((long long)rOutput.mpBuffer) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
+	ASSERT((((uint32_t)(long)rOutput.mpBuffer) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
 
 	// Want to compress it?
 	bool compressChunk = (ChunkSize >= BACKUP_FILE_MIN_COMPRESSED_CHUNK_SIZE);
@@ -1026,7 +1022,7 @@
 int BackupStoreFile::DecodeChunk(const void *Encoded, int EncodedSize, void *Output, int OutputSize)
 {
 	// Check alignment of the encoded block
-	ASSERT((((long long)Encoded) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
+	ASSERT((((uint32_t)(long)Encoded) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
 
 	// First check
 	if(EncodedSize < 1)

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -125,7 +125,7 @@
 		// Align to main block size
 		ASSERT(sizeof(unsigned long) >= sizeof(void*));	// make sure casting the right pointer size
 		uint8_t adjustment = BACKUPSTOREFILE_CODING_BLOCKSIZE
-							  - (uint8_t)(((unsigned long long)a) % BACKUPSTOREFILE_CODING_BLOCKSIZE);
+							  - (uint8_t)(((unsigned long)a) % BACKUPSTOREFILE_CODING_BLOCKSIZE);
 		uint8_t *b = (a + adjustment);
 		// Store adjustment
 		*b = adjustment;
@@ -136,7 +136,7 @@
 	{
 		// Check alignment is as expected
 		ASSERT(sizeof(unsigned long) >= sizeof(void*));	// make sure casting the right pointer size
-		ASSERT((uint8_t)(((unsigned long long)Block) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
+		ASSERT((uint8_t)(((unsigned long)Block) % BACKUPSTOREFILE_CODING_BLOCKSIZE) == BACKUPSTOREFILE_CODING_OFFSET);
 		uint8_t *a = (uint8_t*)Block;
 		a -= BACKUPSTOREFILE_CODING_OFFSET;
 		// Adjust downwards...

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCmbDiff.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCmbDiff.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCmbDiff.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -79,7 +79,7 @@
 	}
 	int64_t diff1NumBlocks = box_ntoh64(diff1IdxHdr.mNumBlocks);
 	// Allocate some memory
-	int64_t *diff1BlockStartPositions = (int64_t*)::malloc(((size_t)diff1NumBlocks + 1) * sizeof(int64_t));
+	int64_t *diff1BlockStartPositions = (int64_t*)::malloc((diff1NumBlocks + 1) * sizeof(int64_t));
 	if(diff1BlockStartPositions == 0)
 	{
 		throw std::bad_alloc();
@@ -201,14 +201,14 @@
 					// Block is in the old diff file, copy it across
 					copyBlock = true;
 					copyFrom = diff1BlockStartPositions[blockIndex];
-					int nb = (int)blockIndex + 1;
+					int nb = blockIndex + 1;
 					while(diff1BlockStartPositions[nb] <= 0)
 					{
 						// This is safe, because the last entry will terminate it properly!
 						++nb;
 						ASSERT(nb <= diff1NumBlocks);
 					}
-					copySize = (int)(diff1BlockStartPositions[nb] - copyFrom);
+					copySize = diff1BlockStartPositions[nb] - copyFrom;
 					fromFileDiff1 = true;
 				}
 			}
@@ -284,7 +284,7 @@
 				if(diff1BlockStartPositions[blockIndex] > 0)
 				{
 					// Block is in the first diff file, stick in size
-					int nb = (int)blockIndex + 1;
+					int nb = blockIndex + 1;
 					while(diff1BlockStartPositions[nb] <= 0)
 					{
 						// This is safe, because the last entry will terminate it properly!

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCmbIdx.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCmbIdx.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCmbIdx.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -174,7 +174,7 @@
 	
 	// Then... allocate memory for the list of sizes
 	mNumEntriesInFromFile = box_ntoh64(fromHdr.mNumBlocks);
-	mFromBlockSizes = (int64_t*)::malloc((size_t)mNumEntriesInFromFile * sizeof(int64_t));
+	mFromBlockSizes = (int64_t*)::malloc(mNumEntriesInFromFile * sizeof(int64_t));
 	if(mFromBlockSizes == 0)
 	{
 		throw std::bad_alloc();
@@ -241,7 +241,7 @@
 	int entriesToWrite = NBytes / sizeof(file_BlockIndexEntry);
 	if(entriesToWrite > mNumEntriesToGo)
 	{
-		entriesToWrite = (int)mNumEntriesToGo;
+		entriesToWrite = mNumEntriesToGo;
 	}
 	
 	// Setup ready to go
@@ -256,7 +256,7 @@
 		}
 		
 		// Does this need adjusting?
-		int s = (int)box_ntoh64(poutput[b].mEncodedSize);
+		int s = box_ntoh64(poutput[b].mEncodedSize);
 		if(s <= 0)
 		{
 			// A reference to a block in the from file

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCombine.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCombine.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileCombine.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -96,7 +96,7 @@
 	// Allocate memory for the block index of the From file
 	int64_t fromNumBlocks = box_ntoh64(fromHdr.mNumBlocks);
 	// NOTE: An extra entry is required so that the length of the last block can be calculated
-	FromIndexEntry *pFromIndex = (FromIndexEntry*)::malloc(((int)fromNumBlocks+1) * sizeof(FromIndexEntry));
+	FromIndexEntry *pFromIndex = (FromIndexEntry*)::malloc((fromNumBlocks+1) * sizeof(FromIndexEntry));
 	if(pFromIndex == 0)
 	{
 		throw std::bad_alloc();
@@ -252,7 +252,7 @@
 			if(encodedSize > 0)
 			{
 				// The block is actually in the diff file
-				blockSize = (int32_t)encodedSize;
+				blockSize = encodedSize;
 			}
 			else
 			{
@@ -264,9 +264,7 @@
 					THROW_EXCEPTION(BackupStoreException, BadBackupStoreFile)
 				}
 				// Calculate size. This operation is safe because of the extra entry at the end
-				blockSize = (int32_t)( 
-					pFromIndex[blockIdx + 1].mFilePosition -
-					pFromIndex[blockIdx].mFilePosition );
+				blockSize = pFromIndex[blockIdx + 1].mFilePosition - pFromIndex[blockIdx].mFilePosition;
 			}
 			ASSERT(blockSize > 0);
 			
@@ -396,9 +394,7 @@
 				THROW_EXCEPTION(BackupStoreException, BadBackupStoreFile)
 			}
 			// Calculate size. This operation is safe because of the extra entry at the end
-			int32_t blockSize = (int32_t)( 
-				pFromIndex[blockIdx + 1].mFilePosition - 
-				pFromIndex[blockIdx].mFilePosition );
+			int32_t blockSize = pFromIndex[blockIdx + 1].mFilePosition - pFromIndex[blockIdx].mFilePosition;
 			// Then replace entry
 			en.mEncodedSize = box_hton64(((uint64_t)blockSize));
 		}

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -317,7 +317,7 @@
 	//TODO: Verify that these sizes look reasonable
 	
 	// Allocate space for the index
-	BlocksAvailableEntry *pindex = (BlocksAvailableEntry*)::malloc(sizeof(BlocksAvailableEntry) * (size_t)numBlocks);
+	BlocksAvailableEntry *pindex = (BlocksAvailableEntry*)::malloc(sizeof(BlocksAvailableEntry) * numBlocks);
 	if(pindex == 0)
 	{
 		throw std::bad_alloc();

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileEncodeStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileEncodeStream.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileEncodeStream.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -270,7 +270,7 @@
 	} while(rBlockSizeOut <= BACKUP_FILE_MAX_BLOCK_SIZE && rNumBlocksOut > BACKUP_FILE_INCREASE_BLOCK_SIZE_AFTER);
 	
 	// Last block size
-	rLastBlockSizeOut = (int32_t)(DataSize - ((rNumBlocksOut - 1) * rBlockSizeOut));
+	rLastBlockSizeOut = DataSize - ((rNumBlocksOut - 1) * rBlockSizeOut);
 	
 	// Avoid small blocks?
 	if(rLastBlockSizeOut < BACKUP_FILE_AVOID_BLOCKS_LESS_THAN
@@ -451,7 +451,7 @@
 	}
 
 	// Index of the first block in old file (being diffed from)
-	int firstIndex = (int)mpRecipe->BlockPtrToIndex((*mpRecipe)[mInstructionNumber].mpStartBlock);
+	int firstIndex = mpRecipe->BlockPtrToIndex((*mpRecipe)[mInstructionNumber].mpStartBlock);
 	
 	int64_t sizeToSkip = 0;
 

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileRevDiff.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileRevDiff.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileRevDiff.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -60,7 +60,7 @@
 	// For each block in the from file, we want to know it's index in the 
 	// diff file. Allocate memory for this information.
 	int64_t fromNumBlocks = box_ntoh64(hdr.mNumBlocks);
-	int64_t *pfromIndexInfo = (int64_t*)::malloc((size_t)fromNumBlocks * sizeof(int64_t));
+	int64_t *pfromIndexInfo = (int64_t*)::malloc(fromNumBlocks * sizeof(int64_t));
 	if(pfromIndexInfo == 0)
 	{
 		throw std::bad_alloc();
@@ -176,21 +176,21 @@
 						bufferSize = 0;
 					}
 					// Allocate new block
-					buffer = ::malloc((size_t)blockSize);
+					buffer = ::malloc(blockSize);
 					if(buffer == 0)
 					{
 						throw std::bad_alloc();
 					}
-					bufferSize = (int)blockSize;
+					bufferSize = blockSize;
 				}
 				ASSERT(bufferSize >= blockSize);
 				
 				// Copy the block
-				if(!rFrom.ReadFullBuffer(buffer, (int)blockSize, 0))
+				if(!rFrom.ReadFullBuffer(buffer, blockSize, 0))
 				{
 					THROW_EXCEPTION(BackupStoreException, FailedToReadBlockOnCombine)
 				}
-				rOut.Write(buffer, (int)blockSize);
+				rOut.Write(buffer, blockSize);
 
 				// Store the size
 				pfromIndexInfo[b] = blockSize;

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilename.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilename.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilename.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -141,7 +141,7 @@
 {
 	CheckValid();
 	
-	rProtocol.Write(c_str(), (int)size());
+	rProtocol.Write(c_str(), size());
 }
 
 // --------------------------------------------------------------------------
@@ -216,7 +216,7 @@
 {
 	CheckValid();
 	
-	rStream.Write(c_str(), (int)size());
+	rStream.Write(c_str(), size());
 }
 
 // --------------------------------------------------------------------------

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilenameClear.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilenameClear.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilenameClear.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -218,7 +218,7 @@
 void BackupStoreFilenameClear::EncryptClear(const std::string &rToEncode, CipherContext &rCipherContext, int StoreAsEncoding)
 {
 	// Work out max size
-	int maxOutSize = rCipherContext.MaxOutSizeForInBufferSize((int)rToEncode.size()) + 4;
+	int maxOutSize = rCipherContext.MaxOutSizeForInBufferSize(rToEncode.size()) + 4;
 	
 	// Make sure encode/decode buffer has enough space
 	if(sEncDecBufferSize < maxOutSize)
@@ -235,7 +235,7 @@
 	MEMLEAKFINDER_NOT_A_LEAK(buffer);
 	
 	// Encode -- do entire block in one go
-	int encSize = rCipherContext.TransformBlock(buffer + 2, sEncDecBufferSize - 2, rToEncode.c_str(), (int)rToEncode.size());
+	int encSize = rCipherContext.TransformBlock(buffer + 2, sEncDecBufferSize - 2, rToEncode.c_str(), rToEncode.size());
 	// and add in header size
 	encSize += 2;
 	
@@ -258,7 +258,7 @@
 void BackupStoreFilenameClear::DecryptEncoded(CipherContext &rCipherContext) const
 {
 	// Work out max size
-	int maxOutSize = rCipherContext.MaxOutSizeForInBufferSize((int)size()) + 4;
+	int maxOutSize = rCipherContext.MaxOutSizeForInBufferSize(size()) + 4;
 	
 	// Make sure encode/decode buffer has enough space
 	if(sEncDecBufferSize < maxOutSize)
@@ -276,7 +276,7 @@
 	
 	// Decrypt
 	const char *str = c_str() + 2;
-	int sizeOut = rCipherContext.TransformBlock(buffer, sEncDecBufferSize, str, (int)size() - 2);
+	int sizeOut = rCipherContext.TransformBlock(buffer, sEncDecBufferSize, str, size() - 2);
 	
 	// Assign to this
 	mClearFilename.assign((char*)buffer, sizeOut);

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/BoxTimeToUnix.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/BoxTimeToUnix.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/BoxTimeToUnix.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -26,7 +26,7 @@
 
 inline void BoxTimeToTimespec(box_time_t Time, struct timespec &tv)
 {
-	tv.tv_sec = (long)(Time / MICRO_SEC_IN_SEC_LL);
+	tv.tv_sec = (time_t)(Time / MICRO_SEC_IN_SEC_LL);
 	tv.tv_nsec = ((long)(Time % MICRO_SEC_IN_SEC_LL)) * NANO_SEC_IN_USEC;
 }
 

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -63,7 +63,7 @@
 	// Adjust to number of bytes left
 	if(NBytes > (mBytesInBuffer - mReadPosition))
 	{
-		NBytes = (int)(mBytesInBuffer - mReadPosition);
+		NBytes = (mBytesInBuffer - mReadPosition);
 	}
 	ASSERT(NBytes >= 0);
 	if(NBytes <= 0) return 0;	// careful now
@@ -157,7 +157,7 @@
 {
 	if(mInWritePhase != false) { THROW_EXCEPTION(CommonException, CollectInBufferStreamNotInCorrectPhase) }
 	
-	pos_type newPos = 0;
+	int newPos = 0;
 	switch(SeekType)
 	{
 	case IOStream::SeekType_Absolute:

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/CollectInBufferStream.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -52,7 +52,7 @@
 	MemoryBlockGuard<char*> mBuffer;
 	int mBufferSize;
 	int mBytesInBuffer;
-	pos_type mReadPosition;
+	int mReadPosition;
 	bool mInWritePhase;
 };
 

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -43,11 +43,10 @@
 	bool IsExcluded(const std::string &rTest) const;
 	
 	// Mainly for tests
-	unsigned int SizeOfDefiniteList() const 
-		{return (unsigned int)mDefinite.size();}
+	unsigned int SizeOfDefiniteList() const {return mDefinite.size();}
 	unsigned int SizeOfRegexList() const
 #ifdef HAVE_REGEX_H
-		{return (unsigned int)mRegex.size();}
+		{return mRegex.size();}
 #else
 		{return 0;}
 #endif

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -154,8 +154,8 @@
 	else
 	{
 		// Check for comment char, but char before must be whitespace
-		int end = 0; // can be negative
-		std::string::size_type size = r.size();
+		int end = 0;
+		int size = r.size();
 		while(end < size)
 		{
 			if(r[end] == '#' && (end == 0 || (iw(r[end-1]))))
@@ -166,7 +166,7 @@
 		}
 		
 		// Remove whitespace
-		int begin = 0; // should be positive, but compared with "end"
+		int begin = 0;
 		while(begin < size && iw(r[begin]))
 		{
 			begin++;

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/Guards.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/Guards.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/Guards.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -11,8 +11,6 @@
 #ifndef GUARDS__H
 #define GUARDS__H
 
-#include "Box.h"
-
 #ifdef HAVE_UNISTD_H
 	#include <unistd.h>
 #endif

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/IOStreamGetLine.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -151,8 +151,8 @@
 	else
 	{
 		// Check for comment char, but char before must be whitespace
-		std::string::size_type end = 0;
-		std::string::size_type size = r.size();
+		int end = 0;
+		int size = r.size();
 		while(end < size)
 		{
 			if(r[end] == '#' && (end == 0 || (iw(r[end-1]))))
@@ -163,7 +163,7 @@
 		}
 		
 		// Remove whitespace
-		std::string::size_type begin = 0;
+		int begin = 0;
 		while(begin < size && iw(r[begin]))
 		{
 			begin++;

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -113,7 +113,7 @@
 	// Adjust to number of bytes left
 	if(NBytes > (mBytesInBuffer - mReadPosition))
 	{
-		NBytes = (int)(mBytesInBuffer - mReadPosition);
+		NBytes = (mBytesInBuffer - mReadPosition);
 	}
 	ASSERT(NBytes >= 0);
 	if(NBytes <= 0) return 0;	// careful now
@@ -175,7 +175,7 @@
 // --------------------------------------------------------------------------
 void MemBlockStream::Seek(pos_type Offset, int SeekType)
 {
-	pos_type newPos = 0;
+	int newPos = 0;
 	switch(SeekType)
 	{
 	case IOStream::SeekType_Absolute:

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/MemBlockStream.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -45,7 +45,7 @@
 private:
 	const char *mpBuffer;
 	int mBytesInBuffer;
-	pos_type mReadPosition;
+	int mReadPosition;
 };
 
 #endif // MEMBLOCKSTREAM__H

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/ReadGatherStream.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -69,7 +69,7 @@
 	ASSERT(pStream != 0);
 
 	// Just add the component to the list, returning it's index.
-	int index = (int)mComponents.size();
+	int index = mComponents.size();
 	mComponents.push_back(pStream);
 	return index;
 }
@@ -145,8 +145,7 @@
 		if(mPositionInCurrentBlock < mBlocks[mCurrentBlock].mLength)
 		{
 			// Read!
-			int s = (int)(mBlocks[mCurrentBlock].mLength - 
-				mPositionInCurrentBlock);
+			int s = mBlocks[mCurrentBlock].mLength - mPositionInCurrentBlock;
 			if(s > bytesToRead) s = bytesToRead;
 			
 			int r = mComponents[mBlocks[mCurrentBlock].mComponent]->Read(buffer, s, Timeout);

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/StreamableMemBlock.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -115,7 +115,7 @@
 	}
 	
 	// Allocate a new block (this way to be exception safe)
-	char *pblock = (char*)malloc((size_t)size);
+	char *pblock = (char*)malloc(size);
 	if(pblock == 0)
 	{
 		throw std::bad_alloc();
@@ -124,7 +124,7 @@
 	try
 	{
 		// Read in
-		if(!rStream.ReadFullBuffer(pblock, (int)size, 0 /* not interested in bytes read if this fails */))
+		if(!rStream.ReadFullBuffer(pblock, size, 0 /* not interested in bytes read if this fails */))
 		{
 			THROW_EXCEPTION(CommonException, StreamableMemBlockIncompleteRead)
 		}
@@ -141,7 +141,7 @@
 	// store...
 	ASSERT(mpBuffer == 0);
 	mpBuffer = pblock;
-	mSize = (int)size;
+	mSize = size;
 }
 
 

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/Test.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/Test.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/Test.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -10,8 +10,6 @@
 #ifndef TEST__H
 #define TEST__H
 
-#include "Box.h"
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdlib.h>

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/Utils.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/Utils.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/Utils.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -39,7 +39,7 @@
 	while(e = String.find_first_of(SplitOn, b), e != String.npos)
 	{
 		// Get this string
-		std::string::size_type len = e - b;
+		unsigned int len = e - b;
 		if(len >= 1)
 		{
 			rOutput.push_back(String.substr(b, len));

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/WaitForEvent.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/WaitForEvent.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/WaitForEvent.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -163,7 +163,7 @@
 	}
 	
 	// Poll!
-	switch(::poll(mpPollInfo, (unsigned int)mItems.size(), mTimeout))
+	switch(::poll(mpPollInfo, mItems.size(), mTimeout))
 	{
 	case -1:
 		// Interrupted system calls aren't an error, just equivalent to a timeout

Modified: box/chris/win32/vc2005-compile-fixes/lib/server/Protocol.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/server/Protocol.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/server/Protocol.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -638,7 +638,7 @@
 	Write((int32_t)(rValue.size()));
 	
 	WRITE_ENSURE_BYTES_AVAILABLE(rValue.size())
-	Write(rValue.c_str(), (int)rValue.size());
+	Write(rValue.c_str(), rValue.size());
 }
 
 // --------------------------------------------------------------------------
@@ -706,11 +706,11 @@
 	}
 	
 	// Inform sub class
-	InformStreamSending((u_int32_t)streamSize);
+	InformStreamSending(streamSize);
 	
 	// Make header
 	PW_ObjectHeader objHeader;
-	objHeader.mObjSize = htonl((u_long)(uncertainSize?(ProtocolStream_SizeUncertain):streamSize));
+	objHeader.mObjSize = htonl(uncertainSize?(ProtocolStream_SizeUncertain):streamSize);
 	objHeader.mObjType = htonl(SPECIAL_STREAM_OBJECT_TYPE);
 
 	// Write header

Modified: box/chris/win32/vc2005-compile-fixes/lib/server/Protocol.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/server/Protocol.h	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/server/Protocol.h	2006-02-03 19:58:38 UTC (rev 364)
@@ -94,7 +94,7 @@
 	void Read(int32_t &rOut);
 	void Read(int16_t &rOut);
 	void Read(int8_t &rOut);
-	void Read(bool &rOut) {bool read; Read(read); rOut = (read == true);}
+	void Read(bool &rOut) {int8_t read; Read(read); rOut = (read == true);}
 	void Read(std::string &rOut);
 	template<typename type>
 	void Read(type &rOut)

Modified: box/chris/win32/vc2005-compile-fixes/lib/server/SocketStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/server/SocketStream.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/server/SocketStream.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -70,7 +70,7 @@
 //
 // --------------------------------------------------------------------------
 SocketStream::SocketStream(const SocketStream &rToCopy)
-	: mSocketHandle(::dup((int)rToCopy.mSocketHandle)),
+	: mSocketHandle(::dup(rToCopy.mSocketHandle)),
 	  mReadClosed(rToCopy.mReadClosed),
 	  mWriteClosed(rToCopy.mWriteClosed)
 

Modified: box/chris/win32/vc2005-compile-fixes/lib/server/SocketStreamTLS.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/server/SocketStreamTLS.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/server/SocketStreamTLS.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -125,7 +125,7 @@
 	}
 
 	tOSSocketHandle socket = GetSocketHandle();
-	BIO_set_fd(mpBIO, (int)socket, BIO_NOCLOSE);
+	BIO_set_fd(mpBIO, socket, BIO_NOCLOSE);
 	
 	// Then the SSL object
 	mpSSL = ::SSL_new(rContext.GetRawContext());

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -16,17 +16,16 @@
 #ifdef HAVE_UNISTD_H
 	#include <unistd.h>
 #endif
+#ifdef HAVE_PROCESS_H
+	#include <process.h>
+#endif
 
 #include <string>
 #include <list>
 
-#ifdef HAVE_PROCESS_H
-	#include <process.h>
-#endif
+// our implementation for a timer, based on a 
+// simple thread which sleeps for a period of time
 
-//our implimentation for a timer
-//based on a simple thread which sleeps for a
-//period of time
 static bool gFinishTimer;
 static CRITICAL_SECTION gLock;
 
@@ -35,9 +34,9 @@
 	int countDown;
 	int interval;
 }
-tTimer;
+Timer_t;
 
-std::list<tTimer> gTimerList;
+std::list<Timer_t> gTimerList;
 static void (__cdecl *gTimerFunc) (int) = NULL;
 
 int setitimer(int type , struct itimerval *timeout, int)
@@ -53,7 +52,7 @@
 		}
 		else
 		{
-			tTimer ourTimer;
+			Timer_t ourTimer;
 			ourTimer.countDown = timeout->it_value.tv_sec;
 			ourTimer.interval  = timeout->it_interval.tv_sec;
 			gTimerList.push_back(ourTimer);
@@ -71,12 +70,12 @@
 
 	while (!gFinishTimer)
 	{
-		std::list<tTimer>::iterator it;
+		std::list<Timer_t>::iterator it;
 		EnterCriticalSection(&gLock);
 
 		for (it = gTimerList.begin(); it != gTimerList.end(); it++)
 		{
-			tTimer& rTimer(*it);
+			Timer_t& rTimer(*it);
 
 			rTimer.countDown --;
 			if (rTimer.countDown == 0)
@@ -99,7 +98,7 @@
 
 		for (it = gTimerList.begin(); it != gTimerList.end(); it++)
 		{
-			tTimer& rTimer(*it);
+			Timer_t& rTimer(*it);
 
 			if (rTimer.countDown == -1)
 			{

Modified: box/chris/win32/vc2005-compile-fixes/test/win32/testlibwin32.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/win32/testlibwin32.cpp	2006-02-03 10:26:29 UTC (rev 363)
+++ box/chris/win32/vc2005-compile-fixes/test/win32/testlibwin32.cpp	2006-02-03 19:58:38 UTC (rev 364)
@@ -8,11 +8,11 @@
 
 #include "../../bin/bbackupd/BackupDaemon.h"
 #include "BoxPortsAndFiles.h"
+#include "emu.h"
 
-
 int main(int argc, char* argv[])
 {
-	_chdir("c:\\tmp");
+	chdir("c:\\tmp");
 	openfile("test", O_CREAT, 0);
 	struct stat ourfs;
 	//test our opendir, readdir and closedir


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 20:22:03 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 20:22:03 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r365 - in box/chris/win32/vc2005-compile-fixes: . bin/bbackupd bin/bbackupquery bin/bbstored distribution distribution/boxbackup distribution/boxbackup/contrib/rpm infrastructure infrastructure/m4 lib/backupclient lib/common lib/crypto lib/server lib/win32 test/backupdiff test/backupstore test/backupstorepatch test/bbackupd test/raidfile
Message-ID: <20060203202203.37E9F94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 20:21:10 +0000 (Fri, 03 Feb 2006)
New Revision: 365

Added:
   box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_bswap64.m4
   box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_compare_version.m4
   box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_path_bdb.m4
   box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_split_version.m4
   box/chris/win32/vc2005-compile-fixes/lib/common/Archive.h
Removed:
   box/chris/win32/vc2005-compile-fixes/VERSION.txt
   box/chris/win32/vc2005-compile-fixes/infrastructure/tests/
   box/chris/win32/vc2005-compile-fixes/test/raidfile/Darwin-SYS.h
   box/chris/win32/vc2005-compile-fixes/test/raidfile/Makefile.extra.Darwin
   box/chris/win32/vc2005-compile-fixes/test/raidfile/make-darwin-intercepts.pl
Modified:
   box/chris/win32/vc2005-compile-fixes/BUGS.txt
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.h
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.h
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientInodeToIDMap.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.h
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/bbackupd-config
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbstored/BackupCommands.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbstored/backupprotocol.txt
   box/chris/win32/vc2005-compile-fixes/configure.ac
   box/chris/win32/vc2005-compile-fixes/distribution/COMMON-MANIFEST.txt
   box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
   box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/LICENSE.txt
   box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/THANKS.txt
   box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/VERSION.txt
   box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/contrib/rpm/boxbackup.spec
   box/chris/win32/vc2005-compile-fixes/infrastructure/BoxPlatform.pm.in
   box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_check_mount_point.m4
   box/chris/win32/vc2005-compile-fixes/infrastructure/m4/vl_lib_readline.m4
   box/chris/win32/vc2005-compile-fixes/infrastructure/makebuildenv.pl
   box/chris/win32/vc2005-compile-fixes/infrastructure/makedistribution.pl
   box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientFileAttributes.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupDaemonConfigVerify.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.h
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilenameClear.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/
   box/chris/win32/vc2005-compile-fixes/lib/common/Box.h
   box/chris/win32/vc2005-compile-fixes/lib/common/BoxPlatform.h
   box/chris/win32/vc2005-compile-fixes/lib/common/CommonException.txt
   box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.cpp
   box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h
   box/chris/win32/vc2005-compile-fixes/lib/crypto/Random.cpp
   box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.cpp
   box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.h
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/parcels.txt
   box/chris/win32/vc2005-compile-fixes/test/backupdiff/testbackupdiff.cpp
   box/chris/win32/vc2005-compile-fixes/test/backupstore/testbackupstore.cpp
   box/chris/win32/vc2005-compile-fixes/test/backupstorepatch/testbackupstorepatch.cpp
   box/chris/win32/vc2005-compile-fixes/test/bbackupd/testbbackupd.cpp
   box/chris/win32/vc2005-compile-fixes/test/raidfile/intercept.cpp
Log:
* Many files
- Merged changes from trunk since this branch was forked


Modified: box/chris/win32/vc2005-compile-fixes/BUGS.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/BUGS.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/BUGS.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -8,3 +8,8 @@
 * if bbackupd gets an error then a signal, it may not wait it's full 100 seconds before retrying. And then won't stop the cycle...
 * bbackupquery restore, if not root, then won't do file ownership properly, but won't alert the user to this fact
 * empty (real) directories in the store aren't deleted when they're empty (and will never be used again) -- uses up disc space unnecessarily
+* need unit tests for SSL keepalives and state saving (serialisation)
+* make Archive derive from Protocol
+* more automated tests for win32
+* change off_t to box_off_t in preparation for win32 large file support
+* support large files on win32 by using native *i64 functions instead of posix

Deleted: box/chris/win32/vc2005-compile-fixes/VERSION.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/VERSION.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/VERSION.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,2 +0,0 @@
-0.09_autoconf_win32
-boxbackup

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -9,9 +9,15 @@
 
 #include "Box.h"
 
-#ifndef WIN32
-#include <syslog.h>
+#ifdef HAVE_SYSLOG_H
+	#include <syslog.h>
 #endif
+#ifdef HAVE_SIGNAL_H
+	#include <signal.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+	#include <sys/time.h>
+#endif
 
 #include "BoxPortsAndFiles.h"
 #include "BoxTime.h"
@@ -22,6 +28,7 @@
 #include "BackupStoreException.h"
 #include "BackupDaemon.h"
 #include "autogen_BackupProtocolClient.h"
+#include "BackupStoreFile.h"
 
 #include "MemLeakFindOn.h"
 
@@ -48,7 +55,11 @@
 	  mpNewIDMap(0),
 	  mStorageLimitExceeded(false),
 	  mpExcludeFiles(0),
-	  mpExcludeDirs(0)
+	  mpExcludeDirs(0),
+	  mbIsManaged(false),
+	  mTimeMgmtEpoch(0),
+	  mMaximumDiffTime(600),
+	  mKeepAliveTime(0)
 {
 }
 
@@ -453,3 +464,166 @@
 }
 
 
+// maximum time to spend diffing
+static int sMaximumDiffTime = 600;
+// maximum time of SSL inactivity (keep-alive interval)
+static int sKeepAliveTime = 0;
+
+void BackupClientContext::SetMaximumDiffingTime(int iSeconds)
+{
+	sMaximumDiffTime = iSeconds < 0 ? 0 : iSeconds;
+	TRACE1("Set maximum diffing time to %d seconds\n", sMaximumDiffTime);
+}
+
+void BackupClientContext::SetKeepAliveTime(int iSeconds)
+{
+	sKeepAliveTime = iSeconds < 0 ? 0 : iSeconds;
+	TRACE1("Set keep-alive time to %d seconds\n", sKeepAliveTime);
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    static TimerSigHandler(int)
+//		Purpose: Signal handler
+//		Created: 19/3/04
+//
+// --------------------------------------------------------------------------
+static void TimerSigHandler(int iUnused)
+{
+	BackupStoreFile::DiffTimerExpired();	
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupClientContext::ManageDiffProcess()
+//		Purpose: Initiates a file diff control timer
+//		Created: 04/19/2005
+//
+// --------------------------------------------------------------------------
+void BackupClientContext::ManageDiffProcess()
+{
+	if (mbIsManaged || !mpConnection)
+		return;
+
+	ASSERT(mTimeMgmtEpoch == 0);
+
+#ifdef PLATFORM_CYGWIN
+	::signal(SIGALRM, TimerSigHandler);
+#else
+	::signal(SIGVTALRM, TimerSigHandler);
+#endif // PLATFORM_CYGWIN
+
+	struct itimerval timeout;
+	memset(&timeout, 0, sizeof(timeout));
+
+	//
+	//
+	//
+	if (sMaximumDiffTime <= 0 && sKeepAliveTime <= 0)
+	{
+		TRACE0("Diff control not requested - letting things run wild\n");
+		return;
+	}
+	else if (sMaximumDiffTime > 0 && sKeepAliveTime > 0)
+	{
+		timeout.it_value.tv_sec = sKeepAliveTime < sMaximumDiffTime ? sKeepAliveTime : sMaximumDiffTime;
+		timeout.it_interval.tv_sec = sKeepAliveTime < sMaximumDiffTime ? sKeepAliveTime : sMaximumDiffTime;
+	}
+	else
+	{
+		timeout.it_value.tv_sec = sKeepAliveTime > 0 ? sKeepAliveTime : sMaximumDiffTime;
+		timeout.it_interval.tv_sec = sKeepAliveTime > 0 ? sKeepAliveTime : sMaximumDiffTime;
+	}
+
+	// avoid race
+	mTimeMgmtEpoch = time(NULL);
+
+#ifdef PLATFORM_CYGWIN
+	if(::setitimer(ITIMER_REAL, &timeout, NULL) != 0)
+#else
+	if(::setitimer(ITIMER_VIRTUAL, &timeout, NULL) != 0)
+#endif // PLATFORM_CYGWIN
+	{
+		mTimeMgmtEpoch = 0;
+
+		TRACE0("WARNING: couldn't set file diff control timeout\n");
+		THROW_EXCEPTION(BackupStoreException, Internal)
+	}
+
+	mbIsManaged = true;
+	TRACE0("Initiated timer for file diff control\n");
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupClientContext::UnManageDiffProcess()
+//		Purpose: suspends file diff control timer
+//		Created: 04/19/2005
+//
+// --------------------------------------------------------------------------
+void BackupClientContext::UnManageDiffProcess()
+{
+	if (!mbIsManaged /* don't test for active connection, just do it */)
+		return;
+
+	struct itimerval timeout;
+	memset(&timeout, 0, sizeof(timeout));
+
+#ifdef PLATFORM_CYGWIN
+	if(::setitimer(ITIMER_REAL, &timeout, NULL) != 0)
+#else
+	if(::setitimer(ITIMER_VIRTUAL, &timeout, NULL) != 0)
+#endif // PLATFORM_CYGWIN
+	{
+		TRACE0("WARNING: couldn't clear file diff control timeout\n");
+		THROW_EXCEPTION(BackupStoreException, Internal)
+	}
+
+	mbIsManaged = false;
+	mTimeMgmtEpoch = 0;
+
+	TRACE0("Suspended timer for file diff control\n");
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupClientContext::DoKeepAlive()
+//		Purpose: Does something inconsequential over the SSL link to keep it up
+//		Created: 04/19/2005
+//
+// --------------------------------------------------------------------------
+void BackupClientContext::DoKeepAlive()
+{
+	if (!mpConnection)
+		return;
+
+	mpConnection->QueryGetIsAlive();
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupClientContext::GetTimeMgmtEpoch()
+//		Purpose: Returns the unix time when the diff was started, or zero
+//				 if the diff process is unmanaged.
+//		Created: 04/19/2005
+//
+// --------------------------------------------------------------------------
+time_t BackupClientContext::GetTimeMgmtEpoch() 
+{
+	return mTimeMgmtEpoch;
+}
+
+int BackupClientContext::GetMaximumDiffingTime() 
+{
+	return mMaximumDiffTime;
+}
+
+int BackupClientContext::GetKeepaliveTime() 
+{
+	return mKeepAliveTime;
+}

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -12,6 +12,7 @@
 
 #include "BoxTime.h"
 #include "BackupClientDeleteList.h"
+#include "BackupStoreFile.h"
 #include "ExcludeList.h"
 
 class TLSContext;
@@ -31,12 +32,12 @@
 //		Created: 2003/10/08
 //
 // --------------------------------------------------------------------------
-class BackupClientContext
+class BackupClientContext : public DiffTimer
 {
 public:
 	BackupClientContext(BackupDaemon &rDaemon, TLSContext &rTLSContext, const std::string &rHostname,
 		int32_t AccountNumber, bool ExtendedLogging);
-	~BackupClientContext();
+	virtual ~BackupClientContext();
 private:
 	BackupClientContext(const BackupClientContext &);
 public:
@@ -134,6 +135,60 @@
 		bool &rIsCurrentVersionOut, box_time_t *pModTimeOnServer = 0, box_time_t *pAttributesHashOnServer = 0,
 		BackupStoreFilenameClear *pLeafname = 0); // not const as may connect to server
 
+	// --------------------------------------------------------------------------
+	//
+	// Function
+	//		Name:    BackupClientContext::SetMaximumDiffingTime()
+	//		Purpose: Sets the maximum time that will be spent diffing a file
+	//		Created: 04/19/2005
+	//
+	// --------------------------------------------------------------------------
+	static void SetMaximumDiffingTime(int iSeconds);
+
+	// --------------------------------------------------------------------------
+	//
+	// Function
+	//		Name:    BackupClientContext::SetKeepAliveTime()
+	//		Purpose: Sets the time interval for repetitive keep-alive operation
+	//		Created: 04/19/2005
+	//
+	// --------------------------------------------------------------------------
+	static void SetKeepAliveTime(int iSeconds);
+
+	// --------------------------------------------------------------------------
+	//
+	// Function
+	//		Name:    BackupClientContext::ManageDiffProcess()
+	//		Purpose: Initiates an SSL connection/session keep-alive process
+	//		Created: 04/19/2005
+	//
+	// --------------------------------------------------------------------------
+	void ManageDiffProcess();
+
+	// --------------------------------------------------------------------------
+	//
+	// Function
+	//		Name:    BackupClientContext::UnManageDiffProcess()
+	//		Purpose: Suspends an SSL connection/session keep-alive process
+	//		Created: 04/19/2005
+	//
+	// --------------------------------------------------------------------------
+	void UnManageDiffProcess();
+
+	// --------------------------------------------------------------------------
+	//
+	// Function
+	//		Name:    BackupClientContext::DoKeepAlive()
+	//		Purpose: Does something inconsequential over the SSL link to 
+	//				 keep it up, implements DiffTimer interface
+	//		Created: 04/19/2005
+	//
+	// --------------------------------------------------------------------------
+	virtual void   DoKeepAlive();
+	virtual time_t GetTimeMgmtEpoch();
+	virtual int    GetMaximumDiffingTime();
+	virtual int    GetKeepaliveTime();
+	
 private:
 	BackupDaemon &mrDaemon;
 	TLSContext &mrTLSContext;
@@ -149,8 +204,16 @@
 	bool mStorageLimitExceeded;
 	ExcludeList *mpExcludeFiles;
 	ExcludeList *mpExcludeDirs;
+
+	bool mbIsManaged;
+	// unix time when diff was started
+	time_t mTimeMgmtEpoch;
+	// maximum time to spend diffing, in seconds
+	int mMaximumDiffTime;
+	// maximum time of SSL inactivity (keep-alive interval), in seconds
+	int mKeepAliveTime;
+
 };
 
 
 #endif // BACKUPCLIENTCONTEXT__H
-

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -28,6 +28,7 @@
 #include "FileModificationTime.h"
 #include "BackupDaemon.h"
 #include "BackupStoreException.h"
+#include "Archive.h"
 
 #include "MemLeakFindOn.h"
 
@@ -1096,14 +1097,28 @@
 				// Found an old version -- get the index
 				std::auto_ptr<IOStream> blockIndexStream(connection.ReceiveStream());
 			
+				//
 				// Diff the file
+				//
+
+				rParams.mrContext.ManageDiffProcess();
+
 				bool isCompletelyDifferent = false;
-				std::auto_ptr<IOStream> patchStream(BackupStoreFile::EncodeFileDiff(rFilename.c_str(),
+				std::auto_ptr<IOStream> patchStream(
+					BackupStoreFile::EncodeFileDiff(
+						rFilename.c_str(),
 						mObjectID,	/* containing directory */
 						rStoreFilename, diffFromID, *blockIndexStream,
-						connection.GetTimeout(), 0 /* not interested in the modification time */, &isCompletelyDifferent));
+						connection.GetTimeout(), 
+						&rParams.mrContext, // DiffTimer implementation
+						0 /* not interested in the modification time */, 
+						&isCompletelyDifferent));
 	
+				rParams.mrContext.UnManageDiffProcess();
+
+				//
 				// Upload the patch to the store
+				//
 				std::auto_ptr<BackupProtocolClientSuccess> stored(connection.QueryStoreFile(mObjectID, ModificationTime,
 						AttributesHash, isCompletelyDifferent?(0):(diffFromID), rStoreFilename, *patchStream));
 				
@@ -1133,6 +1148,8 @@
 	}
 	catch(BoxException &e)
 	{
+		rParams.mrContext.UnManageDiffProcess();
+
 		if(e.GetType() == ConnectionException::ExceptionType && e.GetSubType() == ConnectionException::Protocol_UnexpectedReply)
 		{
 			// Check and see what error the protocol has -- as it might be an error...
@@ -1214,5 +1231,177 @@
 {
 }
 
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupClientDirectoryRecord::Deserialize(Archive & rArchive)
+//		Purpose: Deserializes this object instance from a stream of bytes, using an Archive abstraction.
+//
+//		Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void BackupClientDirectoryRecord::Deserialize(Archive & rArchive)
+{
+	// Make deletion recursive
+	DeleteSubDirectories();
 
+	// Delete maps
+	if(mpPendingEntries != 0)
+	{
+		delete mpPendingEntries;
+		mpPendingEntries = 0;
+	}
 
+	//
+	//
+	//
+	rArchive.Read(mObjectID);
+	rArchive.Read(mSubDirName);
+	rArchive.Read(mInitialSyncDone);
+	rArchive.Read(mSyncDone);
+
+	//
+	//
+	//
+	int64_t iCount = 0;
+	rArchive.Read(iCount);
+
+	if (iCount != sizeof(mStateChecksum)/sizeof(mStateChecksum[0]))
+	{
+		// we have some kind of internal system representation change: throw for now
+		THROW_EXCEPTION(CommonException, Internal)
+	}
+
+	for (int v = 0; v < iCount; v++)
+	{
+		// Load each checksum entry
+		rArchive.Read(mStateChecksum[v]);
+	}
+
+	//
+	//
+	//
+	iCount = 0;
+	rArchive.Read(iCount);
+
+	if (iCount > 0)
+	{
+		// load each pending entry
+		mpPendingEntries = new std::map<std::string, box_time_t>;
+		if (!mpPendingEntries)
+		{
+			throw std::bad_alloc();
+		}
+
+		for (int v = 0; v < iCount; v++)
+		{
+			std::string strItem;
+			box_time_t btItem;
+
+			rArchive.Read(strItem);
+			rArchive.Read(btItem);
+			(*mpPendingEntries)[strItem] = btItem;
+		}
+	}
+
+	//
+	//
+	//
+	iCount = 0;
+	rArchive.Read(iCount);
+
+	if (iCount > 0)
+	{
+		for (int v = 0; v < iCount; v++)
+		{
+			std::string strItem;
+			rArchive.Read(strItem);
+
+			BackupClientDirectoryRecord* pSubDirRecord = 
+				new BackupClientDirectoryRecord(0, ""); 
+			// will be deserialized anyway, give it id 0 for now
+
+			if (!pSubDirRecord)
+			{
+				throw std::bad_alloc();
+			}
+
+			/***** RECURSE *****/
+			pSubDirRecord->Deserialize(rArchive);
+			mSubDirectories[strItem] = pSubDirRecord;
+		}
+	}
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupClientDirectoryRecord::Serialize(Archive & rArchive)
+//		Purpose: Serializes this object instance into a stream of bytes, using an Archive abstraction.
+//
+//		Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void BackupClientDirectoryRecord::Serialize(Archive & rArchive) const
+{
+	//
+	//
+	//
+	rArchive.Write(mObjectID);
+	rArchive.Write(mSubDirName);
+	rArchive.Write(mInitialSyncDone);
+	rArchive.Write(mSyncDone);
+
+	//
+	//
+	//
+	int64_t iCount = 0;
+
+	// when reading back the archive, we will 
+	// need to know how many items there are.
+	iCount = sizeof(mStateChecksum) / sizeof(mStateChecksum[0]);
+	rArchive.Write(iCount); 
+
+	for (int v = 0; v < iCount; v++)
+	{
+		rArchive.Write(mStateChecksum[v]);
+	}
+
+	//
+	//
+	//
+	if (!mpPendingEntries)
+	{
+		iCount = 0;
+		rArchive.Write(iCount);
+	}
+	else
+	{
+		iCount = mpPendingEntries->size();
+		rArchive.Write(iCount);
+
+		for (std::map<std::string, box_time_t>::const_iterator
+			i =  mpPendingEntries->begin(); 
+			i != mpPendingEntries->end(); i++)
+		{
+			rArchive.Write(i->first);
+			rArchive.Write(i->second);
+		}
+	}
+	//
+	//
+	//
+	iCount = mSubDirectories.size();
+	rArchive.Write(iCount);
+
+	for (std::map<std::string, BackupClientDirectoryRecord*>::const_iterator
+		i =  mSubDirectories.begin(); 
+		i != mSubDirectories.end(); i++)
+	{
+		const BackupClientDirectoryRecord* pSubItem = i->second;
+		ASSERT(pSubItem);
+
+		rArchive.Write(i->first);
+		pSubItem->Serialize(rArchive);
+	}
+}

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientDirectoryRecord.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -18,6 +18,7 @@
 #include "BackupStoreDirectory.h"
 #include "MD5Digest.h"
 
+class Archive;
 class BackupClientContext;
 class BackupDaemon;
 
@@ -34,6 +35,9 @@
 public:
 	BackupClientDirectoryRecord(int64_t ObjectID, const std::string &rSubDirName);
 	~BackupClientDirectoryRecord();
+
+	void Deserialize(Archive & rArchive);
+	void Serialize(Archive & rArchive) const;
 private:
 	BackupClientDirectoryRecord(const BackupClientDirectoryRecord &);
 public:

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientInodeToIDMap.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientInodeToIDMap.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientInodeToIDMap.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -14,7 +14,7 @@
 	#include <sys/types.h>
 	#include <fcntl.h>
 	#include <limits.h>
-	#include DB_HEADER
+	#include <db.h>
 	#include <sys/stat.h>
 #endif
 
@@ -65,7 +65,7 @@
 #ifndef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
 	if(dbp != 0)
 	{
-#ifdef BERKELY_V4
+#if BDB_VERSION_MAJOR >= 3
 		dbp->close(0);
 #else
 		dbp->close(dbp);
@@ -94,7 +94,7 @@
 	ASSERT(!mEmpty);
 	
 	// Open the database file
-#ifdef BERKELY_V4
+#if BDB_VERSION_MAJOR >= 3
 	dbp = new Db(0,0);
 	dbp->set_pagesize(1024);		/* Page size: 1K. */
 	dbp->set_cachesize(0, 32 * 1024, 0);
@@ -146,7 +146,7 @@
 #ifndef BACKIPCLIENTINODETOIDMAP_IN_MEMORY_IMPLEMENTATION
 	if(dbp != 0)
 	{
-#ifdef BERKELY_V4
+#if BDB_VERSION_MAJOR >= 3
 		if(dbp->close(0) != 0)
 #else
 		if(dbp->close(dbp) != 0)
@@ -188,7 +188,7 @@
 	rec.mObjectID = ObjectID;
 	rec.mInDirectory = InDirectory;
 
-#ifdef BERKELY_V4
+#if BDB_VERSION_MAJOR >= 3
 	Dbt key(&InodeRef, sizeof(InodeRef));
 	Dbt data(&rec, sizeof(rec));
 
@@ -250,7 +250,7 @@
 		THROW_EXCEPTION(BackupStoreException, InodeMapNotOpen);
 	}
 
-#ifdef BERKELY_V4
+#if BDB_VERSION_MAJOR >= 3
 	Dbt key(&InodeRef, sizeof(InodeRef));
 	Dbt data(0, 0);
 	switch(dbp->get(NULL, &key, &data, 0))
@@ -280,7 +280,7 @@
 	}
 
 	// Check for sensible return
-#ifdef BERKELY_V4
+#if BDB_VERSION_MAJOR >= 3
 	if(key.get_data() == 0 || data.get_size() != sizeof(IDBRecord))
 	{
 		// Assert in debug version

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -10,15 +10,21 @@
 #include "Box.h"
 
 #include <stdio.h>
+#include <string.h>
 
 #ifdef HAVE_UNISTD_H
 	#include <unistd.h>
 #endif
-
-#ifndef WIN32
+#ifdef HAVE_SIGNAL_H
 	#include <signal.h>
+#endif
+#ifdef HAVE_SYSLOG_H
 	#include <syslog.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
 	#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
 	#include <sys/wait.h>
 #endif
 #ifdef HAVE_SYS_MOUNT_H
@@ -67,6 +73,7 @@
 #include "LocalProcessStream.h"
 #include "IOStreamGetLine.h"
 #include "Conversion.h"
+#include "Archive.h"
 
 #include "MemLeakFindOn.h"
 
@@ -450,11 +457,15 @@
 	// Set up the keys for various things
 	BackupClientCryptoKeys_Setup(conf.GetKeyValue("KeysFile").c_str());
 
-	// Set maximum diffing time?
+	// max diffing time, keep-alive time
 	if(conf.KeyExists("MaximumDiffingTime"))
 	{
-		BackupStoreFile::SetMaximumDiffingTime(conf.GetKeyValueInt("MaximumDiffingTime"));
+		BackupClientContext::SetMaximumDiffingTime(conf.GetKeyValueInt("MaximumDiffingTime"));
 	}
+	if(conf.KeyExists("KeepAliveTime"))
+	{
+		BackupClientContext::SetKeepAliveTime(conf.GetKeyValueInt("KeepAliveTime"));
+	}
 
 	// Setup various timings
 	
@@ -478,10 +489,18 @@
 	// When the last sync started (only updated if the store was not full when the sync ended)
 	box_time_t lastSyncTime = 0;
 
+ 	// --------------------------------------------------------------------------------------------
+ 
+	// And what's the current client store marker?
+	int64_t clientStoreMarker = 
+		BackupClientContext::ClientStoreMarker_NotKnown;
+	// haven't contacted the store yet
+
+ 	DeserializeStoreObjectInfo(clientStoreMarker, lastSyncTime, 
+		nextSyncTime);
+ 
 	// --------------------------------------------------------------------------------------------
 	
-	// And what's the current client store marker?
-	int64_t clientStoreMarker = BackupClientContext::ClientStoreMarker_NotKnown;		// haven't contacted the store yet
 
 	// Set state
 	SetState(State_Idle);
@@ -685,6 +704,13 @@
 
 				// Log
 				::syslog(LOG_INFO, "Finished scan of local files");
+
+				// --------------------------------------------------------------------------------------------
+
+				// We had a successful backup, save the store info
+				SerializeStoreObjectInfo(clientStoreMarker, lastSyncTime, nextSyncTime);
+
+				// --------------------------------------------------------------------------------------------
 			}
 			catch(BoxException &e)
 			{
@@ -900,7 +926,7 @@
 			{
 #ifdef PLATFORM_CANNOT_FIND_PEER_UID_OF_UNIX_SOCKET
 				bool uidOK = true;
-				::syslog(LOG_ERR, "On this platform, no security check can be made on the credientials of peers connecting to the command socket. (bbackupctl)");
+				::syslog(LOG_WARNING, "On this platform, no security check can be made on the credientials of peers connecting to the command socket. (bbackupctl)");
 #else
 				// Security check -- does the process connecting to this socket have
 				// the same UID as this process?
@@ -1845,7 +1871,19 @@
 	mUnusedRootDirEntries.clear();
 }
 
+// --------------------------------------------------------------------------
 
+typedef struct
+{
+	int32_t mMagicValue;	// also the version number
+	int32_t mNumEntries;
+	int64_t mObjectID;		// this object ID
+	int64_t mContainerID;	// ID of container
+	uint64_t mAttributesModTime;
+	int32_t mOptionsPresent;	// bit mask of optional sections / features present
+
+} loc_StreamFormat;
+
 // --------------------------------------------------------------------------
 //
 // Function
@@ -1884,10 +1922,181 @@
 	}
 }
 
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupDaemon::Location::Deserialize(Archive & rArchive)
+//		Purpose: Deserializes this object instance from a stream of bytes, using an Archive abstraction.
+//
+//		Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void BackupDaemon::Location::Deserialize(Archive &rArchive)
+{
+	//
+	//
+	//
+	mpDirectoryRecord.reset(NULL);
+	if (mpExcludeFiles)
+	{
+		delete mpExcludeFiles;
+		mpExcludeFiles = NULL;
+	}
+	if (mpExcludeDirs)
+	{
+		delete mpExcludeDirs;
+		mpExcludeDirs = NULL;
+	}
 
+	//
+	//
+	//
+	rArchive.Read(mName);
+	rArchive.Read(mPath);
+	rArchive.Read(mIDMapIndex);
+
+	//
+	//
+	//
+	int64_t aMagicMarker = 0;
+	rArchive.Read(aMagicMarker);
+
+	if (aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
+	{
+		// NOOP
+	}
+	else if (aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
+	{
+		BackupClientDirectoryRecord *pSubRecord = new BackupClientDirectoryRecord(0, "");
+		if (!pSubRecord)
+			throw std::bad_alloc();
+
+		mpDirectoryRecord.reset(pSubRecord);
+		mpDirectoryRecord->Deserialize(rArchive);
+	}
+	else
+	{
+		// there is something going on here
+		THROW_EXCEPTION(CommonException, Internal)
+	}
+
+	//
+	//
+	//
+	rArchive.Read(aMagicMarker);
+
+	if (aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
+	{
+		// NOOP
+	}
+	else if (aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
+	{
+		mpExcludeFiles = new ExcludeList;
+		if (!mpExcludeFiles)
+			throw std::bad_alloc();
+
+		mpExcludeFiles->Deserialize(rArchive);
+	}
+	else
+	{
+		// there is something going on here
+		THROW_EXCEPTION(CommonException, Internal)
+	}
+
+	//
+	//
+	//
+	rArchive.Read(aMagicMarker);
+
+	if (aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
+	{
+		// NOOP
+	}
+	else if (aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
+	{
+		mpExcludeDirs = new ExcludeList;
+		if (!mpExcludeDirs)
+			throw std::bad_alloc();
+
+		mpExcludeDirs->Deserialize(rArchive);
+	}
+	else
+	{
+		// there is something going on here
+		THROW_EXCEPTION(CommonException, Internal)
+	}
+}
+
 // --------------------------------------------------------------------------
 //
 // Function
+//		Name:    BackupDaemon::Location::Serialize(Archive & rArchive)
+//		Purpose: Serializes this object instance into a stream of bytes, using an Archive abstraction.
+//
+//		Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void BackupDaemon::Location::Serialize(Archive & rArchive) const
+{
+	//
+	//
+	//
+	rArchive.Write(mName);
+	rArchive.Write(mPath);
+	rArchive.Write(mIDMapIndex);
+
+	//
+	//
+	//
+	if (mpDirectoryRecord.get() == NULL)
+	{
+		int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
+		rArchive.Write(aMagicMarker);
+	}
+	else
+	{
+		int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
+		rArchive.Write(aMagicMarker);
+
+		mpDirectoryRecord->Serialize(rArchive);
+	}
+
+	//
+	//
+	//
+	if (!mpExcludeFiles)
+	{
+		int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
+		rArchive.Write(aMagicMarker);
+	}
+	else
+	{
+		int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
+		rArchive.Write(aMagicMarker);
+
+		mpExcludeFiles->Serialize(rArchive);
+	}
+
+	//
+	//
+	//
+	if (!mpExcludeDirs)
+	{
+		int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
+		rArchive.Write(aMagicMarker);
+	}
+	else
+	{
+		int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
+		rArchive.Write(aMagicMarker);
+
+		mpExcludeDirs->Serialize(rArchive);
+	}
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
 //		Name:    BackupDaemon::CommandSocketInfo::CommandSocketInfo()
 //		Purpose: Constructor
 //		Created: 18/2/04
@@ -1926,3 +2135,249 @@
 		mpGetLine = 0;
 	}
 }
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupDaemon::SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time_t theLastSyncTime, box_time_t theNextSyncTime)
+//		Purpose: Serializes remote directory and file information into a stream of bytes, using an Archive abstraction.
+//
+//		Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+
+static const int STOREOBJECTINFO_MAGIC_ID_VALUE = 0x7777525F;
+static const std::string STOREOBJECTINFO_MAGIC_ID_STRING = "BBACKUPD-STATE";
+static const int STOREOBJECTINFO_VERSION = 1;
+
+void BackupDaemon::SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time_t theLastSyncTime, box_time_t theNextSyncTime) const
+{
+	if(!GetConfiguration().KeyExists("StoreObjectInfoFile"))
+	{
+		return;
+	}
+
+	std::string StoreObjectInfoFile = 
+		GetConfiguration().GetKeyValue("StoreObjectInfoFile");
+
+	if (StoreObjectInfoFile.size() <= 0)
+	{
+		return;
+	}
+
+	try
+	{
+		FileStream aFile(StoreObjectInfoFile.c_str(), 
+			O_WRONLY | O_CREAT | O_TRUNC);
+		Archive anArchive(aFile, 0);
+
+		anArchive.Write(STOREOBJECTINFO_MAGIC_ID_VALUE);
+		anArchive.Write(STOREOBJECTINFO_MAGIC_ID_STRING); 
+		anArchive.Write(STOREOBJECTINFO_VERSION);
+		anArchive.Write(GetLoadedConfigModifiedTime());
+		anArchive.Write(aClientStoreMarker);
+		anArchive.Write(theLastSyncTime);
+		anArchive.Write(theNextSyncTime);
+
+		//
+		//
+		//
+		int64_t iCount = mLocations.size();
+		anArchive.Write(iCount);
+
+		for (int v = 0; v < iCount; v++)
+		{
+			ASSERT(mLocations[v]);
+			mLocations[v]->Serialize(anArchive);
+		}
+
+		//
+		//
+		//
+		iCount = mIDMapMounts.size();
+		anArchive.Write(iCount);
+
+		for (int v = 0; v < iCount; v++)
+			anArchive.Write(mIDMapMounts[v]);
+
+		//
+		//
+		//
+		aFile.Close();
+		::syslog(LOG_INFO, "Saved store object info file '%s'", 
+			StoreObjectInfoFile.c_str());
+	}
+	catch (...)
+	{
+		::syslog(LOG_WARNING, "Requested store object info file '%s' "
+			"not accessible or could not be created", 
+			StoreObjectInfoFile.c_str());
+	}
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupDaemon::DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime)
+//		Purpose: Deserializes remote directory and file information from a stream of bytes, using an Archive abstraction.
+//
+//		Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void BackupDaemon::DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime)
+{
+	//
+	//
+	//
+	DeleteAllLocations();
+
+	//
+	//
+	//
+	if(!GetConfiguration().KeyExists("StoreObjectInfoFile"))
+	{
+		return;
+	}
+
+	std::string StoreObjectInfoFile = 
+		GetConfiguration().GetKeyValue("StoreObjectInfoFile");
+
+	if (StoreObjectInfoFile.size() <= 0)
+	{
+		return;
+	}
+
+	try
+	{
+		FileStream aFile(StoreObjectInfoFile.c_str(), O_RDONLY);
+		Archive anArchive(aFile, 0);
+
+		//
+		// see if the content looks like a valid serialised archive
+		//
+		int iMagicValue = 0;
+		anArchive.Read(iMagicValue);
+
+		if (iMagicValue != STOREOBJECTINFO_MAGIC_ID_VALUE)
+		{
+			::syslog(LOG_WARNING, "Store object info file '%s' "
+				"is not a valid or compatible serialised "
+				"archive. Will re-cache from store.", 
+				StoreObjectInfoFile.c_str());
+			return;
+		}
+
+		//
+		// get a bit optimistic and read in a string identifier
+		//
+		std::string strMagicValue;
+		anArchive.Read(strMagicValue);
+
+		if (strMagicValue != STOREOBJECTINFO_MAGIC_ID_STRING)
+		{
+			::syslog(LOG_WARNING, "Store object info file '%s' "
+				"is not a valid or compatible serialised "
+				"archive. Will re-cache from store.", 
+				StoreObjectInfoFile.c_str());
+			return;
+		}
+
+		//
+		// check if we are loading some future format
+		// version by mistake
+		//
+		int iVersion = 0;
+		anArchive.Read(iVersion);
+
+		if (iVersion != STOREOBJECTINFO_VERSION)
+		{
+			::syslog(LOG_WARNING, "Store object info file '%s' "
+				"version [%d] unsupported. "
+				"Will re-cache from store.", 
+				StoreObjectInfoFile.c_str(), 
+				iVersion);
+			return;
+		}
+
+		//
+		// check if this state file is even valid 
+		// for the loaded bbackupd.conf file
+		//
+		box_time_t lastKnownConfigModTime;
+		anArchive.Read(lastKnownConfigModTime);
+
+		if (lastKnownConfigModTime != GetLoadedConfigModifiedTime())
+		{
+			::syslog(LOG_WARNING, "Store object info file '%s' "
+				"out of date. Will re-cache from store", 
+				StoreObjectInfoFile.c_str());
+			return;
+		}
+
+		//
+		// this is it, go at it
+		//
+		anArchive.Read(aClientStoreMarker);
+		anArchive.Read(theLastSyncTime);
+		anArchive.Read(theNextSyncTime);
+
+		//
+		//
+		//
+		int64_t iCount = 0;
+		anArchive.Read(iCount);
+
+		for (int v = 0; v < iCount; v++)
+		{
+			Location* pLocation = new Location;
+			if (!pLocation)
+				throw std::bad_alloc();
+
+			pLocation->Deserialize(anArchive);
+			mLocations.push_back(pLocation);
+		}
+
+		//
+		//
+		//
+		iCount = 0;
+		anArchive.Read(iCount);
+
+		for (int v = 0; v < iCount; v++)
+		{
+			std::string strItem;
+			anArchive.Read(strItem);
+
+			mIDMapMounts.push_back(strItem);
+		}
+
+		//
+		//
+		//
+		aFile.Close();
+		::syslog(LOG_INFO, "Loaded store object info file '%s', "
+			"version [%d]", StoreObjectInfoFile.c_str(), 
+			iVersion);
+
+		if (::unlink(StoreObjectInfoFile.c_str()) != 0)
+		{
+			::syslog(LOG_ERR, "Failed to delete the old "
+				"store object info file '%s': %s",
+				StoreObjectInfoFile.c_str(), strerror(errno));
+		}
+	}
+	catch (...)
+	{
+		DeleteAllLocations();
+
+		aClientStoreMarker = 
+			BackupClientContext::ClientStoreMarker_NotKnown;
+		theLastSyncTime = 0;
+		theNextSyncTime = 0;
+
+		::syslog(LOG_WARNING, "Requested store object info file '%s' "
+			"does not exist, not accessible, or inconsistent. "
+			"Will re-cache from store.", 
+			StoreObjectInfoFile.c_str());
+	}
+}

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -14,12 +14,14 @@
 #include <string>
 #include <memory>
 
+#include "BoxTime.h"
 #include "Daemon.h"
-#include "BoxTime.h"
 #include "Socket.h"
 #include "SocketListen.h"
 #include "SocketStream.h"
-#include "WinNamedPipeStream.h"
+#ifdef WIN32
+	#include "WinNamedPipeStream.h"
+#endif
 
 class BackupClientDirectoryRecord;
 class BackupClientContext;
@@ -27,6 +29,7 @@
 class BackupClientInodeToIDMap;
 class ExcludeList;
 class IOStreamGetLine;
+class Archive;
 
 // --------------------------------------------------------------------------
 //
@@ -41,6 +44,10 @@
 public:
 	BackupDaemon();
 	~BackupDaemon();
+
+	// methods below do partial (specialized) serialization of client state only
+	void SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time_t theLastSyncTime, box_time_t theNextSyncTime) const;
+	void DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
 private:
 	BackupDaemon(const BackupDaemon &);
 public:
@@ -117,6 +124,9 @@
 	public:
 		Location();
 		~Location();
+
+		void Deserialize(Archive & rArchive);
+		void Serialize(Archive & rArchive) const;
 	private:
 		Location(const Location &);	// copy not allowed
 		Location &operator=(const Location &);

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/bbackupd-config
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/bbackupd-config	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/bbackupd-config	2006-02-03 20:21:10 UTC (rev 365)
@@ -382,7 +382,15 @@
 
 CommandSocket = /var/run/bbackupd.sock
 
+# Uncomment the StoreObjectInfoFile to enable the experimental archiving
+# of the daemon's state (including client store marker and configuration)
+# between backup runs. This saves time and increases efficiency when
+# bbackupd is frequently stopped and started, since it removes the need
+# to rescan all directories on the remote server. However, it is new and
+# not yet heavily tested, so use with caution.
 
+# StoreObjectInfoFile = $working_dir/bbackupd.state
+
 Server
 {
 	PidFile = /var/run/bbackupd.pid

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -785,7 +785,9 @@
 	// Check args
 	if(args.size() < 1 || (opts['i'] && args.size() != 2) || args.size() > 2)
 	{
-		printf("Incorrect usage.\ngetobject <object-id> <local-filename>\n or get -i <object-id> <local-filename>\n");
+		printf("Incorrect usage.\n"
+			"get <remote-filename> [<local-filename>] or\n"
+			"get -i <object-id> <local-filename>\n");
 		return;
 	}
 

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -17,6 +17,8 @@
 #ifdef HAVE_LIBREADLINE
 	#ifdef HAVE_READLINE_READLINE_H
 		#include <readline/readline.h>
+	#elif defined(HAVE_EDITLINE_READLINE_H)
+		#include <editline/readline.h>
 	#elif defined(HAVE_READLINE_H)
 		#include <readline.h>
 	#endif

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbstored/BackupCommands.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbstored/BackupCommands.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbstored/BackupCommands.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -859,3 +859,20 @@
 	));
 }
 
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupProtocolServerGetIsAlive::DoCommand(BackupProtocolServer &, BackupContext &)
+//		Purpose: Return the amount of disc space used
+//		Created: 19/4/04
+//
+// --------------------------------------------------------------------------
+std::auto_ptr<ProtocolObject> BackupProtocolServerGetIsAlive::DoCommand(BackupProtocolServer &rProtocol, BackupContext &rContext)
+{
+	CHECK_PHASE(Phase_Commands)
+
+	//
+	// NOOP
+	//
+	return std::auto_ptr<ProtocolObject>(new BackupProtocolServerIsAlive());
+}

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbstored/backupprotocol.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbstored/backupprotocol.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbstored/backupprotocol.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -219,3 +219,10 @@
 	int64	BlocksSoftLimit
 	int64	BlocksHardLimit
 	int32	BlockSize
+
+GetIsAlive	42	Command(IsAlive)
+	# no data members
+
+IsAlive	43	Reply
+	# no data members
+

Modified: box/chris/win32/vc2005-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-03 20:21:10 UTC (rev 365)
@@ -4,11 +4,10 @@
 AC_PREREQ(2.59)
 AC_INIT([Box Backup], 0.09, [box@fluffy.co.uk])
 AC_CONFIG_SRCDIR([lib/common/Box.h])
-AC_CONFIG_HEADERS([lib/common/config.h])
+AC_CONFIG_HEADERS([lib/common/BoxConfig.h])
 
 touch install-sh
 AC_CANONICAL_SYSTEM
-# echo "Build target OS: '$target_os'"
 test -s install-sh || rm install-sh
 
 ### Checks for programs.
@@ -30,19 +29,31 @@
 
 
 ### Checks for libraries.
+
 if test "$target_os" != "mingw32" -a "$target_os" != "winnt"; then
-AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes], 
-	[AC_MSG_ERROR([[Cannot find a short sleep function (nanosleep)]])])
+  AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes],
+                 [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])])
 fi
+AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])])
+VL_LIB_READLINE([have_libreadline=yes], [have_libreadline=no])
 
-AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[Cannot find zlib]])])
-AX_CHECK_BDB_V1
-VL_LIB_READLINE
-have_libreadline=no
-test "x$vl_cv_lib_readline" != "xno" && have_libreadline=yes
+## Check for Berkely DB. Restrict to certain versions
+AX_PATH_BDB(, [
+  LIBS="$BDB_LIBS $LIBS"
+  LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
+  CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
 
+  AX_COMPARE_VERSION([$BDB_VERSION],[ge],[4.1],,
+    [AX_COMPARE_VERSION([$BDB_VERSION],[lt],[2],,
+      [AC_MSG_ERROR([[only Berkely DB versions 1.x or at least 4.1 are currently supported]])]
+      )]
+  )
+  AX_SPLIT_VERSION([BDB_VERSION], [$BDB_VERSION])
+])
 
 ## Check for Open SSL, use old versions only if explicitly requested
+AC_SEARCH_LIBS([gethostbyname], [nsl socket resolv])
+AC_SEARCH_LIBS([shutdown], [nsl socket resolv])
 AX_CHECK_SSL(, [AC_MSG_ERROR([[OpenSSL is not installed but is required]])])
 AC_ARG_ENABLE(
   [old-ssl],
@@ -65,7 +76,11 @@
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([execinfo.h netinet/in.h regex.h sys/types.h sys/xattr.h pwd.h process.h sys/socket.h dirent.h])
+AC_CHECK_HEADERS([dirent.h execinfo.h process.h pwd.h regex.h signal.h]
+AC_CHECK_HEADERS([syslog.h time.h])
+AC_CHECK_HEADERS([netinet/in.h])
+AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])
+AC_CHECK_HEADERS([sys/xattr.h])
 
 
 ### Checks for typedefs, structures, and compiler characteristics.
@@ -95,12 +110,17 @@
 AC_SYS_LARGEFILE
 AX_CHECK_LLONG_MINMAX
 AX_CHECK_DEFINE_PRAGMA
-
+if test "x$ac_cv_c_bigendian" != "xyes"; then
+  AX_BSWAP64
+fi
 if test "$target_os" != "mingw32"; then
-AX_RANDOM_DEVICE
+  AX_RANDOM_DEVICE
 fi
-
-AX_CHECK_MOUNT_POINT([],[])
+AX_CHECK_MOUNT_POINT(,[
+  if test "$target_os" != "mingw32" -a "$target_os" != "winnt"; then
+    AC_MSG_ERROR([[cannot work out how to discover mount points on your platform]])
+  fi
+  ])
 AX_CHECK_MALLOC_WORKAROUND
 
 
@@ -113,27 +133,32 @@
 AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle getpid])
 AX_FUNC_SYSCALL
 AX_CHECK_SYSCALL_LSEEK
+AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr])
+AC_CHECK_DECLS([XATTR_NOFOLLOW],,, [[#include <sys/xattr.h>]])
 
 
 ### Miscellaneous complicated feature checks
 
 ## Check for large file support active. AC_SYS_LARGEFILE has already worked
-## out how to enable it if necessary, we need to know if we've got it so we
-## can disable the raidfile intercepts
+## out how to enable it if necessary, we just use this to report to the user
 AC_CACHE_CHECK([if we have large file support enabled], [have_large_file_support],
   [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[
       return sizeof(off_t)==4;
     ]])],
     [have_large_file_support=yes], [have_large_file_support=no]
   )])
-if test "x$have_large_file_support" = "xyes"; then
-  AC_DEFINE([HAVE_LARGE_FILE_SUPPORT], 1, [Define to 1 large file support is in use])
-fi
 
 ## Find out how to do file locking
 AC_CHECK_FUNCS([flock])
 AC_CHECK_DECLS([O_EXLOCK],,, [[#include <fcntl.h>]])
 AC_CHECK_DECLS([F_SETLK],,, [[#include <fcntl.h>]])
+if test "x$ac_cv_func_flock" != "xyes" && \
+   test "x$ac_cv_have_decl_O_EXLOCK" != "xyes" && \
+   test "x$ac_cv_have_decl_F_SETLK" != "xyes" && \
+   test "$target_os" != "mingw32" -a "$target_os" != "winnt"
+then
+  AC_MSG_ERROR([[cannot work out how to do file locking on your platform]])
+fi
 
 ## Get tmpdir
 temp_directory_name="/tmp"
@@ -148,7 +173,7 @@
   [static-bin],
   [AC_HELP_STRING([--enable-static-bin], [Link binaries with static libraries])])
 if test "x$enable_static_bin" = "xyes"; then
-  AC_CHECK_LIB([ssl],[SSL_read],[],[],[crypto])
+  AC_CHECK_LIB([ssl],[SSL_read],,, [crypto])
   LIBS="-Wl,-Bstatic $LIBS -Wl,-Bdynamic"
 fi
 
@@ -169,7 +194,7 @@
 to the documentation for more information on each feature.
 
 Large files:         $have_large_file_support
-Berkeley DB:         $ac_have_bdb
+Berkeley DB:         $ax_path_bdb_ok
 Readline:            $have_libreadline
 Extended attributes: $ac_cv_header_sys_xattr_h
 EOC
@@ -191,12 +216,7 @@
   *readline*)
     echo
     AC_MSG_WARN([[do not distribute binaries compiled against GNU readline,
-as this would violate the GNU readline licence, which is GPL. You may use
+as this could violate the GNU readline licence, which is GPL. You may use
 libedit or libeditline instead.]])
     ;;
 esac
-
-if test "x$ac_have_bdb" != "xyes"; then
-  echo
-  AC_MSG_WARN([[db is not installed -- will run in reduced efficiency mode without it]])
-fi

Modified: box/chris/win32/vc2005-compile-fixes/distribution/COMMON-MANIFEST.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/distribution/COMMON-MANIFEST.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/distribution/COMMON-MANIFEST.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,3 +1,4 @@
+RUN ./bootstrap
 lib/common
 lib/crypto
 lib/server
@@ -2,2 +3,3 @@
 lib/compress
+lib/win32
 test/common
@@ -8,6 +10,7 @@
 test/basicserver/testfiles
 test/crypto
 test/compress
+test/win32
 docs/common notes
 docs/common/lib_common notes/lib_common
 docs/common/lib_crypto notes/lib_crypto
@@ -15,10 +18,16 @@
 MKDIR infrastructure
 infrastructure/buildenv-testmain-template.cpp
 infrastructure/makebuildenv.pl
-infrastructure/BoxPlatform.pm
+infrastructure/BoxPlatform.pm.in
 infrastructure/makeparcels.pl
-MKDIR infrastructure/tests
-infrastructure/tests/common_tests.pl
+configure.ac
+NO-LICENSE config.sub
+config.sub
+NO-LICENSE config.guess
+config.guess
+bootstrap
 parcels.txt
+runtest.pl
+NO-LICENSE-IN-DIR infrastructure/m4
+infrastructure/m4
 configure
-runtest.pl

Modified: box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -6,6 +6,7 @@
 bin/bbstored
 bin/bbstoreaccounts
 bin/bbackupd
+bin/bbackupd/win32
 bin/bbackupquery
 bin/bbackupctl
 bin/bbackupobjdump

Modified: box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/LICENSE.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/LICENSE.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/LICENSE.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,6 +1,6 @@
  
-Copyright (c) 2003, 2005
-     Ben Summers.  All rights reserved.
+Copyright (c) 2003 - 2006
+     Ben Summers and contributors.  All rights reserved.
  
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
@@ -11,7 +11,7 @@
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.
 3. All use of this software and associated advertising materials must 
-   display the following acknowledgement:
+   display the following acknowledgment:
        This product includes software developed by Ben Summers.
 4. The names of the Authors may not be used to endorse or promote
    products derived from this software without specific prior written

Modified: box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/THANKS.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/THANKS.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/THANKS.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,6 +1,34 @@
 
+The following developers contributed code to version 0.10:
+
+Nick Knight
+  - ported Box Backup to Windows (properly, not using Cygwin)
+ 
+Gary Niemcewicz
+  - added client/server (SSL) keepalives to keep the connection to the
+    server alive during a long diff, and saving the daemon's state across restarts
+
+Martin Ebourne
+  - ported to Solaris; wrote extended attribute support (xattr);
+    converted to use autoconf for automatic compiler configuration.
+
+Chris Wilson
+  - updated Nick's and Gary's work to fit in with the new trunk,
+    fixed some issues pointed out by Ben and Martin, made it compile
+    on Windows with the free MinGW compiler.
+
+Jonathan Morton
+  - vastly improved the performance and efficiency of the file-diffing code, and
+    obtained a free G5 PowerMac from IBM as his reward.
+
+
+----
+
 Many individuals have helped with the development of Box Backup by testing, reporting experiences, and making suggestions. In particular, thanks are due to
 
+Charles Lecklider
+  - Helped with the finer details of Win32 programming
+
 Pascal Lalonde
   - Comprehensive and accurate bug reports, and constructive feedback
 
@@ -17,6 +45,7 @@
 
 Per Thomsen
   - Cygwin Windows service install scripts and build notes
+  - Answering queries on the boxbackup mailing list
 
 Tim Fletcher
 David Harris
@@ -35,3 +64,6 @@
 John Pybus
   - Ideas and feature requests
   - Useful little patches to code
+
+Stefan Norlin
+  - Help with testing and fixes on lots of different Solaris platforms

Modified: box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/VERSION.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/VERSION.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/VERSION.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,2 +1,2 @@
-0.08
+0.09_plus2
 boxbackup

Modified: box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/contrib/rpm/boxbackup.spec
===================================================================
--- box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/contrib/rpm/boxbackup.spec	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/distribution/boxbackup/contrib/rpm/boxbackup.spec	2006-02-03 20:21:10 UTC (rev 365)
@@ -3,7 +3,7 @@
 
 # Detect distribution. So far we only special-case SUSE. If you need to make
 # any distro specific changes to get the package building on your system
-# please email them to martin@zepler.org
+# please email them to boxbackup-dev@fluffy.co.uk
 #%define is_fc   %(test -e %{_sysconfdir}/fedora-release && echo 1 || echo 0)
 #%define is_mdk  %(test -e %{_sysconfdir}/mandrake-release && echo 1 || echo 0)
 #%define is_rh   %(test -e %{_sysconfdir}/redhat-release && echo 1 || echo 0)
@@ -25,7 +25,7 @@
 Release: 1
 License: BSD
 Group: Applications/Archiving
-Packager: Martin Ebourne <martin@zepler.org>
+Packager: Martin Ebourne <boxbackup-dev@fluffy.co.uk>
 URL: http://www.fluffy.co.uk/boxbackup/
 Source0: %{ident}.tgz
 Requires: openssl >= 0.9.7a
@@ -72,7 +72,8 @@
 %setup -q
 
 %build
-./configure
+test -e configure || ./bootstrap
+%configure
 
 make
 
@@ -194,6 +195,9 @@
 %{_sbindir}/raidfile-config
 
 %changelog
+* Wed Dec 28 2005 Martin Ebourne <martin@zepler.org>
+- Box now uses autoconf so use configure macro
+
 * Fri Oct  1 2004 Martin Ebourne <martin@zepler.org> - 0.08-3
 - Moved most of the exes to /usr/sbin
 - SUSE updates from Chris Smith

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/BoxPlatform.pm.in	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/BoxPlatform.pm.in	2006-02-03 20:21:10 UTC (rev 365)
@@ -21,6 +21,7 @@
 
 	# blank extra flags by default
 	$platform_compile_line_extra = '@CPPFLAGS@ @CXXFLAGS@ @CXXFLAGS_STRICT@';
+	$platform_compile_line_extra =~ s/ -O2//;
 	$platform_link_line_extra = '@LDFLAGS@';
 	$platform_lib_files = '@LIBS@';
 	$target_os = '@target_os@';
@@ -51,7 +52,7 @@
 		# test for fink installation
 		if(-d '/sw/include' && -d '/sw/lib')
 		{
-			print "Fink installation detected, will use headers and libraries\n";
+			print "Fink installation detected, will use headers and libraries\n\n\n";
 			$platform_compile_line_extra = '-I/sw/include ';
 			$platform_link_line_extra = '-L/sw/lib ';
 		}

Copied: box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_bswap64.m4 (from rev 364, box/trunk/infrastructure/m4/ax_bswap64.m4)

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_check_mount_point.m4
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_check_mount_point.m4	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_check_mount_point.m4	2006-02-03 20:21:10 UTC (rev 365)
@@ -19,10 +19,18 @@
 
 AC_DEFUN([AX_CHECK_MOUNT_POINT], [
   AC_CHECK_FUNCS([getmntent statfs])
-  AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/mount.h],,, [[#include <stdio.h>]])
+  AC_CHECK_HEADERS([sys/param.h])
+  AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/mount.h],,, [[
+    #include <stdio.h>
+    #ifdef HAVE_SYS_PARAM_H
+      #include <sys/param.h>
+    #endif
+    ]])
   # BSD
   AC_CHECK_MEMBERS([struct statfs.f_mntonname],,, [[
-    #include <sys/param.h>
+    #ifdef HAVE_SYS_PARAM_H
+      #include <sys/param.h>
+    #endif
     #include <sys/mount.h>
     ]])
   # Linux

Copied: box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_compare_version.m4 (from rev 364, box/trunk/infrastructure/m4/ax_compare_version.m4)

Copied: box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_path_bdb.m4 (from rev 364, box/trunk/infrastructure/m4/ax_path_bdb.m4)

Copied: box/chris/win32/vc2005-compile-fixes/infrastructure/m4/ax_split_version.m4 (from rev 364, box/trunk/infrastructure/m4/ax_split_version.m4)

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/m4/vl_lib_readline.m4
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/m4/vl_lib_readline.m4	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/m4/vl_lib_readline.m4	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,4 +1,4 @@
-dnl @synopsis VL_LIB_READLINE
+dnl @synopsis VL_LIB_READLINE([ACTION-IF-TRUE], [ACTION-IF-FALSE])
 dnl
 dnl Searches for a readline compatible library. If found, defines
 dnl `HAVE_LIBREADLINE'. If the found library has the `add_history'
@@ -46,6 +46,8 @@
 dnl Modifications to add --enable-gnu-readline to work around licensing
 dnl problems between the traditional BSD licence and the GPL.
 dnl Martin Ebourne, 2005/7/11
+dnl Rewrite to match headers with libraries and be more selective.
+dnl Martin Ebourne, 2006/1/4
 dnl
 dnl @category InstalledPackages
 dnl @author Ville Laurikari <vl@iki.fi>
@@ -56,16 +58,34 @@
   AC_ARG_ENABLE(
     [gnu-readline],
     AC_HELP_STRING([--enable-gnu-readline],
-                   [Allow use of GNU readline (may violate GNU licence)])
+                   [Use GNU readline if present (may violate GNU licence)])
   )
-  vl_gnu_readline_lib=""
+  vl_cv_lib_readline_compat_found=no
   if test "x$enable_gnu_readline" = "xyes"; then
-    vl_gnu_readline_lib=readline
+    VL_LIB_READLINE_CHECK([readline],
+                          [readline],
+                          [readline/readline.h readline.h],
+                          [readline/history.h history.h])
   fi
-  AC_CACHE_CHECK([for a readline compatible library],
-                 vl_cv_lib_readline, [
+  if test "x$vl_cv_lib_readline_compat_found" = "xno"; then
+    VL_LIB_READLINE_CHECK([editline],
+                          [edit editline],
+	  		  [editline/readline.h],
+			  [editline/readline.h])
+  fi
+  if test "x$vl_cv_lib_readline_compat_found" = "xyes"; then
+    m4_ifvaln([$1],[$1],[:])dnl
+    m4_ifvaln([$2],[else $2])dnl
+  fi
+])
+
+dnl VL_LIB_READLINE_CHECK(name, libraries, headers, history headers)
+AC_DEFUN([VL_LIB_READLINE_CHECK], [
+  AC_CACHE_CHECK([for $1 library],
+                 [vl_cv_lib_$1], [
     ORIG_LIBS="$LIBS"
-    for readline_lib in edit editline $vl_gnu_readline_lib; do
+    vl_cv_lib_$1=""
+    for readline_lib in $2; do
       for termcap_lib in "" termcap curses ncurses; do
         if test -z "$termcap_lib"; then
           TRY_LIB="-l$readline_lib"
@@ -73,34 +93,43 @@
           TRY_LIB="-l$readline_lib -l$termcap_lib"
         fi
         LIBS="$ORIG_LIBS $TRY_LIB"
-        AC_TRY_LINK_FUNC(readline, vl_cv_lib_readline="$TRY_LIB")
-        if test -n "$vl_cv_lib_readline"; then
+        AC_TRY_LINK_FUNC([readline], [vl_cv_lib_$1="$TRY_LIB"])
+        if test -n "$vl_cv_lib_$1"; then
           break
         fi
       done
-      if test -n "$vl_cv_lib_readline"; then
+      if test -n "$vl_cv_lib_$1"; then
         break
       fi
     done
-    if test -z "$vl_cv_lib_readline"; then
-      vl_cv_lib_readline="no"
+    if test -z "$vl_cv_lib_$1"; then
+      vl_cv_lib_$1=no
       LIBS="$ORIG_LIBS"
     fi
   ])
 
-  if test "x$vl_cv_lib_readline" != "xno"; then
-    AC_DEFINE(HAVE_LIBREADLINE, 1,
+  vl_cv_lib_readline_compat_found=no
+  if test "x$vl_cv_lib_$1" != "xno"; then
+    AC_CHECK_HEADERS([$3], [vl_cv_lib_readline_compat_found=yes])
+  fi
+
+  if test "x$vl_cv_lib_readline_compat_found" = "xyes"; then
+    AC_DEFINE([HAVE_LIBREADLINE], 1,
               [Define if you have a readline compatible library])
-    AC_CHECK_HEADERS(readline.h readline/readline.h)
-    AC_CACHE_CHECK([whether readline supports history],
-                   vl_cv_lib_readline_history, [
-      vl_cv_lib_readline_history="no"
-      AC_TRY_LINK_FUNC(add_history, vl_cv_lib_readline_history="yes")
+
+    AC_CACHE_CHECK([whether $1 supports history],
+                   [vl_cv_lib_$1_history], [
+      vl_cv_lib_$1_history=no
+      AC_TRY_LINK_FUNC([add_history], [vl_cv_lib_$1_history=yes])
     ])
-    if test "x$vl_cv_lib_readline_history" = "xyes"; then
-      AC_DEFINE(HAVE_READLINE_HISTORY, 1,
-                [Define if your readline library has \`add_history'])
-      AC_CHECK_HEADERS(history.h readline/history.h)
+    if test "x$vl_cv_lib_$1_history" = "xyes"; then
+      vl_cv_lib_$1_history=no
+      AC_CHECK_HEADERS(
+        [$4],
+	[AC_DEFINE([HAVE_READLINE_HISTORY], [1],
+                   [Define if your readline library has add_history])])
     fi
+  else
+    LIBS="$ORIG_LIBS"
   fi
 ])dnl

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/makebuildenv.pl
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/makebuildenv.pl	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/makebuildenv.pl	2006-02-03 20:21:10 UTC (rev 365)
@@ -38,6 +38,13 @@
 # flags about the environment
 my %env_flags;
 
+my $windows_include_path = "-I../../lib/win32 ";
+if ($target_os ne "mingw32" && $target_os ne "winnt")
+{
+	$windows_include_path = "";
+	$env_flags{'IGNORE_lib/win32'} = 1;
+}
+
 # print "Flag: $_\n" for(keys %env_flags);
 
 # seed autogen code
@@ -343,8 +350,8 @@
 {
 	opendir DIR,$mod;
 	for my $h (grep /\.h\Z/i, readdir DIR)
-	{	
-		next if /\A\._/;	# Temp Mac OS Resource hack
+	{
+		next if $h =~ /\A\./;		# Ignore Mac resource forks, autosaves, etc
 
 		open FL,"$mod/$h" or die "can't open $mod/$h";
 		my $f;
@@ -447,7 +454,7 @@
 	
 
 	# make include path
-	my $include_paths = "-I../../lib/win32 " .
+	my $include_paths = $windows_include_path .
 		join(' ',map {'-I../../'.$_} @all_deps_for_module);
 
 	# is target a library?

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/makedistribution.pl
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/makedistribution.pl	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/makedistribution.pl	2006-02-03 20:21:10 UTC (rev 365)
@@ -78,6 +78,19 @@
 		{
 			replace_version_in($dst);
 		}
+		elsif($src eq 'NO-LICENSE')
+		{
+			$no_license{$dst} = 1;
+		}
+		elsif($src eq 'RUN')
+		{
+			print "Running $dst...\n";
+			if(system($dst) != 0)
+			{
+				print "Error running $dst. Aborting.\n";
+				exit(1);
+			}
+		}
 		elsif(-d $src)
 		{
 			$modules_included{$_} = 1;
@@ -205,8 +218,8 @@
 		}
 	}
 	
-	# make sure perl scripts are marked as executable, and other things aren't
-	if($ext eq 'pl' || $ext eq '')
+	# copy executable bit from src
+	if(-x $fn)
 	{
 		system 'chmod','a+x',"$base_name/$dst_fn"
 	}

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-03 20:21:10 UTC (rev 365)
@@ -104,7 +104,7 @@
 	print MAKE $target,":\n";
 	
 	my $dir = parcel_dir($parcel);
-	print MAKE "\tmkdir $dir\n";
+	print MAKE "\ttest -d $dir || mkdir $dir\n";
 	
 	open SCRIPT,">parcels/scripts/install-$parcel" or die "Can't open installer script for $parcel for writing";
 	print SCRIPT "#!/bin/sh\n\n";
@@ -169,7 +169,7 @@
 
 sub parcel_root
 {
-	$product_name.'-'.$product_version.'-'.$_[0].'-'.$build_os.$os_suffix
+	$product_name.'-'.$product_version.'-'.$_[0].'-'.$target_os.$os_suffix
 }
 
 sub parcel_dir

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientFileAttributes.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientFileAttributes.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupClientFileAttributes.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -520,18 +520,24 @@
 				int valueSizeOffset = xattrSize;
 				xattrSize += sizeof(u_int32_t);
 
-				// This gets the attribute value (may be text or binary), no termination
-				int valueSize = ::lgetxattr(Filename, attrKey.c_str(), buffer+xattrSize, xattrBufferSize-xattrSize);
+				// Find size of attribute (must call with buffer and length 0 on some platforms,
+				// as -1 is returned if the data doesn't fit.)
+				int valueSize = ::lgetxattr(Filename, attrKey.c_str(), 0, 0);
+				if(valueSize<0)
+				{
+					THROW_EXCEPTION(CommonException, OSFileError);
+				}
 
+				// Resize block, if needed
 				if(xattrSize+valueSize>xattrBufferSize)
 				{
 					xattrBufferSize = (xattrBufferSize+valueSize)*2;
 					outputBlock.ResizeBlock(xattrBufferSize);
 					buffer = static_cast<unsigned char*>(outputBlock.GetBuffer());
-
-					valueSize = ::lgetxattr(Filename, attrKey.c_str(), buffer+xattrSize, xattrBufferSize-xattrSize);
 				}
 
+				// This gets the attribute value (may be text or binary), no termination
+				valueSize = ::lgetxattr(Filename, attrKey.c_str(), buffer+xattrSize, xattrBufferSize-xattrSize);
 				if(valueSize<0)
 				{
 					THROW_EXCEPTION(CommonException, OSFileError);

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupDaemonConfigVerify.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupDaemonConfigVerify.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupDaemonConfigVerify.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -84,6 +84,8 @@
 	{"ExtendedLogging",	"no", ConfigTest_IsBool, 0},			// make value "yes" to enable in config file
 
 	{"CommandSocket", 0, 0, 0},				// not compulsory to have this
+	{"KeepAliveTime", 0, ConfigTest_IsInt, 0},				// optional
+ 	{"StoreObjectInfoFile", 0, 0, 0},				// optional
 
 	{"NotifyScript", 0, 0, 0},				// optional script to run when backup needs attention, eg store full
 	
@@ -102,4 +104,3 @@
 	ConfigTest_Exists | ConfigTest_LastEntry,
 	0
 };
-

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreDirectory.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -36,7 +36,7 @@
 	// Then a StreamableMemBlock for attributes
 } dir_StreamFormat;
 
-enum
+typedef enum
 {
 	Option_DependencyInfoPresent = 1
 } dir_StreamFormatOptions;

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -1504,3 +1504,27 @@
 }
 
 
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    DiffTimer::DiffTimer();
+//		Purpose: Constructor
+//		Created: 2005/02/01
+//
+// --------------------------------------------------------------------------
+DiffTimer::DiffTimer()
+{
+}
+
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    DiffTimer::DiffTimer();
+//		Purpose: Destructor
+//		Created: 2005/02/01
+//
+// --------------------------------------------------------------------------
+DiffTimer::~DiffTimer()
+{	
+}

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFile.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -38,6 +38,27 @@
 // --------------------------------------------------------------------------
 //
 // Class
+//		Name:    DiffTimer
+//		Purpose: Interface for classes that can keep track of diffing time,
+//				 and send SSL keepalive messages
+//		Created: 2006/01/19
+//
+// --------------------------------------------------------------------------
+class DiffTimer
+{
+public:
+	DiffTimer();
+	virtual ~DiffTimer();
+public:
+	virtual void   DoKeepAlive() = 0;
+	virtual time_t GetTimeMgmtEpoch() = 0;
+	virtual int    GetMaximumDiffingTime() = 0;
+	virtual int    GetKeepaliveTime() = 0;
+};
+
+// --------------------------------------------------------------------------
+//
+// Class
 //		Name:    BackupStoreFile
 //		Purpose: Class to hold together utils for maniplating files.
 //		Created: 2003/08/28
@@ -95,9 +116,16 @@
 
 	// Main interface
 	static std::auto_ptr<IOStream> EncodeFile(const char *Filename, int64_t ContainerID, const BackupStoreFilename &rStoreFilename, int64_t *pModificationTime = 0);
-	static std::auto_ptr<IOStream> EncodeFileDiff(const char *Filename, int64_t ContainerID,
-		const BackupStoreFilename &rStoreFilename, int64_t DiffFromObjectID, IOStream &rDiffFromBlockIndex,
-		int Timeout, int64_t *pModificationTime = 0, bool *pIsCompletelyDifferent = 0);
+	static std::auto_ptr<IOStream> EncodeFileDiff
+	(
+		const char *Filename, int64_t ContainerID,
+		const BackupStoreFilename &rStoreFilename, 
+		int64_t DiffFromObjectID, IOStream &rDiffFromBlockIndex,
+		int Timeout, 
+		DiffTimer *pDiffTimer,
+		int64_t *pModificationTime = 0, 
+		bool *pIsCompletelyDifferent = 0
+	);
 	static bool VerifyEncodedFileFormat(IOStream &rFile, int64_t *pDiffFromObjectIDOut = 0, int64_t *pContainerIDOut = 0);
 	static void CombineFile(IOStream &rDiff, IOStream &rDiff2, IOStream &rFrom, IOStream &rOut);
 	static void CombineDiffs(IOStream &rDiff1, IOStream &rDiff2, IOStream &rDiff2b, IOStream &rOut);
@@ -144,8 +172,7 @@
 		free(a);
 	}
 
-	// Limits
-	static void SetMaximumDiffingTime(int Seconds);
+	static void DiffTimerExpired();
 
 	// Building blocks
 	class EncodingBuffer
@@ -192,4 +219,3 @@
 #include "MemLeakFindOff.h"
 
 #endif // BACKUPSTOREFILE__H
-

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -11,11 +11,11 @@
 
 #include <new>
 #include <map>
-#include <signal.h>
-#ifdef WIN32
-#include <time.h>
-#else
-#include <sys/time.h>
+
+#ifdef HAVE_TIME_H
+	#include <time.h>
+#elif HAVE_SYS_TIME_H
+	#include <sys/time.h>
 #endif
 
 #include "BackupStoreFile.h"
@@ -43,33 +43,37 @@
 
 static void LoadIndex(IOStream &rBlockIndex, int64_t ThisID, BlocksAvailableEntry **ppIndex, int64_t &rNumBlocksOut, int Timeout, bool &rCanDiffFromThis);
 static void FindMostUsedSizes(BlocksAvailableEntry *pIndex, int64_t NumBlocks, int32_t Sizes[BACKUP_FILE_DIFF_MAX_BLOCK_SIZES]);
-static void SearchForMatchingBlocks(IOStream &rFile, std::map<int64_t, int64_t> &rFoundBlocks, BlocksAvailableEntry *pIndex, int64_t NumBlocks, int32_t Sizes[BACKUP_FILE_DIFF_MAX_BLOCK_SIZES]);
+static void SearchForMatchingBlocks(IOStream &rFile, 
+	std::map<int64_t, int64_t> &rFoundBlocks, BlocksAvailableEntry *pIndex, 
+	int64_t NumBlocks, int32_t Sizes[BACKUP_FILE_DIFF_MAX_BLOCK_SIZES],
+	DiffTimer *pDiffTimer);
 static void SetupHashTable(BlocksAvailableEntry *pIndex, int64_t NumBlocks, int32_t BlockSize, BlocksAvailableEntry **pHashTable);
 static bool SecondStageMatch(BlocksAvailableEntry *pFirstInHashList, RollingChecksum &fastSum, uint8_t *pBeginnings, uint8_t *pEndings, int Offset, int32_t BlockSize, int64_t FileBlockNumber,
 BlocksAvailableEntry *pIndex, std::map<int64_t, int64_t> &rFoundBlocks);
 static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksAvailableEntry *pIndex, int64_t NumBlocks, std::map<int64_t, int64_t> &rFoundBlocks, int64_t SizeOfInputFile);
 
-// Avoid running on too long with diffs
-static int sMaximumDiffTime = 600;		// maximum time to spend diffing
-static bool sDiffTimedOut = false;
-static bool sSetTimerSignelHandler = false;
-static void TimerSignalHandler(int signal);
-static void StartDiffTimer();
+// sDiffTimerExpired flags when the diff timer has expired. When true, the 
+// diff routine should check the wall clock as soon as possible, to determine 
+// whether it's time for a keepalive to be sent, or whether the diff has been 
+// running for too long and should be terminated.
+static bool sDiffTimerExpired = false;
 
 
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    BackupStoreFile::SetMaximumDiffingTime(int)
-//		Purpose: Sets the maximum time to spend diffing, in seconds. Time is
-//				 process virutal time.
-//		Created: 19/3/04
+//		Name:    BackupStoreFile::DiffTimerExpired()
+//		Purpose: Notifies BackupStoreFile object that the diff operation
+//				 timer has expired, which may mean that a keepalive should
+//				 be sent, or the diff should be terminated. Called from an
+//				 external timer, so it should not do more than set a flag.
 //
+//		Created: 19/1/06
+//
 // --------------------------------------------------------------------------
-void BackupStoreFile::SetMaximumDiffingTime(int Seconds)
+void BackupStoreFile::DiffTimerExpired()
 {
-	sMaximumDiffTime = Seconds;
-	TRACE1("Set maximum diffing time to %d seconds\n", Seconds);
+	sDiffTimerExpired = true;
 }
 
 
@@ -139,9 +143,12 @@
 //		Created: 12/1/04
 //
 // --------------------------------------------------------------------------
-std::auto_ptr<IOStream> BackupStoreFile::EncodeFileDiff(const char *Filename, int64_t ContainerID,
-	const BackupStoreFilename &rStoreFilename, int64_t DiffFromObjectID, IOStream &rDiffFromBlockIndex,
-	int Timeout, int64_t *pModificationTime, bool *pIsCompletelyDifferent)
+std::auto_ptr<IOStream> BackupStoreFile::EncodeFileDiff
+(
+	const char *Filename, int64_t ContainerID,
+	const BackupStoreFilename &rStoreFilename, int64_t DiffFromObjectID, 
+	IOStream &rDiffFromBlockIndex, int Timeout, DiffTimer *pDiffTimer, 
+	int64_t *pModificationTime, bool *pIsCompletelyDifferent)
 {
 	// Is it a symlink?
 	{
@@ -180,9 +187,6 @@
 	
 	// Pointer to recipe we're going to create
 	BackupStoreFileEncodeStream::Recipe *precipe = 0;
-
-	// Start the timeout timer, so that the operation doesn't continue for ever
-	StartDiffTimer();
 	
 	try
 	{
@@ -204,7 +208,8 @@
 				// Get size of file
 				sizeOfInputFile = file.BytesLeftToRead();
 				// Find all those lovely matching blocks
-				SearchForMatchingBlocks(file, foundBlocks, pindex, blocksInIndex, sizesToScan);
+				SearchForMatchingBlocks(file, foundBlocks, pindex, 
+					blocksInIndex, sizesToScan, pDiffTimer);
 				
 				// Is it completely different?
 				completelyDifferent = (foundBlocks.size() == 0);
@@ -475,8 +480,20 @@
 //
 // --------------------------------------------------------------------------
 static void SearchForMatchingBlocks(IOStream &rFile, std::map<int64_t, int64_t> &rFoundBlocks,
-	BlocksAvailableEntry *pIndex, int64_t NumBlocks, int32_t Sizes[BACKUP_FILE_DIFF_MAX_BLOCK_SIZES])
+	BlocksAvailableEntry *pIndex, int64_t NumBlocks, 
+	int32_t Sizes[BACKUP_FILE_DIFF_MAX_BLOCK_SIZES], DiffTimer *pDiffTimer)
 {
+	time_t TimeMgmtEpoch   = 0;
+	int MaximumDiffingTime = 0;
+	int KeepAliveTime      = 0;
+
+	if (pDiffTimer)
+	{
+		TimeMgmtEpoch      = pDiffTimer->GetTimeMgmtEpoch();
+		MaximumDiffingTime = pDiffTimer->GetMaximumDiffingTime();
+		KeepAliveTime      = pDiffTimer->GetKeepaliveTime();
+	}
+	
 	std::map<int64_t, int32_t> goodnessOfFit;
 
 	// Allocate the hash lookup table
@@ -643,9 +660,40 @@
 							// End this loop, so the final byte isn't used again
 							break;
 						}
+
+						bool DiffTimedOut = false;
 						
-						if(static_cast<int64_t>(rFoundBlocks.size()) > (NumBlocks * BACKUP_FILE_DIFF_MAX_BLOCK_FIND_MULTIPLE) || sDiffTimedOut)
+						if(sDiffTimerExpired)
 						{
+							ASSERT(TimeMgmtEpoch > 0);
+							ASSERT(pDiffTimer != NULL);
+							
+							time_t tTotalRunIntvl = time(NULL) - TimeMgmtEpoch;
+							
+							if(MaximumDiffingTime > 0 && 
+								tTotalRunIntvl >= MaximumDiffingTime)
+							{
+								TRACE0("MaximumDiffingTime reached - "
+									"suspending file diff\n");
+								DiffTimedOut = true;
+							}
+							else if(KeepAliveTime > 0)
+							{
+								TRACE0("KeepAliveTime reached - "
+									"initiating keep-alive\n");
+								pDiffTimer->DoKeepAlive();
+							}
+
+							sDiffTimerExpired = false;
+						}
+
+						int64_t NumBlocksFound = static_cast<int64_t>(
+							rFoundBlocks.size());
+						int64_t MaxBlocksFound = NumBlocks * 
+							BACKUP_FILE_DIFF_MAX_BLOCK_FIND_MULTIPLE;
+						
+						if(NumBlocksFound > MaxBlocksFound || DiffTimedOut)
+						{
 							abortSearch = true;
 							break;
 						}
@@ -787,7 +835,9 @@
 	ASSERT(pFirstInHashList != 0);
 	ASSERT(pIndex != 0);
 
-	uint16_t Hash = fastSum.GetComponentForHashing();
+#ifndef NDEBUG
+	uint16_t DEBUG_Hash = fastSum.GetComponentForHashing();
+#endif
 	uint32_t Checksum = fastSum.GetChecksum();
 
 	// Before we go to the expense of the MD5, make sure it's a darn good match on the checksum we already know.
@@ -825,7 +875,7 @@
 	{
 		//TRACE3("scan size %d, block size %d, hash %d\n", scan->mSize, BlockSize, Hash);
 		ASSERT(scan->mSize == BlockSize);
-		ASSERT(RollingChecksum::ExtractHashingComponent(scan->mWeakChecksum) == Hash);
+		ASSERT(RollingChecksum::ExtractHashingComponent(scan->mWeakChecksum) == DEBUG_Hash);
 	
 		// Compare?
 		if(strong.DigestMatches(scan->mStrongChecksum))
@@ -1005,60 +1055,3 @@
 	}
 #endif
 }
-
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    static TimerSignalHandler(int)
-//		Purpose: Signal handler
-//		Created: 19/3/04
-//
-// --------------------------------------------------------------------------
-void TimerSignalHandler(int signal)
-{
-	sDiffTimedOut = true;
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    static StartDiffTimer()
-//		Purpose: Starts the diff timeout timer
-//		Created: 19/3/04
-//
-// --------------------------------------------------------------------------
-void StartDiffTimer()
-{
-#ifdef WIN32
-	// no support for SIGVTALRM
-	SetTimerHandler(TimerSignalHandler);
-#else
-	// Set timer signal handler
-	if(!sSetTimerSignelHandler)
-	{
-		::signal(SIGVTALRM, TimerSignalHandler);
-		sSetTimerSignelHandler = true;
-	}
-#endif
-
-	struct itimerval timeout;
-	// Don't want this to repeat
-	timeout.it_interval.tv_sec = 0;
-	timeout.it_interval.tv_usec = 0;
-	// Single timeout after the specified number of seconds
-	timeout.it_value.tv_sec = sMaximumDiffTime;
-	timeout.it_value.tv_usec = 0;
-	// Set timer
-	if(::setitimer(ITIMER_VIRTUAL, &timeout, NULL) != 0)
-	{
-		TRACE0("WARNING: couldn't set diff timeout\n");
-	}
-	
-	// Unset flag (last thing)
-	sDiffTimedOut = false;
-}
-
-
-

Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilenameClear.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilenameClear.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFilenameClear.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -184,28 +184,34 @@
 // Buffer for encoding and decoding -- do this all in one single buffer to
 // avoid lots of string allocation, which stuffs up memory usage.
 // These static memory vars are, of course, not thread safe, but we don't use threads.
-#ifndef NDEBUG
-static int sEncDecBufferSize = 2;	// small size for debug builds
-#else
-static int sEncDecBufferSize = 256;
-#endif
-static MemoryBlockGuard<uint8_t *> spEncDecBuffer(sEncDecBufferSize);
+static int sEncDecBufferSize = 0;
+static MemoryBlockGuard<uint8_t *> *spEncDecBuffer = 0;
 
-// fudge to stop leak reporting
-#ifdef BOX_MEMORY_LEAK_TESTING
-namespace
+static void EnsureEncDecBufferSize(int BufSize)
 {
-	class leak_off
+	if(spEncDecBuffer == 0)
 	{
-	public:
-		leak_off()
+#ifndef WIN32
+		TRACE1("Allocating filename encoding/decoding buffer with size %d\n", BufSize);
+#endif
+		spEncDecBuffer = new MemoryBlockGuard<uint8_t *>(BufSize);
+		MEMLEAKFINDER_NOT_A_LEAK(spEncDecBuffer);
+		MEMLEAKFINDER_NOT_A_LEAK(*spEncDecBuffer);
+		sEncDecBufferSize = BufSize;
+	}
+	else
+	{
+		if(sEncDecBufferSize < BufSize)
 		{
-			MEMLEAKFINDER_NOT_A_LEAK(spEncDecBuffer);
+#ifndef WIN32
+			TRACE2("Reallocating filename encoding/decoding buffer from %d to %d\n", sEncDecBufferSize, BufSize);
+#endif
+			spEncDecBuffer->Resize(BufSize);
+			sEncDecBufferSize = BufSize;
+			MEMLEAKFINDER_NOT_A_LEAK(*spEncDecBuffer);
 		}
-	};
-	leak_off dont_report_as_leak;
+	}
 }
-#endif
 
 // --------------------------------------------------------------------------
 //
@@ -221,18 +227,10 @@
 	int maxOutSize = rCipherContext.MaxOutSizeForInBufferSize(rToEncode.size()) + 4;
 	
 	// Make sure encode/decode buffer has enough space
-	if(sEncDecBufferSize < maxOutSize)
-	{
-#ifndef WIN32
-		TRACE2("Reallocating filename encoding/decoding buffer from %d to %d\n", sEncDecBufferSize, maxOutSize);
-#endif
-		spEncDecBuffer.Resize(maxOutSize);
-		sEncDecBufferSize = maxOutSize;
-	}
+	EnsureEncDecBufferSize(maxOutSize);
 	
 	// Pointer to buffer
-	uint8_t *buffer = spEncDecBuffer;
-	MEMLEAKFINDER_NOT_A_LEAK(buffer);
+	uint8_t *buffer = *spEncDecBuffer;
 	
 	// Encode -- do entire block in one go
 	int encSize = rCipherContext.TransformBlock(buffer + 2, sEncDecBufferSize - 2, rToEncode.c_str(), rToEncode.size());
@@ -261,18 +259,10 @@
 	int maxOutSize = rCipherContext.MaxOutSizeForInBufferSize(size()) + 4;
 	
 	// Make sure encode/decode buffer has enough space
-	if(sEncDecBufferSize < maxOutSize)
-	{
-#ifndef WIN32
-		TRACE2("Reallocating filename encoding/decoding buffer from %d to %d\n", sEncDecBufferSize, maxOutSize);
-#endif
-		spEncDecBuffer.Resize(maxOutSize);
-		sEncDecBufferSize = maxOutSize;
-	}
+	EnsureEncDecBufferSize(maxOutSize);
 	
 	// Pointer to buffer
-	uint8_t *buffer = spEncDecBuffer;
-	MEMLEAKFINDER_NOT_A_LEAK(buffer);
+	uint8_t *buffer = *spEncDecBuffer;
 	
 	// Decrypt
 	const char *str = c_str() + 2;


Property changes on: box/chris/win32/vc2005-compile-fixes/lib/common
___________________________________________________________________
Name: svn:ignore
   - autogen_CommonException.cpp
autogen_CommonException.h
autogen_ConversionException.cpp
autogen_ConversionException.h
config.h
config.h.in
Makefile

   + autogen_CommonException.cpp
autogen_CommonException.h
autogen_ConversionException.cpp
autogen_ConversionException.h
BoxConfig.h
BoxConfig.h.in
Makefile



Copied: box/chris/win32/vc2005-compile-fixes/lib/common/Archive.h (from rev 364, box/trunk/lib/common/Archive.h)

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/Box.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/Box.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/Box.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -114,6 +114,10 @@
 
 // extra macros for converting to network byte order
 
+#ifdef HAVE_NETINET_IN_H
+	#include <netinet/in.h>
+#endif
+
 // Always define a swap64 function, as it's useful.
 inline uint64_t box_swap64(uint64_t x)
 {
@@ -130,14 +134,20 @@
 #ifdef WORDS_BIGENDIAN
 	#define box_hton64(x) (x)
 	#define box_ntoh64(x) (x)
+#elif defined(HAVE_BSWAP64)
+	#ifdef HAVE_SYS_ENDIAN_H
+		#include <sys/endian.h>
+	#endif
+	#ifdef HAVE_ASM_BYTEORDER_H
+		#include <asm/byteorder.h>
+	#endif
+
+	#define box_hton64(x) BSWAP64(x)
+	#define box_ntoh64(x) BSWAP64(x)
 #else
 	#define box_hton64(x) box_swap64(x)
 	#define box_ntoh64(x) box_swap64(x)
 #endif
 
-#ifdef HAVE_NETINET_IN_H
-	#include <netinet/in.h>
-#endif
-
 #endif // BOX__H
 

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/BoxPlatform.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/BoxPlatform.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/BoxPlatform.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -21,7 +21,7 @@
 
 #define PLATFORM_DEV_NULL			"/dev/null"
 
-#include "config.h"
+#include "BoxConfig.h"
 
 #ifdef WIN32
 	// need msvcrt version 6.1 or higher for _gmtime64()
@@ -40,6 +40,12 @@
 	#endif
 #endif
 
+// Slight hack; disable interception on Darwin within raidfile test
+#ifdef __APPLE__
+	// TODO: Replace with autoconf test
+	#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
+#endif
+
 // Find out if credentials on UNIX sockets can be obtained
 #ifndef HAVE_GETPEEREID
 	#if !HAVE_DECL_SO_PEERCRED
@@ -47,11 +53,6 @@
 	#endif
 #endif
 
-// Cannot do the intercepts in test/raidfile if large file support is enabled
-#ifdef HAVE_LARGE_FILE_SUPPORT
-	#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
-#endif
-
 #ifdef HAVE_DEFINE_PRAGMA
 	// set packing to one bytes (can't use push/pop on gcc)
 	#define BEGIN_STRUCTURE_PACKING_FOR_WIRE	#pragma pack(1)
@@ -62,6 +63,19 @@
 	#define STRUCTURE_PACKING_FOR_WIRE_USE_HEADERS
 #endif
 
+// Handle differing xattr APIs
+#ifdef HAVE_SYS_XATTR_H
+	#if !defined(HAVE_LLISTXATTR) && defined(HAVE_LISTXATTR) && HAVE_DECL_XATTR_NOFOLLOW
+		#define llistxattr(a,b,c) listxattr(a,b,c,XATTR_NOFOLLOW)
+	#endif
+	#if !defined(HAVE_LGETXATTR) && defined(HAVE_GETXATTR) && HAVE_DECL_XATTR_NOFOLLOW
+		#define lgetxattr(a,b,c,d) getxattr(a,b,c,d,0,XATTR_NOFOLLOW)
+	#endif
+	#if !defined(HAVE_LSETXATTR) && defined(HAVE_SETXATTR) && HAVE_DECL_XATTR_NOFOLLOW
+		#define lsetxattr(a,b,c,d,e) setxattr(a,b,c,d,0,(e)|XATTR_NOFOLLOW)
+	#endif
+#endif
+
 #if defined WIN32 && !defined __MINGW32__
 	typedef __int8  int8_t;
 	typedef __int16 int16_t;

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/CommonException.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/CommonException.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/CommonException.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -43,3 +43,4 @@
 KQueueNotSupportedOnThisPlatform		36
 IOStreamGetLineNotEnoughDataToIgnore	37	Bad value passed to IOStreamGetLine::IgnoreBufferedData()
 TempDirPathTooLong				38	Your temporary directory path is too long. Check the TMP and TEMP environment variables.
+ArchiveBlockIncompleteRead		39	The Store Object Info File is too short or corrupted, and will be rewritten automatically when the next backup completes.

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -17,6 +17,7 @@
 #include "ExcludeList.h"
 #include "Utils.h"
 #include "Configuration.h"
+#include "Archive.h"
 
 #include "MemLeakFindOn.h"
 
@@ -130,6 +131,8 @@
 				
 				// Store in list of regular expressions
 				mRegex.push_back(pregex);
+				// Store in list of regular expression string for Serialize
+				mRegexStr.push_back(i->c_str());
 			}
 			catch(...)
 			{
@@ -213,7 +216,183 @@
 	mpAlwaysInclude = pAlwaysInclude;
 }
 
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ExcludeList::Deserialize(Archive & rArchive)
+//		Purpose: Deserializes this object instance from a stream of bytes, using an Archive abstraction.
+//
+//		Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void ExcludeList::Deserialize(Archive & rArchive)
+{
+	//
+	//
+	//
+	mDefinite.clear();
 
-	
+#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+	// free regex memory
+	while(mRegex.size() > 0)
+	{
+		regex_t *pregex = mRegex.back();
+		mRegex.pop_back();
+		// Free regex storage, and the structure itself
+		::regfree(pregex);
+		delete pregex;
+	}
 
+	mRegexStr.clear();
+#endif
 
+	// Clean up exceptions list
+	if(mpAlwaysInclude != 0)
+	{
+		delete mpAlwaysInclude;
+		mpAlwaysInclude = 0;
+	}
+
+	//
+	//
+	//
+	int64_t iCount = 0;
+	rArchive.Read(iCount);
+
+	if (iCount > 0)
+	{
+		for (int v = 0; v < iCount; v++)
+		{
+			// load each one
+			std::string strItem;
+			rArchive.Read(strItem);
+			mDefinite.insert(strItem);
+		}
+	}
+
+	//
+	//
+	//
+#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+	rArchive.Read(iCount);
+
+	if (iCount > 0)
+	{
+		for (int v = 0; v < iCount; v++)
+		{
+			std::string strItem;
+			rArchive.Read(strItem);
+
+			// Allocate memory
+			regex_t* pregex = new regex_t;
+			
+			try
+			{
+				// Compile
+				if(::regcomp(pregex, strItem.c_str(), 
+					REG_EXTENDED | REG_NOSUB) != 0)
+				{
+					THROW_EXCEPTION(CommonException, 
+						BadRegularExpression)
+				}
+				
+				// Store in list of regular expressions
+				mRegex.push_back(pregex);
+
+				// Store in list of regular expression strings
+				// for Serialize
+				mRegexStr.push_back(strItem);
+			}
+			catch(...)
+			{
+				delete pregex;
+				throw;
+			}
+		}
+	}
+#endif // PLATFORM_REGEX_NOT_SUPPORTED
+
+	//
+	//
+	//
+	int64_t aMagicMarker = 0;
+	rArchive.Read(aMagicMarker);
+
+	if (aMagicMarker == ARCHIVE_MAGIC_VALUE_NOOP)
+	{
+		// NOOP
+	}
+	else if (aMagicMarker == ARCHIVE_MAGIC_VALUE_RECURSE)
+	{
+		mpAlwaysInclude = new ExcludeList;
+		if (!mpAlwaysInclude)
+		{
+			throw std::bad_alloc();
+		}
+
+		mpAlwaysInclude->Deserialize(rArchive);
+	}
+	else
+	{
+		// there is something going on here
+		THROW_EXCEPTION(CommonException, Internal)
+	}
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ExcludeList::Serialize(Archive & rArchive)
+//		Purpose: Serializes this object instance into a stream of bytes, using an Archive abstraction.
+//
+//		Created: 2005/04/11
+//
+// --------------------------------------------------------------------------
+void ExcludeList::Serialize(Archive & rArchive) const
+{
+	//
+	//
+	//
+	int64_t iCount = mDefinite.size();
+	rArchive.Write(iCount);
+
+	for (std::set<std::string>::const_iterator i = mDefinite.begin(); 
+		i != mDefinite.end(); i++)
+	{
+		rArchive.Write(*i);
+	}
+
+	//
+	//
+	//
+#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+	// don't even try to save compiled regular expressions,
+	// use string copies instead.
+	ASSERT(mRegex.size() == mRegexStr.size()); 	
+
+	iCount = mRegexStr.size();
+	rArchive.Write(iCount);
+
+	for (std::vector<std::string>::const_iterator i = mRegexStr.begin(); 
+		i != mRegexStr.end(); i++)
+	{
+		rArchive.Write(*i);
+	}
+#endif // PLATFORM_REGEX_NOT_SUPPORTED
+
+	//
+	//
+	//
+	if (!mpAlwaysInclude)
+	{
+		int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_NOOP;
+		rArchive.Write(aMagicMarker);
+	}
+	else
+	{
+		int64_t aMagicMarker = ARCHIVE_MAGIC_VALUE_RECURSE; // be explicit about whether recursion follows
+		rArchive.Write(aMagicMarker);
+
+		mpAlwaysInclude->Serialize(rArchive);
+	}
+}

Modified: box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -19,6 +19,8 @@
 	typedef int regex_t;
 #endif
 
+class Archive;
+
 // --------------------------------------------------------------------------
 //
 // Class
@@ -33,6 +35,9 @@
 	ExcludeList();
 	~ExcludeList();
 
+	void Deserialize(Archive & rArchive);
+	void Serialize(Archive & rArchive) const;
+
 	void AddDefiniteEntries(const std::string &rEntries);
 	void AddRegexEntries(const std::string &rEntries);
 
@@ -55,6 +60,7 @@
 	std::set<std::string> mDefinite;
 #ifdef HAVE_REGEX_H
 	std::vector<regex_t *> mRegex;
+	std::vector<std::string> mRegexStr;	// save original regular expression string-based source for Serialize
 #endif
 
 	// For exceptions to the excludes

Modified: box/chris/win32/vc2005-compile-fixes/lib/crypto/Random.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/crypto/Random.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/crypto/Random.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -69,7 +69,7 @@
 std::string Random::GenerateHex(int Length)
 {
 	uint8_t r[256];
-	if(Length > sizeof(r))
+	if(Length > (int)sizeof(r))
 	{
 		THROW_EXCEPTION(CipherException, LengthRequestedTooLongForRandomHex)
 	}

Modified: box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -13,13 +13,14 @@
 	#include <unistd.h>
 #endif
 
+#include <errno.h>
 #include <stdio.h>
 #include <signal.h>
 #include <string.h>
 #include <stdarg.h>
 
-#ifndef WIN32
-#include <syslog.h>
+#ifdef HAVE_SYSLOG_H
+	#include <syslog.h>
 #endif
 
 #include "Daemon.h"
@@ -27,6 +28,7 @@
 #include "ServerException.h"
 #include "Guards.h"
 #include "UnixUser.h"
+#include "FileModificationTime.h"
 
 #include "MemLeakFindOn.h"
 
@@ -95,22 +97,21 @@
 	}
 
 	std::string pidFileName;
-	const char *configfile = 0;
 
 	try
 	{
 		// Find filename of config file
-		configfile = DefaultConfigFile;
+		mConfigFileName = DefaultConfigFile;
 		if(argc >= 2)
 		{
 			// First argument is config file, or it's -c and the next arg is the config file
 			if(::strcmp(argv[1], "-c") == 0 && argc >= 3)
 			{
-				configfile = argv[2];
+				mConfigFileName = argv[2];
 			}
 			else
 			{
-				configfile = argv[1];
+				mConfigFileName = argv[1];
 			}
 		}
 		
@@ -126,19 +127,25 @@
 
 		// Load the configuration file.
 		std::string errors;
-		std::auto_ptr<Configuration> pconfig = Configuration::LoadAndVerify(configfile, GetConfigVerify(), errors);
+		std::auto_ptr<Configuration> pconfig = 
+			Configuration::LoadAndVerify(
+				mConfigFileName.c_str(), 
+				GetConfigVerify(), errors);
 
 		// Got errors?
 		if(pconfig.get() == 0 || !errors.empty())
 		{
 			// Tell user about errors
-			fprintf(stderr, "%s: Errors in config file %s:\n%s", DaemonName(), configfile, errors.c_str());
+			fprintf(stderr, "%s: Errors in config file %s:\n%s", 
+				DaemonName(), mConfigFileName.c_str(), 
+				errors.c_str());
 			// And give up
 			return 1;
 		}
 		
 		// Store configuration
 		mpConfiguration = pconfig.release();
+		mLoadedConfigModifiedTime = GetConfigFileModifiedTime();
 		
 		// Server configuration
 		const Configuration &serverConfig(mpConfiguration->GetSubConfiguration("Server"));
@@ -231,7 +238,8 @@
 		// open the log
 		::openlog(DaemonName(), LOG_PID, LOG_LOCAL6);
 		// Log the start message
-		::syslog(LOG_INFO, "Starting daemon (config: %s) (version " BOX_VERSION ")", configfile);
+		::syslog(LOG_INFO, "Starting daemon (config: %s) (version " 
+			BOX_VERSION ")", mConfigFileName.c_str());
 
 #ifndef WIN32
 		// Write PID to file
@@ -309,15 +317,23 @@
 			if(mReloadConfigWanted && !mTerminateWanted)
 			{
 				// Need to reload that config file...
-				::syslog(LOG_INFO, "Reloading configuration (config: %s)", configfile);
+				::syslog(LOG_INFO, "Reloading configuration "
+					"(config: %s)", 
+					mConfigFileName.c_str());
 				std::string errors;
-				std::auto_ptr<Configuration> pconfig = Configuration::LoadAndVerify(configfile, GetConfigVerify(), errors);
+				std::auto_ptr<Configuration> pconfig = 
+					Configuration::LoadAndVerify(
+						mConfigFileName.c_str(),
+						GetConfigVerify(), errors);
 
 				// Got errors?
 				if(pconfig.get() == 0 || !errors.empty())
 				{
 					// Tell user about errors
-					::syslog(LOG_ERR, "Errors in config file %s:\n%s", configfile, errors.c_str());
+					::syslog(LOG_ERR, "Errors in config "
+						"file %s:\n%s", 
+						mConfigFileName.c_str(),
+						errors.c_str());
 					// And give up
 					return 1;
 				}
@@ -328,6 +344,8 @@
 
 				// Store configuration
 				mpConfiguration = pconfig.release();
+				mLoadedConfigModifiedTime =
+					GetConfigFileModifiedTime();
 				
 				// Stop being marked for loading config again
 				mReloadConfigWanted = false;
@@ -550,3 +568,49 @@
 	
 #endif // HAVE_SETPROCTITLE
 }
+
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    Daemon::GetConfigFileModifiedTime()
+//		Purpose: Returns the timestamp when the configuration file
+//			 was last modified
+//
+//		Created: 2006/01/29
+//
+// --------------------------------------------------------------------------
+
+box_time_t Daemon::GetConfigFileModifiedTime() const
+{
+	struct stat st;
+
+	if(::stat(GetConfigFileName().c_str(), &st) != 0)
+	{
+		if (errno == ENOENT)
+		{
+			return 0;
+		}
+		THROW_EXCEPTION(CommonException, OSFileError)
+	}
+	
+	return FileModificationTime(st);
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    Daemon::GetLoadedConfigModifiedTime()
+//		Purpose: Returns the timestamp when the configuration file
+//			 had been last modified, at the time when it was 
+//			 loaded
+//
+//		Created: 2006/01/29
+//
+// --------------------------------------------------------------------------
+
+box_time_t Daemon::GetLoadedConfigModifiedTime() const
+{
+	return mLoadedConfigModifiedTime;
+}
+

Modified: box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -16,6 +16,10 @@
 #ifndef DAEMON__H
 #define DAEMON__H
 
+#include <string>
+
+#include "BoxTime.h"
+
 class Configuration;
 class ConfigurationVerify;
 
@@ -40,7 +44,8 @@
 	
 	virtual void Run();
 	const Configuration &GetConfiguration() const;
-	
+	const std::string &GetConfigFileName() const {return mConfigFileName;}
+
 	virtual const char *DaemonName() const;
 	virtual const char *DaemonBanner() const;
 	virtual const ConfigurationVerify *GetConfigVerify() const;
@@ -57,12 +62,18 @@
 	virtual void EnterChild();
 	
 	static void SetProcessTitle(const char *format, ...);
+
+protected:
+	box_time_t GetLoadedConfigModifiedTime() const;
 	
 private:
 	static void SignalHandler(int sigraised);
+	box_time_t GetConfigFileModifiedTime() const;
 	
 private:
+	std::string mConfigFileName;
 	Configuration *mpConfiguration;
+	box_time_t mLoadedConfigModifiedTime;
 	bool mReloadConfigWanted;
 	bool mTerminateWanted;
 	static Daemon *spDaemon;

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -527,8 +527,6 @@
 
 		if (err == ERROR_FILE_NOT_FOUND)
 		{
-			::syslog(LOG_WARNING, 
-				"Failed to open '%s': file not found", pName);
 			errno = ENOENT;
 		}
 		else

Modified: box/chris/win32/vc2005-compile-fixes/parcels.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/parcels.txt	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/parcels.txt	2006-02-03 20:21:10 UTC (rev 365)
@@ -8,9 +8,14 @@
 	bin bbackupquery
 	bin bbackupctl
 	script bin/bbackupd/bbackupd-config
+
+ONLY:mingw32
 	script bin/bbackupd/win32/installer.iss 
 	script bin/bbackupd/win32/ReadMe.txt 
 	script bin/bbackupd/win32/bbackupd.conf
+	script /bin/mgwz.dll
+	script /bin/mingwm10.dll
+END-ONLY
 
 OMIT:mingw32
 OMIT:CYGWIN

Modified: box/chris/win32/vc2005-compile-fixes/test/backupdiff/testbackupdiff.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/backupdiff/testbackupdiff.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/test/backupdiff/testbackupdiff.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -83,7 +83,7 @@
 	fclose(f);
 	free(b);
 
-	TEST_THAT(TestGetFileSize(filename) == size);
+	TEST_THAT((size_t)TestGetFileSize(filename) == size);
 }
 
 
@@ -169,9 +169,17 @@
 	{
 		BackupStoreFilenameClear f1name("filename");
 		FileStream out(to_diff, O_WRONLY | O_CREAT | O_EXCL);
-		std::auto_ptr<IOStream> encoded(BackupStoreFile::EncodeFileDiff(to_orig, 1 /* dir ID */, f1name,
-			1000 + from /* object ID of the file diffing from */, blockindex, IOStream::TimeOutInfinite,
-			0, &completelyDifferent));
+		std::auto_ptr<IOStream> encoded(
+			BackupStoreFile::EncodeFileDiff(
+				to_orig, 
+				1 /* dir ID */, 
+				f1name,
+				1000 + from /* object ID of the file diffing from */, 
+				blockindex, 
+				IOStream::TimeOutInfinite,
+				NULL, // DiffTimer interface
+				0, 
+				&completelyDifferent));
 		encoded->CopyStreamTo(out);
 	}
 	TEST_THAT(completelyDifferent == expect_completely_different);
@@ -443,9 +451,17 @@
 			
 			BackupStoreFilenameClear f1name("filename");
 			FileStream out("testfiles/f2.symlink.diff", O_WRONLY | O_CREAT | O_EXCL);
-			std::auto_ptr<IOStream> encoded(BackupStoreFile::EncodeFileDiff("testfiles/f2.symlink", 1 /* dir ID */, f1name,
-				1001 /* object ID of the file diffing from */, blockindex, IOStream::TimeOutInfinite,
-				0, &completelyDifferent));
+			std::auto_ptr<IOStream> encoded(
+				BackupStoreFile::EncodeFileDiff(
+					"testfiles/f2.symlink", 
+					1 /* dir ID */, 
+					f1name,
+					1001 /* object ID of the file diffing from */, 
+					blockindex, 
+					IOStream::TimeOutInfinite,
+					NULL, // DiffTimer interface
+					0, 
+					&completelyDifferent));
 			encoded->CopyStreamTo(out);
 		}
 		TEST_THAT(completelyDifferent == true);

Modified: box/chris/win32/vc2005-compile-fixes/test/backupstore/testbackupstore.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/backupstore/testbackupstore.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/test/backupstore/testbackupstore.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -1072,9 +1072,16 @@
 			// Do the patching
 			bool isCompletelyDifferent = false;
 			int64_t modtime;
-			std::auto_ptr<IOStream> patchstream(BackupStoreFile::EncodeFileDiff(TEST_FILE_FOR_PATCHING ".mod", BackupProtocolClientListDirectory::RootDirectory,
-					uploads[UPLOAD_PATCH_EN].name, uploads[UPLOAD_PATCH_EN].allocated_objid, *blockIndexStream,
-					IOStream::TimeOutInfinite, &modtime, &isCompletelyDifferent));
+			std::auto_ptr<IOStream> patchstream(
+				BackupStoreFile::EncodeFileDiff(
+					TEST_FILE_FOR_PATCHING ".mod", 
+					BackupProtocolClientListDirectory::RootDirectory,
+					uploads[UPLOAD_PATCH_EN].name, 
+					uploads[UPLOAD_PATCH_EN].allocated_objid, 
+					*blockIndexStream,
+					IOStream::TimeOutInfinite, 
+					NULL, // pointer to DiffTimer impl
+					&modtime, &isCompletelyDifferent));
 			TEST_THAT(isCompletelyDifferent == false);
 			// Sent this to a file, so we can check the size, rather than uploading it directly
 			{

Modified: box/chris/win32/vc2005-compile-fixes/test/backupstorepatch/testbackupstorepatch.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/backupstorepatch/testbackupstorepatch.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/test/backupstorepatch/testbackupstorepatch.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -376,10 +376,17 @@
 					char filename[64];
 					::sprintf(filename, "testfiles/%d.test", f);
 					bool isCompletelyDifferent = false;
-					std::auto_ptr<IOStream> patchStream(BackupStoreFile::EncodeFileDiff(filename,
+					std::auto_ptr<IOStream> patchStream(
+						BackupStoreFile::EncodeFileDiff(
+							filename,
 							BackupProtocolClientListDirectory::RootDirectory,	/* containing directory */
-							storeFilename, diffFromID, *blockIndexStream,
-							protocol.GetTimeout(), 0 /* not interested in the modification time */, &isCompletelyDifferent));
+							storeFilename, 
+							diffFromID, 
+							*blockIndexStream,
+							protocol.GetTimeout(), 
+							NULL, // DiffTimer impl
+							0 /* not interested in the modification time */, 
+							&isCompletelyDifferent));
 		
 					// Upload the patch to the store
 					std::auto_ptr<BackupProtocolClientSuccess> stored(protocol.QueryStoreFile(

Modified: box/chris/win32/vc2005-compile-fixes/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/bbackupd/testbbackupd.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/test/bbackupd/testbbackupd.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -16,6 +16,11 @@
 #include <string.h>
 #include <sys/wait.h>
 #include <unistd.h>
+#ifdef HAVE_SYS_XATTR_H
+#include <cerrno>
+#include <sys/xattr.h>
+#endif
+#include <map>
 
 #include "Test.h"
 #include "BackupClientFileAttributes.h"
@@ -39,6 +44,11 @@
 
 #include "MemLeakFindOn.h"
 
+// ENOATTR may be defined in a separate header file which we may not have
+#ifndef ENOATTR
+#define ENOATTR ENODATA
+#endif
+
 // two cycles and a bit
 #define TIME_TO_WAIT_FOR_BACKUP_OPERATION	12
 
@@ -57,12 +67,188 @@
 
 int bbstored_pid = 0;
 
+#ifdef HAVE_SYS_XATTR_H
+bool readxattr_into_map(const char *filename, std::map<std::string,std::string> &rOutput)
+{
+	rOutput.clear();
+	
+	ssize_t xattrNamesBufferSize = llistxattr(filename, NULL, 0);
+	if(xattrNamesBufferSize < 0)
+	{
+		return false;
+	}
+	else if(xattrNamesBufferSize > 0)
+	{
+		// There is some data there to look at
+		char *xattrNamesBuffer = (char*)malloc(xattrNamesBufferSize + 4);
+		if(xattrNamesBuffer == NULL) return false;
+		char *xattrDataBuffer = 0;
+		int xattrDataBufferSize = 0;
+		// note: will leak these buffers if a read error occurs. (test code, so doesn't matter)
+		
+		ssize_t ns = llistxattr(filename, xattrNamesBuffer, xattrNamesBufferSize);
+		if(ns < 0)
+		{
+			return false;
+		}
+		else if(ns > 0)
+		{
+			// Read all the attribute values
+			const char *xattrName = xattrNamesBuffer;
+			while(xattrName < (xattrNamesBuffer + ns))
+			{
+				// Store size of name
+				int xattrNameSize = strlen(xattrName);
+				
+				bool ok = true;
+					
+				ssize_t dataSize = lgetxattr(filename, xattrName, NULL, 0);
+				if(dataSize < 0)
+				{
+					if(errno == ENOATTR)
+					{
+						// Deleted from under us
+						ok = false;
+					}
+					else
+					{
+						return false;
+					}
+				}
+				else if(dataSize == 0)
+				{
+					// something must have removed all the data from under us
+					ok = false;
+				}
+				else
+				{
+					// Make sure there's enough space in the buffer to get the attribute
+					if(xattrDataBuffer == 0)
+					{
+						xattrDataBuffer = (char*)malloc(dataSize + 4);
+						xattrDataBufferSize = dataSize + 4;
+					}
+					else if(xattrDataBufferSize < (dataSize + 4))
+					{
+						char *resized = (char*)realloc(xattrDataBuffer, dataSize + 4);
+						if(resized == NULL) return false;
+						xattrDataBuffer = resized;
+						xattrDataBufferSize = dataSize + 4;
+					}
+				}
+
+				// Read the data!
+				dataSize = 0;
+				if(ok)
+				{
+					dataSize = lgetxattr(filename, xattrName, xattrDataBuffer,
+						xattrDataBufferSize - 1 /*for terminator*/);
+					if(dataSize < 0)
+					{
+						if(errno == ENOATTR)
+						{
+							// Deleted from under us
+							ok = false;
+						}
+						else
+						{
+							return false;
+						}
+					}
+					else if(dataSize == 0)
+					{
+						// something must have deleted this from under us
+						ok = false;
+					}
+					else
+					{
+						// Terminate the data
+						xattrDataBuffer[dataSize] = '\0';
+					}
+					// Got the data in the buffer
+				}
+				
+				// Store in map
+				if(ok)
+				{
+					rOutput[std::string(xattrName)] = std::string(xattrDataBuffer, dataSize);
+				}
+
+				// Next attribute
+				xattrName += xattrNameSize + 1;
+			}
+		}
+		
+		if(xattrNamesBuffer != 0) ::free(xattrNamesBuffer);
+		if(xattrDataBuffer != 0) ::free(xattrDataBuffer);
+	}
+
+	return true;
+}
+
+static FILE *xattrTestDataHandle = 0;
+bool write_xattr_test(const char *filename, const char *attrName, unsigned int length, bool *pNotSupported = 0)
+{
+	if(xattrTestDataHandle == 0)
+	{
+		xattrTestDataHandle = ::fopen("testfiles/test3.tgz", "rb");	// largest test file
+	}
+	if(xattrTestDataHandle == 0)
+	{
+		return false;
+	}
+	else
+	{
+		char data[1024];
+		if(length > sizeof(data)) length = sizeof(data);
+		
+		if(::fread(data, length, 1, xattrTestDataHandle) != 1)
+		{
+			return false;
+		}
+		
+		if(::lsetxattr(filename, attrName, data, length, 0) != 0)
+		{
+			if(pNotSupported != 0)
+			{
+				*pNotSupported = (errno == ENOTSUP);
+			}
+			return false;
+		}
+	}
+
+	return true;
+}
+void finish_with_write_xattr_test()
+{
+	if(xattrTestDataHandle != 0)
+	{
+		::fclose(xattrTestDataHandle);
+	}
+}
+#endif // HAVE_SYS_XATTR_H
+
 bool attrmatch(const char *f1, const char *f2)
 {
 	struct stat s1, s2;
 	TEST_THAT(::lstat(f1, &s1) == 0);
 	TEST_THAT(::lstat(f2, &s2) == 0);
 
+#ifdef HAVE_SYS_XATTR_H
+	{
+		std::map<std::string,std::string> xattr1, xattr2;
+		if(!readxattr_into_map(f1, xattr1)
+			|| !readxattr_into_map(f2, xattr2))
+		{
+			return false;
+		}
+		if(!(xattr1 == xattr2))
+		{
+			return false;
+		}
+	}
+#endif // HAVE_SYS_XATTR_H
+
 	// if link, just make sure other file is a link too, and that the link to names match
 	if((s1.st_mode & S_IFMT) == S_IFLNK)
 	{
@@ -143,6 +329,49 @@
 	TEST_THAT(t1_r == t1b);
 	TEST_THAT(t1b_r == t1);
 
+#ifdef HAVE_SYS_XATTR_H
+	// Write some attributes to the file, checking for ENOTSUP
+	bool xattrNotSupported = false;
+	if(!write_xattr_test("testfiles/test1", "user.attr_1", 1000, &xattrNotSupported) && xattrNotSupported)
+	{
+		::printf("***********\nYour platform supports xattr, but your filesystem does not.\nSkipping tests.\n***********\n");
+	}
+	else
+	{
+		BackupClientFileAttributes x1, x2, x3, x4;
+
+		// Write more attributes
+		TEST_THAT(write_xattr_test("testfiles/test1", "user.attr_2", 947));
+		TEST_THAT(write_xattr_test("testfiles/test1", "user.sadfohij39998.3hj", 123));
+	
+		// Read file attributes
+		x1.ReadAttributes("testfiles/test1");
+		
+		// Write file attributes
+		FILE *f = fopen("testfiles/test1_nx", "w");
+		fclose(f);
+		x1.WriteAttributes("testfiles/test1_nx");
+		
+		// Compare to see if xattr copied
+		TEST_THAT(attrmatch("testfiles/test1", "testfiles/test1_nx"));
+		
+		// Add more attributes to a file
+		x2.ReadAttributes("testfiles/test1");
+		TEST_THAT(write_xattr_test("testfiles/test1", "user.328989sj..sdf", 23));
+		
+		// Read them again, and check that the Compare() function detects that they're different
+		x3.ReadAttributes("testfiles/test1");
+		TEST_THAT(x1.Compare(x2, true, true));
+		TEST_THAT(!x1.Compare(x3, true, true));
+		
+		// Change the value of one of them, leaving the size the same.
+		TEST_THAT(write_xattr_test("testfiles/test1", "user.328989sj..sdf", 23));
+		x4.ReadAttributes("testfiles/test1");
+		TEST_THAT(!x1.Compare(x4, true, true));
+	}
+	finish_with_write_xattr_test();
+#endif // HAVE_SYS_XATTR_H
+
 	return 0;
 }
 
@@ -287,7 +516,7 @@
 	// unpack the files for the initial test
 	TEST_THAT(::system("rm -rf testfiles/TestDir1") == 0);
 	TEST_THAT(::system("mkdir testfiles/TestDir1") == 0);
-	TEST_THAT(::system("tar xzf testfiles/spacetest1.tgz -C testfiles/TestDir1/") == 0);
+	TEST_THAT(::system("gzip -d < testfiles/spacetest1.tgz | tar xf - -C testfiles/TestDir1/") == 0);
 
 	int pid = LaunchServer("../../bin/bbackupd/bbackupd testfiles/bbackupd.conf", "testfiles/bbackupd.pid");
 	TEST_THAT(pid != -1 && pid != 0);
@@ -306,7 +535,7 @@
 		TestRemoteProcessMemLeaks("bbstoreaccounts.memleaks");
 
 		// Unpack some more files
-		TEST_THAT(::system("tar xzf testfiles/spacetest2.tgz -C testfiles/TestDir1/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/spacetest2.tgz | tar xf - -C testfiles/TestDir1/") == 0);
 		// Delete a file and a directory
 		TEST_THAT(::unlink("testfiles/TestDir1/spacetest/d1/f3") == 0);
 		TEST_THAT(::system("rm -rf testfiles/TestDir1/spacetest/d3/d4") == 0);
@@ -327,7 +556,7 @@
 		TEST_THAT(!TestFileExists("testfiles/notifyran.store-full.2"));
 		
 		// unpack the initial files again
-		TEST_THAT(::system("tar xzf testfiles/test_base.tgz -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test_base.tgz | tar xf - -C testfiles/") == 0);
 
 		// wait for it to do it's stuff
 		wait_for_backup_operation();
@@ -427,7 +656,7 @@
 		// Add some more files
 		// Because the 'm' option is not used, these files will look very old to the daemon.
 		// Lucky it'll upload them then!
-		TEST_THAT(::system("tar xzf testfiles/test2.tgz -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test2.tgz | tar xf - -C testfiles/") == 0);
 		::chmod("testfiles/TestDir1/sub23/dhsfdss/blf.h", 0415);
 		
 		// Wait and test
@@ -464,7 +693,7 @@
 
 		// Add some files and directories which are marked as excluded
 		printf("Add files and dirs for exclusion test\n");
-		TEST_THAT(::system("tar xzf testfiles/testexclude.tgz -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/testexclude.tgz | tar xf - -C testfiles/") == 0);
 		// Wait and test
 		wait_for_backup_operation();
 		compareReturnValue = ::system("../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query3c.log \"compare -ac\" quit");
@@ -601,7 +830,7 @@
 	
 		// Add some more files and modify others
 		// Use the m flag this time so they have a recent modification time
-		TEST_THAT(::system("tar xzmf testfiles/test3.tgz -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test3.tgz | tar xmf - -C testfiles/") == 0);
 		
 		// Wait and test
 		wait_for_backup_operation();
@@ -806,7 +1035,7 @@
 	BackupClientCryptoKeys_Setup("testfiles/bbackupd.keys");
 
 	// Initial files
-	TEST_THAT(::system("tar xzf testfiles/test_base.tgz -C testfiles/") == 0);
+	TEST_THAT(::system("gzip -d < testfiles/test_base.tgz | tar xf - -C testfiles/") == 0);
 
 	// Do the tests
 

Deleted: box/chris/win32/vc2005-compile-fixes/test/raidfile/Darwin-SYS.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/raidfile/Darwin-SYS.h	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/test/raidfile/Darwin-SYS.h	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,167 +0,0 @@
-
-/* Taken from the Darwin Libc source
-*/
-
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
- * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/* Copyright (c) 1992 NeXT Computer, Inc.  All rights reserved.
- *
- *	File:	SYS.h
- *
- *	Definition of the user side of the UNIX system call interface
- *	for M98K.
- *
- *	Errors are flagged by the location of the trap return (ie., which
- *	instruction is executed upon rfi):
- *
- *		SC PC + 4:	Error (typically branch to cerror())
- *		SC PC + 8:	Success
- *
- * HISTORY
- * 18-Nov-92	Ben Fathi (benf@next.com)
- *	Ported to m98k.
- *
- *  9-Jan-92	Peter King (king@next.com)
- *	Created.
- */
-
-#define KERNEL_PRIVATE	1
-/*
- * Header files.
- */
-#import	<architecture/ppc/asm_help.h>
-#import	<architecture/ppc/pseudo_inst.h>
-#import	<mach/ppc/exception.h>
-#import	<sys/syscall.h>
-
-/* From rhapsody kernel mach/ppc/syscall_sw.h */
-#define	kernel_trap_args_0
-#define	kernel_trap_args_1
-#define	kernel_trap_args_2
-#define	kernel_trap_args_3
-#define	kernel_trap_args_4
-#define	kernel_trap_args_5
-#define	kernel_trap_args_6
-#define	kernel_trap_args_7
-
-/*
- * simple_kernel_trap -- Mach system calls with 8 or less args
- * Args are passed in a0 - a7, system call number in r0.
- * Do a "sc" instruction to enter kernel.
- */	
-#define simple_kernel_trap(trap_name, trap_number)	\
-	.globl	_##trap_name				@\
-_##trap_name:						@\
-	li	r0,trap_number				 @\
-	sc						 @\
-	blr						 @\
-	END(trap_name)
-
-#define kernel_trap_0(trap_name,trap_number)		 \
-	simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_1(trap_name,trap_number)		 \
-	simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_2(trap_name,trap_number)		 \
-	simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_3(trap_name,trap_number)		 \
-	simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_4(trap_name,trap_number)		 \
-	simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_5(trap_name,trap_number)		 \
-	simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_6(trap_name,trap_number)		 \
-	simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_7(trap_name,trap_number)		 \
-	simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_8(trap_name,trap_number)		 \
-        simple_kernel_trap(trap_name,trap_number)
-
-#define kernel_trap_9(trap_name,trap_number)		 \
-        simple_kernel_trap(trap_name,trap_number)
-
-/* End of rhapsody kernel mach/ppc/syscall_sw.h */
-
-/*
- * Macros.
- */
-
-#define	SYSCALL(name, nargs)			\
-	.globl	cerror				@\
-LEAF(_##name)					@\
-	kernel_trap_args_##nargs		@\
-	li	r0,SYS_##name			@\
-	sc					@\
-	b	1f   				@\
-	b	2f				@\
-1:	BRANCH_EXTERN(cerror)			@\
-.text						\
-2:	nop
-
-#define	SYSCALL_NONAME(name, nargs)		\
-	.globl	cerror				@\
-	kernel_trap_args_##nargs		@\
-	li	r0,SYS_##name			@\
-	sc					@\
-	b	1f   				@\
-	b	2f				@\
-1:	BRANCH_EXTERN(cerror)			@\
-.text						\
-2:	nop
-
-#define	PSEUDO(pseudo, name, nargs)		\
-LEAF(_##pseudo)					@\
-	SYSCALL_NONAME(name, nargs)
-
-
-#undef END
-#import	<mach/ppc/syscall_sw.h>
-
-#if !defined(SYS_getdirentriesattr)
-#define SYS_getdirentriesattr 222
-#endif
-
-#if !defined(SYS_semsys)
-#define SYS_semsys	251
-#define SYS_msgsys	252
-#define SYS_shmsys	253
-#define SYS_semctl	254
-#define SYS_semget	255
-#define SYS_semop	256
-#define SYS_semconfig	257
-#define SYS_msgctl	258
-#define SYS_msgget	259
-#define SYS_msgsnd	260
-#define SYS_msgrcv	261
-#define SYS_shmat	262
-#define SYS_shmctl	263
-#define SYS_shmdt	264
-#define SYS_shmget	265
-#endif
- 

Deleted: box/chris/win32/vc2005-compile-fixes/test/raidfile/Makefile.extra.Darwin
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/raidfile/Makefile.extra.Darwin	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/test/raidfile/Makefile.extra.Darwin	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,6 +0,0 @@
-
-# link-extra: intercept-lseek.o intercept-close.o intercept-open.o intercept-read.o intercept-readv.o intercept-write.o
-
-$(OUTDIR)/intercept-lseek.o:	make-darwin-intercepts.pl $(OUTDIR)
-	./make-darwin-intercepts.pl $(OUTDIR)
-

Modified: box/chris/win32/vc2005-compile-fixes/test/raidfile/intercept.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/raidfile/intercept.cpp	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/test/raidfile/intercept.cpp	2006-02-03 20:21:10 UTC (rev 365)
@@ -162,6 +162,15 @@
 }
 
 extern "C" int
+open64(const char *path, int flags, mode_t mode)
+{
+	// With _FILE_OFFSET_BITS set to 64 this should really use (flags |
+	// O_LARGEFILE) here, but not actually necessary for the tests and not
+	// worth the trouble finding O_LARGEFILE
+	return open(path, flags, mode);
+}
+
+extern "C" int
 close(int d)
 {
 	CHECK_FOR_FAKE_ERROR_COND(d, SIZE_ALWAYS_ERROR, SYS_close, -1);
@@ -245,6 +254,10 @@
 #else
 	#ifdef HAVE_LSEEK_DUMMY_PARAM
 		off_t r = syscall(SYS_lseek, fildes, 0 /* extra 0 required here! */, offset, whence);
+	#elif defined(_FILE_OFFSET_BITS)
+		// Don't bother trying to call SYS__llseek on 32 bit since it is
+		// fiddly and not needed for the tests
+		off_t r = syscall(SYS_lseek, fildes, (uint32_t)offset, whence);
 	#else
 		off_t r = syscall(SYS_lseek, fildes, offset, whence);
 	#endif

Deleted: box/chris/win32/vc2005-compile-fixes/test/raidfile/make-darwin-intercepts.pl
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/raidfile/make-darwin-intercepts.pl	2006-02-03 19:58:38 UTC (rev 364)
+++ box/chris/win32/vc2005-compile-fixes/test/raidfile/make-darwin-intercepts.pl	2006-02-03 20:21:10 UTC (rev 365)
@@ -1,46 +0,0 @@
-#!/usr/bin/perl
-use strict;
-
-my $out = $ARGV[0];
-die "No out directory specified" unless $out ne '';
-
-my @calls = split /[\r\n]+/,<<__E;
-lseek SYSCALL_TEST(lseek, 3)
-open SYSCALL_TEST(open, 3)
-close SYSCALL_TEST(close, 1)
-write SYSCALL_TEST(write, 3)
-read SYSCALL_TEST(read, 3)
-readv SYSCALL_TEST(readv, 3)
-__E
-
-for(@calls)
-{
-	my ($name,$line) = split / /,$_,2;
-	
-	open FL,">$out/intercept-$name.s" or die "Can't open out file";
-	print FL <<'__S';
-#include "../../../test/raidfile/Darwin-SYS.h"
-
-#define	SYSCALL_TEST(name, nargs)			\
-	.globl	cerror				@\
-LEAF(_TEST_##name)					@\
-	kernel_trap_args_##nargs		@\
-	li	r0,SYS_##name			@\
-	sc					@\
-	b	1f   				@\
-	b	2f				@\
-1:	BRANCH_EXTERN(cerror)			@\
-.text						\
-2:	nop
-
-__S
-	print FL $line,"\n\tblr\n\n";
-
-	close FL;
-	
-	if(system("gcc -c $out/intercept-$name.s -o $out/intercept-$name.o") != 0)
-	{
-		die "Assembly failed\n";
-	}
-}
-


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 20:25:21 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 20:25:21 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r366 - box/chris/win32/vc2005-compile-fixes
Message-ID: <20060203202521.F364794@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 20:25:21 +0000 (Fri, 03 Feb 2006)
New Revision: 366

Added:
   box/chris/win32/vc2005-compile-fixes/VERSION.txt
Log:
* VERSION.txt
- Something borked the merge, this file should be here


Copied: box/chris/win32/vc2005-compile-fixes/VERSION.txt (from rev 365, box/trunk/VERSION.txt)


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 20:45:33 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 20:45:33 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r367 - in box/chris/win32/vc2005-compile-fixes: bin/bbackupd lib/win32
Message-ID: <20060203204533.C085994@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 20:45:29 +0000 (Fri, 03 Feb 2006)
New Revision: 367

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* lib/win32/emu.cpp
* lib/win32/emu.h
* bin/bbackupd/BackupClientContext.cpp
- Removed (possibly bogus and confusing) definitions of SIG(VT)ALRM on Win32


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-03 20:25:21 UTC (rev 366)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-03 20:45:29 UTC (rev 367)
@@ -511,6 +511,9 @@
 
 #ifdef PLATFORM_CYGWIN
 	::signal(SIGALRM, TimerSigHandler);
+#elif WIN32
+	// no support for SIGVTALRM
+	SetTimerHandler(TimerSignalHandler);
 #else
 	::signal(SIGVTALRM, TimerSigHandler);
 #endif // PLATFORM_CYGWIN

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-03 20:25:21 UTC (rev 366)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-03 20:45:29 UTC (rev 367)
@@ -41,7 +41,7 @@
 
 int setitimer(int type , struct itimerval *timeout, int)
 {
-	if ( SIGVTALRM == type || ITIMER_VIRTUAL == type )
+	if (ITIMER_VIRTUAL == type)
 	{
 		EnterCriticalSection(&gLock);
 		// we only need seconds for the mo!

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-03 20:25:21 UTC (rev 366)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-03 20:45:29 UTC (rev 367)
@@ -27,9 +27,6 @@
 	( *(_result) = *gmtime( (_clock) ), \
 	(_result) )
 
-//signal in unix SIGVTALRM does not exist in win32 - but looking at the 
-#define SIGVTALRM 254
-#define SIGALRM SIGVTALRM
 #define ITIMER_VIRTUAL 0
 
 #ifdef _MSC_VER


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 21:15:04 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 21:15:04 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r368 - box/chris/win32/vc2005-compile-fixes/lib/common
Message-ID: <20060203211504.80B5194@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 21:15:02 +0000 (Fri, 03 Feb 2006)
New Revision: 368

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.cpp
Log:
* ExcludeList.cpp
- Fix compilation of Box Backup on all platforms without regex.h


Modified: box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.cpp	2006-02-03 20:45:29 UTC (rev 367)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/ExcludeList.cpp	2006-02-03 21:15:02 UTC (rev 368)
@@ -232,7 +232,7 @@
 	//
 	mDefinite.clear();
 
-#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+#ifdef HAVE_REGEX_H
 	// free regex memory
 	while(mRegex.size() > 0)
 	{
@@ -273,7 +273,7 @@
 	//
 	//
 	//
-#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+#ifdef HAVE_REGEX_H
 	rArchive.Read(iCount);
 
 	if (iCount > 0)
@@ -310,7 +310,7 @@
 			}
 		}
 	}
-#endif // PLATFORM_REGEX_NOT_SUPPORTED
+#endif // HAVE_REGEX_H
 
 	//
 	//
@@ -365,7 +365,7 @@
 	//
 	//
 	//
-#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+#ifdef HAVE_REGEX_H
 	// don't even try to save compiled regular expressions,
 	// use string copies instead.
 	ASSERT(mRegex.size() == mRegexStr.size()); 	
@@ -378,7 +378,7 @@
 	{
 		rArchive.Write(*i);
 	}
-#endif // PLATFORM_REGEX_NOT_SUPPORTED
+#endif // HAVE_REGEX_H
 
 	//
 	//


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 21:15:27 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 21:15:27 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r369 - box/chris/win32/vc2005-compile-fixes
Message-ID: <20060203211527.9450D94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 21:15:26 +0000 (Fri, 03 Feb 2006)
New Revision: 369

Modified:
   box/chris/win32/vc2005-compile-fixes/configure.ac
Log:
* configure.ac
- Fixed a missing bracket


Modified: box/chris/win32/vc2005-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-03 21:15:02 UTC (rev 368)
+++ box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-03 21:15:26 UTC (rev 369)
@@ -76,7 +76,7 @@
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([dirent.h execinfo.h process.h pwd.h regex.h signal.h]
+AC_CHECK_HEADERS([dirent.h execinfo.h process.h pwd.h regex.h signal.h])
 AC_CHECK_HEADERS([syslog.h time.h])
 AC_CHECK_HEADERS([netinet/in.h])
 AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 23:08:09 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 23:08:09 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r370 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060203230809.95C2794@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 23:08:06 +0000 (Fri, 03 Feb 2006)
New Revision: 370

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
Log:
* BackupClientContext.cpp
- Fixed misnamed reference to TimerSigHandler


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-03 21:15:26 UTC (rev 369)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-03 23:08:06 UTC (rev 370)
@@ -513,7 +513,7 @@
 	::signal(SIGALRM, TimerSigHandler);
 #elif WIN32
 	// no support for SIGVTALRM
-	SetTimerHandler(TimerSignalHandler);
+	SetTimerHandler(TimerSigHandler);
 #else
 	::signal(SIGVTALRM, TimerSigHandler);
 #endif // PLATFORM_CYGWIN


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 23:08:54 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 23:08:54 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r371 - box/chris/win32/vc2005-compile-fixes/infrastructure
Message-ID: <20060203230854.5664894@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 23:08:53 +0000 (Fri, 03 Feb 2006)
New Revision: 371

Modified:
   box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
Log:
* makeparcels.pl
- Fix ONLY: handling (essential for MinGW builds)


Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-03 23:08:06 UTC (rev 370)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-03 23:08:53 UTC (rev 371)
@@ -47,8 +47,8 @@
 				{
 					last if m'\AEND-ONLY';
 				}
-				next;
 			}
+			next;
 		}
 		
 		# new parcel, or a new parcel definition?


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 23:13:47 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 23:13:47 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r372 - box/chris/win32/vc2005-compile-fixes/infrastructure
Message-ID: <20060203231347.0BB9894@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 23:13:44 +0000 (Fri, 03 Feb 2006)
New Revision: 372

Modified:
   box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
Log:
* makeparcels.pl
- Another essential fix for ONLY: parcel entries


Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-03 23:08:53 UTC (rev 371)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-03 23:13:44 UTC (rev 372)
@@ -50,6 +50,7 @@
 			}
 			next;
 		}
+		next if (m'\AEND-ONLY');
 		
 		# new parcel, or a new parcel definition?
 		if(m/\A\s+(.+)\Z/)


From boxbackup-dev@fluffy.co.uk  Fri Feb  3 23:50:11 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri,  3 Feb 2006 23:50:11 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r373 - box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005
Message-ID: <20060203235011.57AA194@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-03 23:50:05 +0000 (Fri, 03 Feb 2006)
New Revision: 373

Modified:
   box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupctl.vcproj
   box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupd.vcproj
   box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxbackup.suo
   box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxquery.vcproj
   box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj
   box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/win32test.vcproj
Log:
* infrastructure/msvc/2005/boxquery.vcproj
* infrastructure/msvc/2005/boxbackup.suo
* infrastructure/msvc/2005/win32test.vcproj
* infrastructure/msvc/2005/common.vcproj
* infrastructure/msvc/2005/bbackupctl.vcproj
* infrastructure/msvc/2005/bbackupd.vcproj
- Added NDEBUG to build flags, to build in release mode (less verbose output)


Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupctl.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupctl.vcproj	2006-02-03 23:13:44 UTC (rev 372)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupctl.vcproj	2006-02-03 23:50:05 UTC (rev 373)
@@ -41,7 +41,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupd.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupd.vcproj	2006-02-03 23:13:44 UTC (rev 372)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupd.vcproj	2006-02-03 23:50:05 UTC (rev 373)
@@ -41,7 +41,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\..\lib\backupclient&quot;;&quot;$(SolutionDir)..\..\..\lib\common&quot;;&quot;$(SolutionDir)..\..\..\lib\compress&quot;;&quot;$(SolutionDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\lib\server&quot;;&quot;$(SolutionDir)..\..\..\lib\win32&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\inc32&quot;;&quot;$(SolutionDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxbackup.suo
===================================================================
(Binary files differ)

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxquery.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxquery.vcproj	2006-02-03 23:13:44 UTC (rev 372)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxquery.vcproj	2006-02-03 23:50:05 UTC (rev 373)
@@ -42,7 +42,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj	2006-02-03 23:13:44 UTC (rev 372)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj	2006-02-03 23:50:05 UTC (rev 373)
@@ -41,7 +41,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;$(NOINHERIT)"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/win32test.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/win32test.vcproj	2006-02-03 23:13:44 UTC (rev 372)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/win32test.vcproj	2006-02-03 23:50:05 UTC (rev 373)
@@ -41,7 +41,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 13:28:45 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 13:28:45 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r374 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060204132845.ADC1494@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 13:28:43 +0000 (Sat, 04 Feb 2006)
New Revision: 374

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- No need for security warning to have lines more than 80 characters long


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-03 23:50:05 UTC (rev 373)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-04 13:28:43 UTC (rev 374)
@@ -190,11 +190,12 @@
 	if(GetConfiguration().KeyExists("CommandSocket"))
 	{
 		printf(
-				"============================================================================================\n" \
-				"SECURITY WARNING: This platform cannot check the credentials of connections to the\n" \
-				"command socket. This is a potential DoS security problem.\n" \
-				"Remove the CommandSocket directive from the bbackupd.conf file if bbackupctl is not used.\n" \
-				"============================================================================================\n"
+				"==============================================================================\n"
+				"SECURITY WARNING: This platform cannot check the credentials of connections to\n"
+				"the command socket. This is a potential DoS security problem.\n"
+				"Remove the CommandSocket directive from the bbackupd.conf file if bbackupctl\n"
+				"is not used.\n"
+				"==============================================================================\n"
 			);
 	}
 }


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 13:29:23 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 13:29:23 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r375 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060204132923.34DE894@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 13:29:22 +0000 (Sat, 04 Feb 2006)
New Revision: 375

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/Win32ServiceFunctions.cpp
Log:
* Win32ServiceFunctions.cpp
- Trivial spacing fix (this file should really be tab-indented like the others)


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/Win32ServiceFunctions.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/Win32ServiceFunctions.cpp	2006-02-04 13:28:43 UTC (rev 374)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/Win32ServiceFunctions.cpp	2006-02-04 13:29:22 UTC (rev 375)
@@ -95,7 +95,7 @@
 
 VOID ServiceMain(DWORD argc, LPTSTR *argv) 
 {
-   // initialise service status
+    // initialise service status
     gServiceStatus.dwServiceType = SERVICE_WIN32;
     gServiceStatus.dwCurrentState = SERVICE_STOPPED;
     gServiceStatus.dwControlsAccepted = 0;


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 13:31:17 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 13:31:17 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r376 - box/chris/win32/vc2005-compile-fixes/lib/server
Message-ID: <20060204133117.32E3194@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 13:31:14 +0000 (Sat, 04 Feb 2006)
New Revision: 376

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.cpp
Log:
* Daemon.cpp
- Catch failure to open the configuration file and log a better error message
- Log all startup exceptions to syslog on win32
- Reformatted log messages to be more readable


Modified: box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.cpp	2006-02-04 13:29:22 UTC (rev 375)
+++ box/chris/win32/vc2005-compile-fixes/lib/server/Daemon.cpp	2006-02-04 13:31:14 UTC (rev 376)
@@ -127,11 +127,35 @@
 
 		// Load the configuration file.
 		std::string errors;
-		std::auto_ptr<Configuration> pconfig = 
-			Configuration::LoadAndVerify(
+		std::auto_ptr<Configuration> pconfig;
+
+		try
+		{
+			pconfig = Configuration::LoadAndVerify(
 				mConfigFileName.c_str(), 
 				GetConfigVerify(), errors);
+		}
+		catch(BoxException &e)
+		{
+			if(e.GetType() == CommonException::ExceptionType &&
+				e.GetSubType() == CommonException::OSFileOpenError)
+			{
+				fprintf(stderr, "%s: failed to start: "
+					"failed to open configuration file: "
+					"%s", DaemonName(), 
+					mConfigFileName.c_str());
+#ifdef WIN32
+				::syslog(LOG_ERR, "%s: failed to start: "
+					"failed to open configuration file: "
+					"%s", DaemonName(), 
+					mConfigFileName.c_str());
+#endif
+				return 1;
+			}
 
+			throw;
+		}
+
 		// Got errors?
 		if(pconfig.get() == 0 || !errors.empty())
 		{
@@ -139,6 +163,11 @@
 			fprintf(stderr, "%s: Errors in config file %s:\n%s", 
 				DaemonName(), mConfigFileName.c_str(), 
 				errors.c_str());
+#ifdef WIN32
+			::syslog(LOG_ERR, "%s: Errors in config file %s:\n%s",
+				DaemonName(), mConfigFileName.c_str(), 
+				errors.c_str());
+#endif
 			// And give up
 			return 1;
 		}
@@ -147,9 +176,6 @@
 		mpConfiguration = pconfig.release();
 		mLoadedConfigModifiedTime = GetConfigFileModifiedTime();
 		
-		// Server configuration
-		const Configuration &serverConfig(mpConfiguration->GetSubConfiguration("Server"));
-		
 		// Let the derived class have a go at setting up stuff in the initial process
 		SetupInInitialProcess();
 		
@@ -164,6 +190,10 @@
 			THROW_EXCEPTION(ServerException, DaemoniseFailed)
 		}
 		
+		// Server configuration
+		const Configuration &serverConfig(
+			mpConfiguration->GetSubConfiguration("Server"));
+
 		// Open PID file for writing
 		pidFileName = serverConfig.GetKeyValue("PidFile");
 		FileHandleGuard<(O_WRONLY | O_CREAT | O_TRUNC), (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)> pidFile(pidFileName.c_str());
@@ -293,17 +323,33 @@
 	}
 	catch(BoxException &e)
 	{
-		fprintf(stderr, "%s: exception %s (%d/%d)\n", DaemonName(), e.what(), e.GetType(), e.GetSubType());
+		fprintf(stderr, "%s: failed to start: exception %s (%d/%d)\n", 
+			DaemonName(), e.what(), e.GetType(), e.GetSubType());
+#ifdef WIN32
+		::syslog(LOG_ERR, "%s: failed to start: "
+			"exception %s (%d/%d)\n", DaemonName(), 
+			e.what(), e.GetType(), e.GetSubType());
+#endif
 		return 1;
 	}
 	catch(std::exception &e)
 	{
-		fprintf(stderr, "%s: exception %s\n", DaemonName(), e.what());
+		fprintf(stderr, "%s: failed to start: exception %s\n", 
+			DaemonName(), e.what());
+#ifdef WIN32
+		::syslog(LOG_ERR, "%s: failed to start: exception %s\n", 
+			DaemonName(), e.what());
+#endif
 		return 1;
 	}
 	catch(...)
 	{
-		fprintf(stderr, "%s: unknown exception\n", DaemonName());
+		fprintf(stderr, "%s: failed to start: unknown exception\n", 
+			DaemonName());
+#ifdef WIN32
+		::syslog(LOG_ERR, "%s: failed to start: unknown exception\n", 
+			DaemonName());
+#endif
 		return 1;
 	}
 	
@@ -360,17 +406,21 @@
 	}
 	catch(BoxException &e)
 	{
-		::syslog(LOG_ERR, "exception %s (%d/%d) -- terminating", e.what(), e.GetType(), e.GetSubType());
+		::syslog(LOG_ERR, "%s: terminating due to exception %s "
+			"(%d/%d)", DaemonName(), e.what(), e.GetType(), 
+			e.GetSubType());
 		return 1;
 	}
 	catch(std::exception &e)
 	{
-		::syslog(LOG_ERR, "exception %s -- terminating", e.what());
+		::syslog(LOG_ERR, "%s: terminating due to exception %s", 
+			DaemonName(), e.what());
 		return 1;
 	}
 	catch(...)
 	{
-		::syslog(LOG_ERR, "unknown exception -- terminating");
+		::syslog(LOG_ERR, "%s: terminating due to unknown exception",
+			DaemonName());
 		return 1;
 	}
 	


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 13:31:54 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 13:31:54 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r377 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060204133154.769A594@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 13:31:53 +0000 (Sat, 04 Feb 2006)
New Revision: 377

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.cpp, emu.h
- Change 3rd argument of setitimer to a void pointer instead of an int,
  fixes compile warnings on Win32


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-04 13:31:14 UTC (rev 376)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-04 13:31:53 UTC (rev 377)
@@ -39,7 +39,7 @@
 std::list<Timer_t> gTimerList;
 static void (__cdecl *gTimerFunc) (int) = NULL;
 
-int setitimer(int type , struct itimerval *timeout, int)
+int setitimer(int type, struct itimerval *timeout, void *arg)
 {
 	if (ITIMER_VIRTUAL == type)
 	{

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-04 13:31:14 UTC (rev 376)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-04 13:31:53 UTC (rev 377)
@@ -45,7 +45,7 @@
 #endif
 
 int SetTimerHandler(void (__cdecl *func ) (int));
-int setitimer(int type, struct itimerval *timeout, int);
+int setitimer(int type, struct itimerval *timeout, void *arg);
 void InitTimer(void);
 void FiniTimer(void);
 


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 14:54:59 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 14:54:59 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r378 - box/chris/win32/vc2005-compile-fixes
Message-ID: <20060204145459.A3ED894@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 14:54:57 +0000 (Sat, 04 Feb 2006)
New Revision: 378

Modified:
   box/chris/win32/vc2005-compile-fixes/configure.ac
Log:
* configure.ac
- Don't detect <dirent.h> on MinGW, as we mustn't use it (we need the emulated
  functions which return filenames in UTF-8 instead)


Modified: box/chris/win32/vc2005-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-04 13:31:53 UTC (rev 377)
+++ box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-04 14:54:57 UTC (rev 378)
@@ -73,10 +73,13 @@
 
 ### Checks for header files.
 
-AC_HEADER_DIRENT
+if test "$target_os" != "mingw32"; then
+  AC_HEADER_DIRENT
+fi
+
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([dirent.h execinfo.h process.h pwd.h regex.h signal.h])
+AC_CHECK_HEADERS([execinfo.h process.h pwd.h regex.h signal.h])
 AC_CHECK_HEADERS([syslog.h time.h])
 AC_CHECK_HEADERS([netinet/in.h])
 AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 14:56:16 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 14:56:16 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r379 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060204145616.AD44F94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 14:56:13 +0000 (Sat, 04 Feb 2006)
New Revision: 379

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.cpp, emu.h
- Use the emulated functions, which return file names in UTF-8, when
  compiling with MinGW, rather than the standard ones in <dirent.h>


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-04 14:54:57 UTC (rev 378)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-04 14:56:13 UTC (rev 379)
@@ -620,14 +620,6 @@
 	return 0;
 }
 
-
-
-
-
-// MinGW provides opendir(), etc. via <dirent.h>
-// MSVC does not provide these, so emulation is needed
-
-#ifndef __MINGW32__
 // --------------------------------------------------------------------------
 //
 // Function
@@ -739,9 +731,10 @@
 	return NULL;
 }
 
-//this kinda makes it not thread friendly!
-//but I don't think it needs to be.
+// this kinda makes it not thread friendly!
+// but I don't think it needs to be.
 char tempbuff[MAX_PATH];
+
 // --------------------------------------------------------------------------
 //
 // Function
@@ -821,7 +814,6 @@
 	}
 	return -1;
 }
-#endif // !__MINGW32__
 
 // --------------------------------------------------------------------------
 //

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-04 14:54:57 UTC (rev 378)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-04 14:56:13 UTC (rev 379)
@@ -272,33 +272,31 @@
 	return _mkdir(pathname);
 }
 
-#ifdef __MINGW32__
-	#include <dirent.h>
-#else
-	inline int strcasecmp(const char *s1, const char *s2)
-	{
-		return _stricmp(s1,s2);
-	}
+#ifndef __MINGW32__
+inline int strcasecmp(const char *s1, const char *s2)
+{
+	return _stricmp(s1,s2);
+}
+#endif
 
-	struct dirent
-	{
-		char *d_name;
-	};
+struct dirent
+{
+	char *d_name;
+};
 
-	struct DIR
-	{
-		intptr_t		fd;	// filedescriptor
-		// struct _finddata_t	info;
-		struct _wfinddata_t	info;
-		// struct _finddata_t 	info;
-		struct dirent		result;	// d_name (first time null)
-		wchar_t			*name;	// null-terminated byte string
-	};
+struct DIR
+{
+	intptr_t		fd;	// filedescriptor
+	// struct _finddata_t	info;
+	struct _wfinddata_t	info;
+	// struct _finddata_t 	info;
+	struct dirent		result;	// d_name (first time null)
+	wchar_t			*name;	// null-terminated byte string
+};
 
-	DIR *opendir(const char *name);
-	struct dirent *readdir(DIR *dp);
-	int closedir(DIR *dp);
-#endif
+DIR *opendir(const char *name);
+struct dirent *readdir(DIR *dp);
+int closedir(DIR *dp);
 
 HANDLE openfile(const char *filename, int flags, int mode);
 


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 15:51:30 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 15:51:30 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r380 - box/chris/win32/releases
Message-ID: <20060204155130.5487D94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 15:42:05 +0000 (Sat, 04 Feb 2006)
New Revision: 380

Added:
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.tgz
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.zip
Log:
* boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.zip
* boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.tgz
- Uploaded a new release candidate based on the current trunk (as of r379)
  plus the fixes in the vc2005-compile-fixes branch.
- Fixed handling of file names with non-ANSI characters (e.g. accents)
- Improved logging when the daemon fails to start
- Restoring files still generates a spurious error (the file is restored)


Added: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.tgz
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.tgz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 17:08:21 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 4 Feb 2006 17:08:21 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r348 - in box/chris/bb-save-state: .
 bin/bbackupd lib/common lib/server
In-Reply-To: <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk>
 <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk>
 <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com>
 <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk>
 <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com>
 <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk>
 <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com>
 <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602041706240.14656@top.qwarx.com>

Hi Ben,

On Mon, 30 Jan 2006, Ben Summers wrote:

>> >  And are some windows changes still pending?
>> 
>>  Yes, including updated project files for VS2005 as you pointed out 
>>  (vc2005-compile-fixes). But I'm not too bothered if they don't make it 
>>  into 0.10.
>
> If they're there, why not? What's the diff to be merged?

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

> I can believe it. ACLs are complex things, so the API is going to be tricky, 
> I suppose. But then you want nice defaults which don't cause problems for 
> developers, don't you?

Or at least good sample code, under a permissive license :-) If Microsoft 
wants to improve their security reputation, it should be a high priority 
for them to make it as easy as possible - and secure by default.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 17:58:24 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sat, 4 Feb 2006 09:58:24 -0800 (PST)
Subject: [Box Backup-dev] Re: [Box Backup] Danish and other special chars
In-Reply-To: <Pine.LNX.4.62.0602041741270.14656@top.qwarx.com>
Message-ID: <20060204175824.72391.qmail@web36702.mail.mud.yahoo.com>

> Also, I think there is no guarantee that other clients will store their 
> filenames on the server in UTF-8 or any other encoding, so moving files 
> with such names across platforms would still be a problem, I guess.

Hmmmm, I thought UTF-8 was the "standard" encoding used on the server side. If not, where does the
UTF-8 come from in the first place?

I think the only way to solve this once and for all would be to pick a standard (say, UTF-8), and
have each client convert filenames to/from this standard before transmitting up/down to/from the
server.

> > WideCharToMultiByte(CP_UTF8, ...)
> Yes, but I can't printf a wide char string

If I understand this function correctly, the call will not only translate from UTF-8 to a local
encoding, but also translate from wide-char to multi-byte (MBCS), ready to go for printf().

Gary

P.S.

Moved this thread to -dev.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Sat Feb  4 18:14:46 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 4 Feb 2006 18:14:46 +0000 (GMT)
Subject: [Box Backup-dev] Re: [Box Backup] Danish and other special chars
In-Reply-To: <20060204175824.72391.qmail@web36702.mail.mud.yahoo.com>
References: <20060204175824.72391.qmail@web36702.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602041809200.14656@top.qwarx.com>

Hi Gary,

On Sat, 4 Feb 2006, Gary wrote:

> Hmmmm, I thought UTF-8 was the "standard" encoding used on the server 
> side. If not, where does the UTF-8 come from in the first place?

Because we encoded the filename that way (in the win32 client) before 
sending the file to the server.

The other clients do things rather differently, but I believe, and please 
correct me if I'm wrong, that readdir() and friends return the filename as 
an array of bytes. The encoding used to store international characters in 
these byte arrays is probably system-dependent. I believe that older 
Linux systems would use the configured locale, while newer ones (e.g. Red 
Hat > 9.0) use UTF-8. I have no idea about other Unix systems.

> I think the only way to solve this once and for all would be to pick a 
> standard (say, UTF-8), and have each client convert filenames to/from 
> this standard before transmitting up/down to/from the server.

That certainly seems like the way to go to me, but lacking the 
availability of a standard Unicode conversion library on Unix platforms, I 
think it would be very difficult to achieve there. Nevertheless, we could 
just assume that each Unix must implement full UTF-8 support in filenames 
and consoles, or suffer the consequences :-)

> If I understand this function correctly, the call will not only 
> translate from UTF-8 to a local encoding, but also translate from 
> wide-char to multi-byte (MBCS), ready to go for printf().

Since when is MBCS ready for printf? I thought printf() could only take an 
ASCII byte array? Perhaps there is a unicode equivalent like _wprintf that 
we can use on Windows?

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 19:14:27 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sat, 4 Feb 2006 11:14:27 -0800 (PST)
Subject: [Box Backup-dev] Re: [Box Backup] Danish and other special chars
In-Reply-To: <Pine.LNX.4.62.0602041809200.14656@top.qwarx.com>
Message-ID: <20060204191427.83035.qmail@web36704.mail.mud.yahoo.com>

> an array of bytes. The encoding used to store international characters in 
> these byte arrays is probably system-dependent. I believe that

Well, so for things to work properly, the backup client o/s has to be the same as restore client
o/s. No cross-platform restores.

> Since when is MBCS ready for printf? I thought printf() could only take an 
> ASCII byte array? Perhaps there is a unicode equivalent like _wprintf that 
> we can use on Windows?

According to documentation for VS2K5, _tprintf evalues to printf for both SBCS and MBCS, and to
wprintf for UNICODE.

The question now is whether printf, having taken MBCS, properly outputs the (special) double-byte
sequences.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Sat Feb  4 19:18:10 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 4 Feb 2006 19:18:10 +0000 (GMT)
Subject: [Box Backup-dev] Re: [Box Backup] Danish and other special chars
In-Reply-To: <20060204191427.83035.qmail@web36704.mail.mud.yahoo.com>
References: <20060204191427.83035.qmail@web36704.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602041916120.14656@top.qwarx.com>

Hi Gary,

> According to documentation for VS2K5, _tprintf evalues to printf for 
> both SBCS and MBCS, and to wprintf for UNICODE.
>
> The question now is whether printf, having taken MBCS, properly outputs 
> the (special) double-byte sequences.

I really doubt it - how would the standard printf() know whether its 
argument was in MBCS or UTF-8 or any other encoding? My guess is that it 
requires the argument to be in platform default encoding (CP_ACP).

I'm happy to make bbackupquery use wprintf() on Windows with multibyte 
strings, without changing how it works on other platforms, and I'm working 
on that now.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 19:51:28 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 19:51:28 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r381 - in box/chris/win32/vc2005-compile-fixes: bin/bbackupquery lib/win32
Message-ID: <20060204195128.1414894@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 19:51:22 +0000 (Sat, 04 Feb 2006)
New Revision: 381

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* lib/win32/emu.cpp, lib/win32/emu.h, bin/bbackupquery/BackupQueries.cpp
- First pass at listing files with wide characters on Win32


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-04 15:42:05 UTC (rev 380)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-04 19:51:22 UTC (rev 381)
@@ -335,7 +335,16 @@
 		rootDir = FindDirectoryObjectID(args[0], opts[LIST_OPTION_ALLOWOLD], opts[LIST_OPTION_ALLOWDELETED]);
 		if(rootDir == 0)
 		{
-			printf("Directory %s not found on store\n", args[0].c_str());
+			char* pMsg = "Directory '%s' not found on store\n";
+#ifdef WIN32
+			WCHAR* pMsgBuffer  = ConvertUtf8ToMultiByte(pMsg);
+			WCHAR* pNameBuffer = ConvertUtf8ToMultiByte(args[0].c_str());
+			wprintf(pMsgBuffer, pNameBuffer);
+			delete [] pNameBuffer;
+			delete [] pMsgBuffer;
+#else
+			printf(msg, args[0].c_str());
+#endif
 			return;
 		}
 	}
@@ -379,19 +388,16 @@
 	{
 		// Display this entry
 		BackupStoreFilenameClear clear(en->GetName());
-		std::string line;
 		
 		// Object ID?
 		if(!opts[LIST_OPTION_NOOBJECTID])
 		{
 			// add object ID to line
-			char oid[32];
-#ifdef WIN32
-			sprintf(oid, "%08I64x ", en->GetObjectID());
+#ifdef _MSC_VER
+			printf("%08I64x ", (int64_t)en->GetObjectID());
 #else
-			sprintf(oid, "%08llx ", en->GetObjectID());
+			printf("%08llx ", (long long)en->GetObjectID());
 #endif
-			line += oid;
 		}
 		
 		// Flags?
@@ -418,58 +424,71 @@
 			// terminate
 			*(f++) = ' ';
 			*(f++) = '\0';
-			line += displayflags;
+			printf(displayflags);
+			
 			if(en_flags != 0)
 			{
-				line += "[ERROR: Entry has additional flags set] ";
+				printf("[ERROR: Entry has additional flags set] ");
 			}
 		}
 		
 		if(opts[LIST_OPTION_TIMES])
 		{
 			// Show times...
-			line += BoxTimeToISO8601String(en->GetModificationTime());
-			line += ' ';
+			printf("%s ", BoxTimeToISO8601String(en->GetModificationTime()));
 		}
 		
 		if(opts[LIST_OPTION_DISPLAY_HASH])
 		{
-			char hash[64];
-#ifdef WIN32
-			::sprintf(hash, "%016I64x ", en->GetAttributesHash());
+#ifdef _MSC_VER
+			printf("%016I64x ", (int64_t)en->GetAttributesHash());
 #else
-			::sprintf(hash, "%016llx ", en->GetAttributesHash());
+			printf("%016llx ", (long long)en->GetAttributesHash());
 #endif
-			line += hash;
 		}
 		
 		if(opts[LIST_OPTION_SIZEINBLOCKS])
 		{
-			char num[32];
-#ifdef WIN32
-			sprintf(num, "%05I64d ", en->GetSizeInBlocks());
+#ifdef _MSC_VER
+			printf("%05I64d ", (int64_t)en->GetSizeInBlocks());
 #else
-			sprintf(num, "%05lld ", en->GetSizeInBlocks());
+			printf("%05lld ", (long long)en->GetSizeInBlocks());
 #endif
-			line += num;
 		}
 		
 		// add name
 		if(!FirstLevel)
 		{
-			line += rListRoot;
-			line += '/';
+#ifdef WIN32
+			pMsgBuffer  = ConvertUtf8ToMultiByte("%s");
+			pNameBuffer = ConvertUtf8ToMultiByte(rListRoot);
+			wprintf(pMsgBuffer, pNameBuffer);
+			delete [] pNameBuffer;
+			delete [] pMsgBuffer;
+			printf("/");
+#else
+			printf("%s/", rListRoot.c_str());
+#endif
 		}
-		line += clear.GetClearFilename().c_str();
 		
+#ifdef WIN32
+		{
+			pMsgBuffer  = ConvertUtf8ToMultiByte("%s");
+			pNameBuffer = ConvertUtf8ToMultiByte(
+				clear.GetClearFilename().c_str());
+			wprintf(pMsgBuffer, pNameBuffer);
+			delete [] pNameBuffer;
+			delete [] pMsgBuffer;
+		}
+#else
+		printf("%s", clear.GetClearFilename().c_str());
+#endif
+		
 		if(!en->GetName().IsEncrypted())
 		{
-			line += "[FILENAME NOT ENCRYPTED]";
+			printf("[FILENAME NOT ENCRYPTED]");
 		}
 		
-		// print line
-		printf("%s\n", line.c_str());
-		
 		// Directory?
 		if((en->GetFlags() & BackupStoreDirectory::Entry::Flags_Dir) != 0)
 		{
@@ -1715,8 +1734,3 @@
 	// Undelete
 	mrConnection.QueryUndeleteDirectory(dirID);
 }
-
-
-
-
-

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-04 15:42:05 UTC (rev 380)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-04 19:51:22 UTC (rev 381)
@@ -203,131 +203,177 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    openfile
-//		Purpose: replacement for any open calls - handles unicode filenames - supplied in utf8
-//		Created: 25th October 2004
+//		Name:    ConvertUtf8ToMultiByte
+//		Purpose: Converts a string from UTF-8 to multibyte characters (MBCS).
+//			Returns a buffer which MUST be freed by the caller with delete[].
+//			In case of fire, logs the error and returns NULL.
+//		Created: 4th February 2006
 //
 // --------------------------------------------------------------------------
-HANDLE openfile(const char *filename, int flags, int mode)
+WCHAR* ConvertUtf8ToMultiByte(const char* pName)
 {
-	try
-	{
-		wchar_t *buffer;
-		std::string fileN(filename);
+	int strlen = MultiByteToWideChar(
+		CP_UTF8,       // source code page
+		0,             // character-type options
+		pName,         // string to map
+		strlen(pName), // number of bytes in string
+		NULL,          // wide-character buffer
+		0              // size of buffer - work out 
+		               //   how much space we need
+		);
 
-		std::string tmpStr("\\\\?\\");
-		//is the path relative or otherwise
-		if ( fileN[1] != ':' )
-		{
-			//we need to get the current directory
-			char wd[PATH_MAX];
-			if(::getcwd(wd, PATH_MAX) == 0)
-			{
-				return NULL;
-			}
-			tmpStr += wd;
-			if (tmpStr[tmpStr.length()] != '\\')
-			{
-				tmpStr += '\\';
-			}
-		}
-		tmpStr += filename;
+	WCHAR* buffer = new WCHAR[strlen+1];
 
-		int strlen = MultiByteToWideChar(
-			CP_UTF8,               // code page
-			0,                     // character-type options
-			tmpStr.c_str(),        // string to map
-			(int)tmpStr.length(),       // number of bytes in string
-			NULL,                  // wide-character buffer
-			0                      // size of buffer - work out how much space we need
-			);
+	if (buffer == NULL)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert string to multibyte: '%s': "
+			"out of memory", pName);
+		errno = ENOMEM;
+		return NULL;
+	}
 
-		buffer = new wchar_t[strlen+1];
-		if ( buffer == NULL )
-		{
-			::syslog(LOG_WARNING, "Failed to allocate buffer "
-				"for converting file name: %s",
-				tmpStr.c_str());
-			return NULL;
-		}
+	strlen = MultiByteToWideChar(
+		CP_UTF8,       // source code page
+		0,             // character-type options
+		pName,         // string to map
+		strlen(pName), // number of bytes in string
+		buffer,        // wide-character buffer
+		strlen         // size of buffer
+		);
 
-		strlen = MultiByteToWideChar(
-			CP_UTF8,               // code page
-			0,                     // character-type options
-			tmpStr.c_str(),        // string to map
-			(int)tmpStr.length(),       // number of bytes in string
-			buffer,                // wide-character buffer
-			strlen                 // size of buffer
-			);
+	if (strlen == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert string to multibyte: '%s': "
+			"error %i", pName, GetLastError());
+		errno = EACCES;
+		delete [] buffer;
+		return NULL;
+	}
 
-		if ( strlen == 0 )
-		{
-			::syslog(LOG_WARNING, "Failed to convert filename "
-				"to unicode: %s (error %i)",
-				tmpStr.c_str(), GetLastError());
-			delete [] buffer;
-			return NULL;
-		}
+	buffer[strlen] = L'\0';
 
-		buffer[strlen] = L'\0';
+	return buffer;
+}
 
-		//flags could be O_WRONLY | O_CREAT | O_RDONLY
-		DWORD createDisposition = OPEN_EXISTING;
-		DWORD shareMode = FILE_SHARE_READ;
-		DWORD accessRights = FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA;
-
-		if (flags & O_WRONLY)
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertPathToAbsoluteUnicode
+//		Purpose: Converts relative paths to absolute (with unicode marker)
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+std::string ConvertPathToAbsoluteUnicode(const char *filename)
+{
+	std::string tmpStr("\\\\?\\");
+	
+	// Is the path relative or absolute?
+	// Absolute paths on Windows are always a drive letter
+	// followed by ':'
+	
+	if (fileN[1] != ':')
+	{
+		// Must be relative. We need to get the 
+		// current directory to make it absolute.
+		
+		char wd[PATH_MAX];
+		if (::getcwd(wd, PATH_MAX) == 0)
 		{
-			shareMode = FILE_SHARE_WRITE;
+			::syslog(LOG_WARNING, 
+				"Failed to open '%s': path too long", pName);
+			errno = ENAMETOOLONG;
+			tmpStr = "";
+			return tmpStr;
 		}
-		if (flags & O_RDWR)
+		
+		tmpStr += wd;
+		if (tmpStr[tmpStr.length()] != '\\')
 		{
-			shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
+			tmpStr += '\\';
 		}
-		if (flags & O_CREAT)
-		{
-			createDisposition = OPEN_ALWAYS;
-			shareMode |= FILE_SHARE_WRITE;
-			accessRights |= FILE_WRITE_ATTRIBUTES 
-				| FILE_WRITE_DATA | FILE_WRITE_EA 
-				| FILE_ALL_ACCESS;
-		}
-		if (flags & O_TRUNC)
-		{
-			createDisposition = CREATE_ALWAYS;
-		}
-		if (flags & O_EXCL)
-		{
-			shareMode = 0;
-		}
+	}
+	
+	tmpStr += filename;
+	return tmpStr;
+}
 
-		HANDLE hdir = CreateFileW(buffer, 
-			accessRights, 
-			shareMode, 
-			NULL, 
-			createDisposition, 
-			FILE_FLAG_BACKUP_SEMANTICS,
-			NULL);
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    openfile
+//		Purpose: replacement for any open calls - handles unicode filenames - supplied in utf8
+//		Created: 25th October 2004
+//
+// --------------------------------------------------------------------------
+HANDLE openfile(const char *pFileName, int flags, int mode)
+{
+	std::string AbsPathWithUnicode = ConvertPathToAbsoluteUnicode(pFileName);
+	
+	if (AbsPathWithUnicode.size() == 0)
+	{
+		// error already logged by ConvertPathToAbsoluteUnicode()
+		return NULL;
+	}
+	
+	WCHAR* pBuffer = ConvertUtf8ToMultiByte(AbsPathWithUnicode.c_str());
+	// We are responsible for freeing pBuffer
+	
+	if (pBuffer == NULL)
+	{
+		// error already logged by ConvertUtf8ToMultiByte()
+		return NULL;
+	}
 
-		if ( hdir == INVALID_HANDLE_VALUE )
-		{
-			DWORD err = GetLastError();
-			::syslog(LOG_WARNING, "Failed to open file %s: "
-				"error %i", filename, err);
-			delete [] buffer;
-			return NULL;
-		}
+	// flags could be O_WRONLY | O_CREAT | O_RDONLY
+	DWORD createDisposition = OPEN_EXISTING;
+	DWORD shareMode = FILE_SHARE_READ;
+	DWORD accessRights = FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA;
 
-		delete [] buffer;
-		return hdir;
-
+	if (flags & O_WRONLY)
+	{
+		shareMode = FILE_SHARE_WRITE;
 	}
-	catch(...)
+	if (flags & O_RDWR)
 	{
-		::syslog(LOG_ERR, "Caught openfile: %s", filename);
+		shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
 	}
-	return NULL;
+	if (flags & O_CREAT)
+	{
+		createDisposition = OPEN_ALWAYS;
+		shareMode |= FILE_SHARE_WRITE;
+		accessRights |= FILE_WRITE_ATTRIBUTES 
+			| FILE_WRITE_DATA | FILE_WRITE_EA 
+			| FILE_ALL_ACCESS;
+	}
+	if (flags & O_TRUNC)
+	{
+		createDisposition = CREATE_ALWAYS;
+	}
+	if (flags & O_EXCL)
+	{
+		shareMode = 0;
+	}
 
+	HANDLE hdir = CreateFileW(pBuffer, 
+		accessRights, 
+		shareMode, 
+		NULL, 
+		createDisposition, 
+		FILE_FLAG_BACKUP_SEMANTICS,
+		NULL);
+	
+	delete [] pBuffer;
+
+	if (hdir == INVALID_HANDLE_VALUE)
+	{
+		::syslog(LOG_WARNING, "Failed to open file %s: "
+			"error %i", pFileName, GetLastError());
+		return NULL;
+	}
+
+	return hdir;
 }
 
 // MinGW provides a getopt implementation
@@ -427,76 +473,26 @@
 //		Created: 10th December 2004
 //
 // --------------------------------------------------------------------------
-HANDLE OpenFileByNameUtf8(const char* pName)
+HANDLE OpenFileByNameUtf8(const char* pFileName)
 {
-	//some string thing - required by ms to indicate long/unicode filename
-	std::string tmpStr("\\\\?\\");
-
-	// is the path relative or otherwise
-	std::string fileN(pName);
-	if (fileN[1] != ':')
+	std::string AbsPathWithUnicode = ConvertPathToAbsoluteUnicode(pFileName);
+	
+	if (AbsPathWithUnicode.size() == 0)
 	{
-		// we need to get the current directory
-		char wd[PATH_MAX];
-		if(::getcwd(wd, PATH_MAX) == 0)
-		{
-			::syslog(LOG_WARNING, 
-				"Failed to open '%s': path too long", pName);
-			errno = ENAMETOOLONG;
-			return NULL;
-		}
-
-		tmpStr += wd;
-		if (tmpStr[tmpStr.length()] != '\\')
-		{
-			tmpStr += '\\';
-		}
-	}
-
-	tmpStr += fileN;
-
-	int strlen = MultiByteToWideChar(
-		CP_UTF8,               // code page
-		0,                     // character-type options
-		tmpStr.c_str(),        // string to map
-		(int)tmpStr.length(),  // number of bytes in string
-		NULL,                  // wide-character buffer
-		0                      // size of buffer - work out 
-		                       //   how much space we need
-		);
-
-	wchar_t* buffer = new wchar_t[strlen+1];
-
-	if (buffer == NULL)
-	{
-		::syslog(LOG_WARNING, 
-			"Failed to open '%s': out of memory", pName);
-		errno = ENOMEM;
+		// error already logged by ConvertPathToAbsoluteUnicode()
 		return NULL;
 	}
-
-	strlen = MultiByteToWideChar(
-		CP_UTF8,               // code page
-		0,                     // character-type options
-		tmpStr.c_str(),        // string to map
-		(int)tmpStr.length(),  // number of bytes in string
-		buffer,                // wide-character buffer
-		strlen                 // size of buffer
-		);
-
-	if (strlen == 0)
+	
+	WCHAR* pBuffer = ConvertUtf8ToMultiByte(AbsPathWithUnicode.c_str());
+	// We are responsible for freeing pBuffer
+	
+	if (pBuffer == NULL)
 	{
-		::syslog(LOG_WARNING, 
-			"Failed to open '%s': could not convert "
-			"file name to Unicode", pName);
-		errno = EACCES;
-		delete [] buffer;
+		// error already logged by ConvertUtf8ToMultiByte()
 		return NULL;
 	}
 
-	buffer[strlen] = L'\0';
-
-	HANDLE handle = CreateFileW(buffer, 
+	HANDLE handle = CreateFileW(pBuffer, 
 		FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA, 
 		FILE_SHARE_READ | FILE_SHARE_DELETE | FILE_SHARE_WRITE, 
 		NULL, 
@@ -510,7 +506,7 @@
 		// open in this mode - to get the inode information
 		// at least one process must have the file open - 
 		// in this case someone else does.
-		handle = CreateFileW(buffer, 
+		handle = CreateFileW(pBuffer, 
 			0, 
 			FILE_SHARE_READ, 
 			NULL, 
@@ -532,7 +528,7 @@
 		else
 		{
 			::syslog(LOG_WARNING, 
-				"Failed to open '%s': error %d", pName);
+				"Failed to open '%s': error %d", pFileName, err);
 			errno = EACCES;
 		}
 
@@ -630,105 +626,50 @@
 // --------------------------------------------------------------------------
 DIR *opendir(const char *name)
 {
-	try
+	if (!name || !name[0])
 	{
-		DIR *dir = 0;
-		std::string dirName(name);
+		errno = EINVAL;
+		return NULL;
+	}
+	
+	std::string dirName(name);
 
-		//append a '\' win32 findfirst is sensitive to this
-		if ( dirName[dirName.size()] != '\\' || dirName[dirName.size()] != '/' )
-		{
-			dirName += '\\';
-		}
+	//append a '\' win32 findfirst is sensitive to this
+	if ( dirName[dirName.size()] != '\\' || dirName[dirName.size()] != '/' )
+	{
+		dirName += '\\';
+	}
 
-		//what is the search string? - everything
-		dirName += '*';
+	// what is the search string? - everything
+	dirName += '*';
 
-		if(name && name[0])
-		{
-			if ( ( dir = new DIR ) != 0 )
-			{
-				//mbstowcs(dir->name, dirName.c_str(),100);
-				//wcscpy((wchar_t*)dir->name, (const wchar_t*)dirName.c_str());
-				//mbstowcs(dir->name, dirName.c_str(), dirName.size()+1);
-				//wchar_t *buffer;
+	DIR *pDir = new DIR;
+	if (pDir == NULL)
+	{
+		errno = ENOMEM;
+		return NULL;
+	}
 
-				int strlen = MultiByteToWideChar(
-					CP_UTF8,               // code page
-					0,                     // character-type options
-					dirName.c_str(),       // string to map
-					(int)dirName.length(), // number of bytes in string
-					NULL,                  // wide-character buffer
-					0                      // size of buffer - work out how much space we need
-					);
+	pDir->name = ConvertUtf8ToMultiByte(dirName.c_str());
+	// We are responsible for freeing dir->name
+	
+	if (pDir->name == NULL)
+	{
+		delete pDir;
+		return NULL;
+	}
 
-				dir->name = new wchar_t[strlen+1];
+	pDir->fd = _wfindfirst((const wchar_t*)pDir->name, &(pDir->info));
 
-				if (dir->name == NULL)
-				{
-					delete dir;
-					dir   = 0;
-					errno = ENOMEM;
-					return NULL;
-				}
-
-				strlen = MultiByteToWideChar(
-					CP_UTF8,               // code page
-					0,                     // character-type options
-					dirName.c_str(),        // string to map
-					(int)dirName.length(),       // number of bytes in string
-					dir->name,                // wide-character buffer
-					strlen                 // size of buffer
-					);
-
-				if (strlen == 0)
-				{
-					delete dir->name;
-					delete dir;
-					dir   = 0;
-					errno = ENOMEM;
-					return NULL;
-				}
-
-				dir->name[strlen] = L'\0';
-
-				
-				dir->fd = _wfindfirst(
-					(const wchar_t*)dir->name,
-					&dir->info);
-
-				if (dir->fd != -1)
-				{
-					dir->result.d_name = 0;
-				}
-				else // go back
-				{
-					delete [] dir->name;
-					delete dir;
-					dir = 0;
-				}
-			}
-			else // backwards again
-			{
-				delete dir;
-				dir   = 0;
-				errno = ENOMEM;
-			}
-		}
-		else
-		{
-			errno = EINVAL;
-		}
-
-		return dir;
-
-	}
-	catch(...)
+	if (pDir->fd == -1)
 	{
-		printf("Caught opendir");
+		delete [] pDir->name;
+		delete pDir;
+		return NULL;
 	}
-
-	return NULL;
+		
+	pDir->result.d_name = 0;
+	return pDir;
 }
 
 // this kinda makes it not thread friendly!
@@ -915,19 +856,18 @@
 		break;
 	}
 
-
-	//taken from MSDN
+	// taken from MSDN
 	int sixfourpos;
 	while ( (sixfourpos = (int)sixfour.find("%ll")) != -1 )
 	{
-		//maintain portability - change the 64 bit formater...
+		// maintain portability - change the 64 bit formater...
 		std::string temp = sixfour.substr(0,sixfourpos);
 		temp += "%I64";
 		temp += sixfour.substr(sixfourpos+3, sixfour.length());
 		sixfour = temp;
 	}
 
-	//printf("parsed string is:%s\r\n", sixfour.c_str());
+	// printf("parsed string is:%s\r\n", sixfour.c_str());
 
 	va_list args;
 	va_start(args, frmt);
@@ -939,16 +879,16 @@
 
 	LPCSTR strings[] = { buffer, NULL };
 
-	if (!ReportEvent(gSyslogH,    // event log handle 
-		errinfo,              // event type 
-		0,                    // category zero 
-		MSG_ERR_EXIST,	      // event identifier - 
-		                      // we will call them all the same
-		NULL,                 // no user security identifier 
-		1,                    // one substitution string 
-		0,                    // no data 
-		strings,     // pointer to string array 
-		NULL))                // pointer to data 
+	if (!ReportEvent(gSyslogH, // event log handle 
+		errinfo,               // event type 
+		0,                     // category zero 
+		MSG_ERR_EXIST,	       // event identifier - 
+		                       // we will call them all the same
+		NULL,                  // no user security identifier 
+		1,                     // one substitution string 
+		0,                     // no data 
+		strings,               // pointer to string array 
+		NULL))                 // pointer to data 
 
 	{
 		DWORD err = GetLastError();

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-04 15:42:05 UTC (rev 380)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-04 19:51:22 UTC (rev 381)
@@ -428,6 +428,10 @@
 int poll (struct pollfd *ufds, unsigned long nfds, int timeout);
 bool EnableBackupRights( void );
 
+// caller must free the returned buffer from ConvertUtf8ToMultiByte()
+// with delete[]
+WCHAR* ConvertUtf8ToMultiByte(const char* pName);
+
 //
 // MessageId: MSG_ERR_EXIST
 // MessageText:


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 23:03:39 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 23:03:39 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r382 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060204230339.B98B594@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 23:03:31 +0000 (Sat, 04 Feb 2006)
New Revision: 382

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.cpp, emu.h
- Fixed some compilation errors
- Added a new method to convert UTF-8 to console encoding


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-04 19:51:22 UTC (rev 381)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-04 23:03:31 UTC (rev 382)
@@ -159,7 +159,8 @@
 		TOKEN_ADJUST_PRIVILEGES, 
 		&hToken ))
 	{
-		printf( "Cannot open process token - err = %d\n", GetLastError( ) );
+		printf( "Cannot open process token: error %d\n", 
+			(int)GetLastError() );
 		return false;
 	}
 
@@ -170,7 +171,8 @@
 		SE_BACKUP_NAME, //the name of the privilege
 		&( token_priv.Privileges[0].Luid )) ) //result
 	{
-		printf( "Cannot lookup backup privilege - err = %d\n", GetLastError( ) );
+		printf( "Cannot lookup backup privilege: error %d\n", 
+			(int)GetLastError( ) );
 		return false;
 	}
 
@@ -190,7 +192,8 @@
 		//this function is a little tricky - if we were adjusting
 		//more than one privilege, it could return success but not
 		//adjust them all - in the general case, you need to trap this
-		printf( "Could not enable backup privileges - err = %d\n", GetLastError( ) );
+		printf( "Could not enable backup privileges: error %d\n", 
+			(int)GetLastError( ) );
 		return false;
 
 	}
@@ -212,7 +215,7 @@
 // --------------------------------------------------------------------------
 WCHAR* ConvertUtf8ToMultiByte(const char* pName)
 {
-	int strlen = MultiByteToWideChar(
+	int len = MultiByteToWideChar(
 		CP_UTF8,       // source code page
 		0,             // character-type options
 		pName,         // string to map
@@ -222,7 +225,7 @@
 		               //   how much space we need
 		);
 
-	WCHAR* buffer = new WCHAR[strlen+1];
+	WCHAR* buffer = new WCHAR[len+1];
 
 	if (buffer == NULL)
 	{
@@ -233,16 +236,16 @@
 		return NULL;
 	}
 
-	strlen = MultiByteToWideChar(
+	len = MultiByteToWideChar(
 		CP_UTF8,       // source code page
 		0,             // character-type options
 		pName,         // string to map
 		strlen(pName), // number of bytes in string
 		buffer,        // wide-character buffer
-		strlen         // size of buffer
+		len         // size of buffer
 		);
 
-	if (strlen == 0)
+	if (len == 0)
 	{
 		::syslog(LOG_WARNING, 
 			"Failed to convert string to multibyte: '%s': "
@@ -252,7 +255,7 @@
 		return NULL;
 	}
 
-	buffer[strlen] = L'\0';
+	buffer[len] = L'\0';
 
 	return buffer;
 }
@@ -260,12 +263,93 @@
 // --------------------------------------------------------------------------
 //
 // Function
+//		Name:    ConvertUtf8ToConsole
+//		Purpose: Converts a string from UTF-8 to the console 
+//			 code page. Returns a buffer which MUST be freed 
+//			 by the caller with delete[].
+//			 In case of fire, logs the error and returns NULL.
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+char* ConvertUtf8ToConsole(const char* pString)
+{
+	WCHAR* pMulti = ConvertUtf8ToMultiByte(pString);
+	if (pMulti == NULL)
+	{
+		return NULL;
+	}
+
+	int len = WideCharToMultiByte(
+		GetConsoleCP(), // destination code page
+		0,              // character-type options
+		pMulti,         // string to map
+		-1,             // number of bytes in string - auto detect
+		NULL,           // output buffer
+		0,              // size of buffer - work out 
+		                //   how much space we need
+		"?",		// replace unknown chars with "?"
+		NULL		// don't tell us when that happened
+		);
+
+	if (len == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert UTF-8 string to console: '%s': "
+			"error %d", pString, GetLastError());
+		delete [] pMulti;
+		errno = EINVAL;
+		return NULL;
+	}
+
+	char* buffer = new char[len+1];
+
+	if (buffer == NULL)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert UTF-8 string to console: '%s': "
+			"out of memory", pString);
+		delete [] pMulti;
+		errno = ENOMEM;
+		return NULL;
+	}
+
+	len = WideCharToMultiByte(
+		GetConsoleCP(), // source code page
+		0,              // character-type options
+		pMulti,         // string to map
+		-1,             // number of bytes in string - auto detect
+		buffer,         // output buffer
+		len,            // size of buffer
+		"?",		// replace unknown chars with "?"
+		NULL		// don't tell us when that happened
+		);
+
+	if (len == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert UTF-8 string to console: '%s': "
+			"error %i", pString, GetLastError());
+		delete [] pMulti;
+		errno = EACCES;
+		delete [] buffer;
+		return NULL;
+	}
+
+	buffer[len] = L'\0';
+	delete [] pMulti;
+
+	return buffer;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
 //		Name:    ConvertPathToAbsoluteUnicode
 //		Purpose: Converts relative paths to absolute (with unicode marker)
 //		Created: 4th February 2006
 //
 // --------------------------------------------------------------------------
-std::string ConvertPathToAbsoluteUnicode(const char *filename)
+std::string ConvertPathToAbsoluteUnicode(const char *pFileName)
 {
 	std::string tmpStr("\\\\?\\");
 	
@@ -273,7 +357,7 @@
 	// Absolute paths on Windows are always a drive letter
 	// followed by ':'
 	
-	if (fileN[1] != ':')
+	if (pFileName[1] != ':')
 	{
 		// Must be relative. We need to get the 
 		// current directory to make it absolute.
@@ -282,7 +366,8 @@
 		if (::getcwd(wd, PATH_MAX) == 0)
 		{
 			::syslog(LOG_WARNING, 
-				"Failed to open '%s': path too long", pName);
+				"Failed to open '%s': path too long", 
+				pFileName);
 			errno = ENAMETOOLONG;
 			tmpStr = "";
 			return tmpStr;
@@ -295,7 +380,7 @@
 		}
 	}
 	
-	tmpStr += filename;
+	tmpStr += pFileName;
 	return tmpStr;
 }
 
@@ -515,7 +600,7 @@
 			NULL);
 	}
 
-	delete [] buffer;
+	delete [] pBuffer;
 
 	if (handle == INVALID_HANDLE_VALUE)
 	{
@@ -873,6 +958,7 @@
 	va_start(args, frmt);
 
 	int len = vsnprintf(buffer, sizeof(buffer)-1, sixfour.c_str(), args);
+	ASSERT(len < sizeof(buffer))
 	buffer[sizeof(buffer)-1] = 0;
 
 	va_end(args);
@@ -892,8 +978,8 @@
 
 	{
 		DWORD err = GetLastError();
-		printf("Unable to send message to Event Log "
-			"(error %i):\r\n", err);
+		printf("Unable to send message to Event Log: "
+			"error %i:\r\n", (int)err);
 	}
 
 	printf("%s\r\n", buffer);

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-04 19:51:22 UTC (rev 381)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-04 23:03:31 UTC (rev 382)
@@ -39,6 +39,7 @@
 #define lseek(fd,off,whence)  _lseek(fd,off,whence)
 #define unlink(file)          _unlink(file)
 #define chmod(file,mode)      _chmod(file,mode)
+#define ::chmod(file,mode)    _chmod(file,mode)
 #define getcwd(buf,length)    _getcwd(buf,length)
 #define fileno(struct_file)   _fileno(struct_file)
 #define chdir(dir)            _chdir(dir)
@@ -121,9 +122,9 @@
 	return 0;
 }
 
-inline int _chmod(const char * Filename, int uid)
+inline int _chmod(const char * Filename, int mode)
 {
-	//indicate sucsess
+	// indicate success
 	return 0;
 }
 
@@ -431,6 +432,7 @@
 // caller must free the returned buffer from ConvertUtf8ToMultiByte()
 // with delete[]
 WCHAR* ConvertUtf8ToMultiByte(const char* pName);
+char*  ConvertUtf8ToConsole  (const char* pString);
 
 //
 // MessageId: MSG_ERR_EXIST


From boxbackup-dev@fluffy.co.uk  Sat Feb  4 23:04:15 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat,  4 Feb 2006 23:04:15 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r383 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060204230415.D3A1294@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-04 23:04:15 +0000 (Sat, 04 Feb 2006)
New Revision: 383

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Fixed output formatting
- Convert UTF-8 to console format instead of using wprintf(), which is borked


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-04 23:03:31 UTC (rev 382)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-04 23:04:15 UTC (rev 383)
@@ -337,13 +337,12 @@
 		{
 			char* pMsg = "Directory '%s' not found on store\n";
 #ifdef WIN32
-			WCHAR* pMsgBuffer  = ConvertUtf8ToMultiByte(pMsg);
-			WCHAR* pNameBuffer = ConvertUtf8ToMultiByte(args[0].c_str());
-			wprintf(pMsgBuffer, pNameBuffer);
+			char* pNameBuffer = ConvertUtf8ToConsole(
+				args[0].c_str());
+			printf(pMsg, pNameBuffer);
 			delete [] pNameBuffer;
-			delete [] pMsgBuffer;
 #else
-			printf(msg, args[0].c_str());
+			printf(pMsg, args[0].c_str());
 #endif
 			return;
 		}
@@ -435,7 +434,9 @@
 		if(opts[LIST_OPTION_TIMES])
 		{
 			// Show times...
-			printf("%s ", BoxTimeToISO8601String(en->GetModificationTime()));
+			std::string time = BoxTimeToISO8601String(
+				en->GetModificationTime());
+			printf("%s ", time.c_str());
 		}
 		
 		if(opts[LIST_OPTION_DISPLAY_HASH])
@@ -460,12 +461,10 @@
 		if(!FirstLevel)
 		{
 #ifdef WIN32
-			pMsgBuffer  = ConvertUtf8ToMultiByte("%s");
-			pNameBuffer = ConvertUtf8ToMultiByte(rListRoot);
-			wprintf(pMsgBuffer, pNameBuffer);
+			char* pNameBuffer = ConvertUtf8ToConsole(
+				rListRoot.c_str());
+			printf("%s/", pNameBuffer);
 			delete [] pNameBuffer;
-			delete [] pMsgBuffer;
-			printf("/");
 #else
 			printf("%s/", rListRoot.c_str());
 #endif
@@ -473,12 +472,10 @@
 		
 #ifdef WIN32
 		{
-			pMsgBuffer  = ConvertUtf8ToMultiByte("%s");
-			pNameBuffer = ConvertUtf8ToMultiByte(
+			char* pNameBuffer = ConvertUtf8ToConsole(
 				clear.GetClearFilename().c_str());
-			wprintf(pMsgBuffer, pNameBuffer);
+			printf("%s", pNameBuffer);
 			delete [] pNameBuffer;
-			delete [] pMsgBuffer;
 		}
 #else
 		printf("%s", clear.GetClearFilename().c_str());
@@ -488,6 +485,8 @@
 		{
 			printf("[FILENAME NOT ENCRYPTED]");
 		}
+
+		printf("\n");
 		
 		// Directory?
 		if((en->GetFlags() & BackupStoreDirectory::Entry::Flags_Dir) != 0)


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 00:02:07 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun,  5 Feb 2006 00:02:07 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r384 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060205000207.2CB9A94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-05 00:02:03 +0000 (Sun, 05 Feb 2006)
New Revision: 384

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Fixed some other cases where UTF-8 encoded names should be converted to
  console encoding, and vice versa
- Some cases still remain, particularly in the compare and probably restore
  functions


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-04 23:04:15 UTC (rev 383)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-05 00:02:03 UTC (rev 384)
@@ -253,7 +253,15 @@
 		{
 			// Simple implementation, so do it here
 			std::string dir(GetCurrentDirectoryName());
-			printf("%s (%08llx)\n", dir.c_str(), GetCurrentDirectoryID());
+#ifdef WIN32
+			char* pEncoded = ConvertUtf8ToConsole(dir.c_str());
+			printf("%s (%08llx)\n", pEncoded, 
+				(long long)GetCurrentDirectoryID());
+			delete [] pEncoded;
+#else
+			printf("%s (%08llx)\n", dir.c_str(), 
+				(long long)GetCurrentDirectoryID());
+#endif
 		}
 		break;
 
@@ -332,18 +340,17 @@
 	if(args.size() > 0)
 	{
 		// Attempt to find the directory
+#ifdef WIN32
+		char* pBuffer = ConvertConsoleToUtf8(args[0].c_str());
+		rootDir = FindDirectoryObjectID(pBuffer, opts[LIST_OPTION_ALLOWOLD], opts[LIST_OPTION_ALLOWDELETED]);
+		delete [] pBuffer;
+#else
 		rootDir = FindDirectoryObjectID(args[0], opts[LIST_OPTION_ALLOWOLD], opts[LIST_OPTION_ALLOWDELETED]);
+#endif
 		if(rootDir == 0)
 		{
-			char* pMsg = "Directory '%s' not found on store\n";
-#ifdef WIN32
-			char* pNameBuffer = ConvertUtf8ToConsole(
+			printf("Directory '%s' not found on store\n",
 				args[0].c_str());
-			printf(pMsg, pNameBuffer);
-			delete [] pNameBuffer;
-#else
-			printf(pMsg, args[0].c_str());
-#endif
 			return;
 		}
 	}
@@ -585,7 +592,14 @@
 
 				// Then... find the directory within it
 				BackupStoreDirectory::Iterator i(dir);
+#ifdef WIN32
+				char* pBuffer = ConvertConsoleToUtf8(
+					dirElements[e].c_str());
+				BackupStoreFilenameClear dirname(pBuffer);
+				delete [] pBuffer;
+#else
 				BackupStoreFilenameClear dirname(dirElements[e]);
+#endif
 				BackupStoreDirectory::Entry *en = i.FindMatchingClearName(dirname);
 				if(en == 0)
 				{
@@ -653,7 +667,14 @@
 	for(unsigned int l = 0; l < mDirStack.size(); ++l)
 	{
 		r += "/";
+#ifdef WIN32
+		char* pBuffer = ConvertUtf8ToConsole(
+			mDirStack[l].first.c_str());
+		r += pBuffer;
+		delete [] pBuffer;
+#else
 		r += mDirStack[l].first;
+#endif
 	}
 	
 	return r;
@@ -850,7 +871,13 @@
 		{				
 			// Specified by name, find the object in the directory to get the ID
 			BackupStoreDirectory::Iterator i(dir);
+#ifdef WIN32
+			char* pBuffer = ConvertConsoleToUtf8(args[0].c_str());
+			BackupStoreFilenameClear fn(pBuffer);
+			delete [] pBuffer;
+#else
 			BackupStoreFilenameClear fn(args[0]);
+#endif
 			BackupStoreDirectory::Entry *en = i.FindMatchingClearName(fn);
 			
 			if(en == 0)
@@ -892,7 +919,7 @@
 	}
 	catch(...)
 	{
-		::unlink(args[1].c_str());
+		::unlink(localName.c_str());
 		printf("Error occured fetching file.\n");
 	}
 }
@@ -986,7 +1013,7 @@
 		}
 		else
 		{
-			printf("Warning: couldn't determine the time of the last syncronisation -- checks not performed.\n");
+			printf("Warning: couldn't determine the time of the last synchronisation -- checks not performed.\n");
 		}
 	}
 


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 00:03:14 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun,  5 Feb 2006 00:03:14 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r385 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060205000314.B392894@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-05 00:03:10 +0000 (Sun, 05 Feb 2006)
New Revision: 385

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.h
- Removed ConvertUtf8ToMultiByte() prototype, since it's no longer used
  outside of emu.cpp
- Added ConvertConsoleToUtf8() prototype


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-05 00:02:03 UTC (rev 384)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-05 00:03:10 UTC (rev 385)
@@ -429,10 +429,9 @@
 int poll (struct pollfd *ufds, unsigned long nfds, int timeout);
 bool EnableBackupRights( void );
 
-// caller must free the returned buffer from ConvertUtf8ToMultiByte()
-// with delete[]
-WCHAR* ConvertUtf8ToMultiByte(const char* pName);
-char*  ConvertUtf8ToConsole  (const char* pString);
+// caller must free the returned buffer with delete[]
+char* ConvertUtf8ToConsole(const char* pString);
+char* ConvertConsoleToUtf8(const char* pString);
 
 //
 // MessageId: MSG_ERR_EXIST


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 00:04:34 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun,  5 Feb 2006 00:04:34 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r386 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060205000434.0695C94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-05 00:04:30 +0000 (Sun, 05 Feb 2006)
New Revision: 386

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
Log:
* emu.cpp
- Refactored code page conversion routines to be more general and reduce
  duplicated code
- Added ConvertConsoleToUtf8 method, used by BackupQueries to parse
  input file names


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-05 00:03:10 UTC (rev 385)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-05 00:04:30 UTC (rev 386)
@@ -206,141 +206,206 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    ConvertUtf8ToMultiByte
-//		Purpose: Converts a string from UTF-8 to multibyte characters (MBCS).
-//			Returns a buffer which MUST be freed by the caller with delete[].
-//			In case of fire, logs the error and returns NULL.
+//		Name:    ConvertToWideString
+//		Purpose: Converts a string from specified codepage to 
+//			 a wide string (WCHAR*). Returns a buffer which 
+//			 MUST be freed by the caller with delete[].
+//			 In case of fire, logs the error and returns NULL.
 //		Created: 4th February 2006
 //
 // --------------------------------------------------------------------------
-WCHAR* ConvertUtf8ToMultiByte(const char* pName)
+WCHAR* ConvertToWideString(const char* pString, unsigned int codepage)
 {
-	int len = MultiByteToWideChar(
-		CP_UTF8,       // source code page
-		0,             // character-type options
-		pName,         // string to map
-		strlen(pName), // number of bytes in string
-		NULL,          // wide-character buffer
-		0              // size of buffer - work out 
-		               //   how much space we need
-		);
+	int len = MultiByteToWideChar
+	(
+		codepage, // source code page
+		0,        // character-type options
+		pString,  // string to map
+		-1,       // number of bytes in string - auto detect
+		NULL,     // wide-character buffer
+		0         // size of buffer - work out 
+		          //   how much space we need
+	);
 
-	WCHAR* buffer = new WCHAR[len+1];
+	if (len == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert string to wide string: "
+			"error %d", GetLastError());
+		errno = EINVAL;
+		return NULL;
+	}
 
+	WCHAR* buffer = new WCHAR[len];
+
 	if (buffer == NULL)
 	{
 		::syslog(LOG_WARNING, 
-			"Failed to convert string to multibyte: '%s': "
-			"out of memory", pName);
+			"Failed to convert string to wide string: "
+			"out of memory");
 		errno = ENOMEM;
 		return NULL;
 	}
 
-	len = MultiByteToWideChar(
-		CP_UTF8,       // source code page
-		0,             // character-type options
-		pName,         // string to map
-		strlen(pName), // number of bytes in string
-		buffer,        // wide-character buffer
-		len         // size of buffer
-		);
+	len = MultiByteToWideChar
+	(
+		codepage, // source code page
+		0,        // character-type options
+		pString,  // string to map
+		-1,       // number of bytes in string - auto detect
+		buffer,   // wide-character buffer
+		len       // size of buffer
+	);
 
 	if (len == 0)
 	{
 		::syslog(LOG_WARNING, 
-			"Failed to convert string to multibyte: '%s': "
-			"error %i", pName, GetLastError());
+			"Failed to convert string to wide string: "
+			"error %i", GetLastError());
 		errno = EACCES;
 		delete [] buffer;
 		return NULL;
 	}
 
-	buffer[len] = L'\0';
-
 	return buffer;
 }
 
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    ConvertUtf8ToConsole
-//		Purpose: Converts a string from UTF-8 to the console 
-//			 code page. Returns a buffer which MUST be freed 
-//			 by the caller with delete[].
+//		Name:    ConvertUtf8ToWideString
+//		Purpose: Converts a string from UTF-8 to a wide string.
+//			 Returns a buffer which MUST be freed by the caller 
+//			 with delete[].
 //			 In case of fire, logs the error and returns NULL.
 //		Created: 4th February 2006
 //
 // --------------------------------------------------------------------------
-char* ConvertUtf8ToConsole(const char* pString)
+WCHAR* ConvertUtf8ToWideString(const char* pString)
 {
-	WCHAR* pMulti = ConvertUtf8ToMultiByte(pString);
-	if (pMulti == NULL)
-	{
-		return NULL;
-	}
+	return ConvertToWideString(pString, CP_UTF8);
+}
 
-	int len = WideCharToMultiByte(
-		GetConsoleCP(), // destination code page
-		0,              // character-type options
-		pMulti,         // string to map
-		-1,             // number of bytes in string - auto detect
-		NULL,           // output buffer
-		0,              // size of buffer - work out 
-		                //   how much space we need
-		"?",		// replace unknown chars with "?"
-		NULL		// don't tell us when that happened
-		);
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertFromWideString
+//		Purpose: Converts a wide string to a narrow string in the
+//			 specified code page. Returns a buffer which MUST 
+//			 be freed by the caller with delete[].
+//			 In case of fire, logs the error and returns NULL.
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+char* ConvertFromWideString(const WCHAR* pString, unsigned int codepage)
+{
+	int len = WideCharToMultiByte
+	(
+		codepage, // destination code page
+		0,        // character-type options
+		pString,  // string to map
+		-1,       // number of bytes in string - auto detect
+		NULL,     // output buffer
+		0,        // size of buffer - work out 
+		          //   how much space we need
+		"?",      // replace unknown chars with "?"
+		NULL      // don't tell us when that happened
+	);
 
 	if (len == 0)
 	{
 		::syslog(LOG_WARNING, 
-			"Failed to convert UTF-8 string to console: '%s': "
-			"error %d", pString, GetLastError());
-		delete [] pMulti;
+			"Failed to convert wide string to narrow: "
+			"error %d", GetLastError());
 		errno = EINVAL;
 		return NULL;
 	}
 
-	char* buffer = new char[len+1];
+	char* buffer = new char[len];
 
 	if (buffer == NULL)
 	{
 		::syslog(LOG_WARNING, 
-			"Failed to convert UTF-8 string to console: '%s': "
-			"out of memory", pString);
-		delete [] pMulti;
+			"Failed to convert wide string to narrow: "
+			"out of memory");
 		errno = ENOMEM;
 		return NULL;
 	}
 
-	len = WideCharToMultiByte(
-		GetConsoleCP(), // source code page
-		0,              // character-type options
-		pMulti,         // string to map
-		-1,             // number of bytes in string - auto detect
-		buffer,         // output buffer
-		len,            // size of buffer
-		"?",		// replace unknown chars with "?"
-		NULL		// don't tell us when that happened
-		);
+	len = WideCharToMultiByte
+	(
+		codepage, // source code page
+		0,        // character-type options
+		pString,  // string to map
+		-1,       // number of bytes in string - auto detect
+		buffer,   // output buffer
+		len,      // size of buffer
+		"?",      // replace unknown chars with "?"
+		NULL      // don't tell us when that happened
+	);
 
 	if (len == 0)
 	{
 		::syslog(LOG_WARNING, 
-			"Failed to convert UTF-8 string to console: '%s': "
-			"error %i", pString, GetLastError());
-		delete [] pMulti;
+			"Failed to convert wide string to narrow: "
+			"error %i", GetLastError());
 		errno = EACCES;
 		delete [] buffer;
 		return NULL;
 	}
 
-	buffer[len] = L'\0';
+	return buffer;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertUtf8ToConsole
+//		Purpose: Converts a string from UTF-8 to the console 
+//			 code page. Returns a buffer which MUST be freed 
+//			 by the caller with delete[].
+//			 In case of fire, logs the error and returns NULL.
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+char* ConvertUtf8ToConsole(const char* pString)
+{
+	WCHAR* pMulti = ConvertToWideString(pString, CP_UTF8);
+	if (pMulti == NULL)
+	{
+		return NULL;
+	}
+
+	char* pConsole = ConvertFromWideString(pMulti, GetConsoleOutputCP());
 	delete [] pMulti;
+	return pConsole;
+}
 
-	return buffer;
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertConsoleToUtf8
+//		Purpose: Converts a string from the console code page
+//			 to UTF-8. Returns a buffer which MUST be freed 
+//			 by the caller with delete[].
+//			 In case of fire, logs the error and returns NULL.
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+char* ConvertConsoleToUtf8(const char* pString)
+{
+	WCHAR* pMulti = ConvertToWideString(pString, GetConsoleCP());
+	if (pMulti == NULL)
+	{
+		return NULL;
+	}
+
+	char* pConsole = ConvertFromWideString(pMulti, CP_UTF8);
+	delete [] pMulti;
+	return pConsole;
 }
 
+
 // --------------------------------------------------------------------------
 //
 // Function
@@ -402,12 +467,12 @@
 		return NULL;
 	}
 	
-	WCHAR* pBuffer = ConvertUtf8ToMultiByte(AbsPathWithUnicode.c_str());
+	WCHAR* pBuffer = ConvertUtf8ToWideString(AbsPathWithUnicode.c_str());
 	// We are responsible for freeing pBuffer
 	
 	if (pBuffer == NULL)
 	{
-		// error already logged by ConvertUtf8ToMultiByte()
+		// error already logged by ConvertUtf8ToWideString()
 		return NULL;
 	}
 
@@ -568,12 +633,12 @@
 		return NULL;
 	}
 	
-	WCHAR* pBuffer = ConvertUtf8ToMultiByte(AbsPathWithUnicode.c_str());
+	WCHAR* pBuffer = ConvertUtf8ToWideString(AbsPathWithUnicode.c_str());
 	// We are responsible for freeing pBuffer
 	
 	if (pBuffer == NULL)
 	{
-		// error already logged by ConvertUtf8ToMultiByte()
+		// error already logged by ConvertUtf8ToWideString()
 		return NULL;
 	}
 
@@ -735,7 +800,7 @@
 		return NULL;
 	}
 
-	pDir->name = ConvertUtf8ToMultiByte(dirName.c_str());
+	pDir->name = ConvertUtf8ToWideString(dirName.c_str());
 	// We are responsible for freeing dir->name
 	
 	if (pDir->name == NULL)


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 00:21:44 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun,  5 Feb 2006 00:21:44 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r387 - box/chris/win32/releases
Message-ID: <20060205002144.E584794@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-05 00:12:00 +0000 (Sun, 05 Feb 2006)
New Revision: 387

Added:
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.tgz
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.zip
Log:
* boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.zip
* boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.tgz
- Added a new release candidiate, with hopefully better support for
  international characters in filenames in bbackupquery.exe


Added: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.tgz
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.tgz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 17:29:27 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 5 Feb 2006 17:29:27 +0000
Subject: [Box Backup-dev] Re: [Box Backup] Danish and other special chars
In-Reply-To: <20060204191427.83035.qmail@web36704.mail.mud.yahoo.com>
References: <20060204191427.83035.qmail@web36704.mail.mud.yahoo.com>
Message-ID: <6EA7254E-E517-4EDF-BD5A-6DAD14F4FDFE@fluffy.co.uk>

On 4 Feb 2006, at 19:14, Gary wrote:

>> an array of bytes. The encoding used to store international  
>> characters in
>> these byte arrays is probably system-dependent. I believe that
>
> Well, so for things to work properly, the backup client o/s has to  
> be the same as restore client
> o/s. No cross-platform restores.

I don't think this is correct. Cross platform restores are allowed,  
and should work. There might be issues with character set encodings,  
but apart from that, it's portable. Even endian issues are carefully  
taken into account.

We should keep on supporting cross-platform restores.


>
>> Since when is MBCS ready for printf? I thought printf() could only  
>> take an
>> ASCII byte array? Perhaps there is a unicode equivalent like  
>> _wprintf that
>> we can use on Windows?
>
> According to documentation for VS2K5, _tprintf evalues to printf  
> for both SBCS and MBCS, and to
> wprintf for UNICODE.
>
> The question now is whether printf, having taken MBCS, properly  
> outputs the (special) double-byte
> sequences.

These platforms issues should be isolated in the client -- as I note  
Chris is doing.

Internally, I think standardising on UTF-8 is the way to go. It seems  
to be the approach taken by the major OS vendors for POSIX access to  
filing systems, and is sensible.

Ben





From boxbackup-dev@fluffy.co.uk  Sun Feb  5 18:00:02 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 5 Feb 2006 18:00:02 +0000
Subject: [Box Backup-dev] COMMIT r384 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
In-Reply-To: <20060205000207.2CB9A94@s0g0.pems.testserver.co.uk>
References: <20060205000207.2CB9A94@s0g0.pems.testserver.co.uk>
Message-ID: <185BB652-854A-4F7A-B3D2-3B61DF1B50B9@fluffy.co.uk>

On 5 Feb 2006, at 00:02, subversion@fluffy.co.uk wrote:

>
> +			char* pEncoded = ConvertUtf8ToConsole(dir.c_str());

Coding standards ask that capitalised first letters (apart from p or  
r prefixes) imply arguments to functions. Use lowercase for local  
vars. So this should be pencoded.

I think it helps readability, but maybe others disagree. Not a big  
issue.

Ben





From boxbackup-dev@fluffy.co.uk  Sun Feb  5 18:03:33 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 5 Feb 2006 18:03:33 +0000
Subject: [Box Backup-dev] COMMIT r348 - in box/chris/bb-save-state: . bin/bbackupd lib/common lib/server
In-Reply-To: <Pine.LNX.4.62.0602041706240.14656@top.qwarx.com>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk> <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk> <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com> <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk> <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com> <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk> <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com> <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk> <Pine.LNX.4.62.0602041706240.14656@top.qwarx.com>
Message-ID: <65C2DD6D-62F1-4861-950A-80D472854BD8@fluffy.co.uk>

On 4 Feb 2006, at 17:08, Chris Wilson wrote:

> Hi Ben,
>
> On Mon, 30 Jan 2006, Ben Summers wrote:
>
>>> >  And are some windows changes still pending?
>>>  Yes, including updated project files for VS2005 as you pointed  
>>> out  (vc2005-compile-fixes). But I'm not too bothered if they  
>>> don't make it  into 0.10.
>>
>> If they're there, why not? What's the diff to be merged?
>
> svn diff http://bbdev.fluffy.co.uk/svn/box/trunk \
> 	http://bbdev.fluffy.co.uk/svn/box/chris/win32/vc2005-compile-fixes

I'm not sure that's quite right, as that diff will remove stuff from  
trunk. Which trunk revision was vc2005-compile-fixes copied from?

This does get a bit confusing.

>
>> I can believe it. ACLs are complex things, so the API is going to  
>> be tricky, I suppose. But then you want nice defaults which don't  
>> cause problems for developers, don't you?
>
> Or at least good sample code, under a permissive license :-) If  
> Microsoft wants to improve their security reputation, it should be  
> a high priority for them to make it as easy as possible - and  
> secure by default.

Ah well.

Ben





From boxbackup-dev@fluffy.co.uk  Sun Feb  5 18:47:13 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 5 Feb 2006 10:47:13 -0800 (PST)
Subject: [Box Backup-dev] Re: [Box Backup] Danish and other special chars
In-Reply-To: <6EA7254E-E517-4EDF-BD5A-6DAD14F4FDFE@fluffy.co.uk>
Message-ID: <20060205184713.80679.qmail@web36713.mail.mud.yahoo.com>

> We should keep on supporting cross-platform restores.

Most definitely.

> Internally, I think standardising on UTF-8 is the way to go. It seems  
> to be the approach taken by the major OS vendors for POSIX access to  
> filing systems, and is sensible.

True, unless a client can predict what encoding has been used by [any other possible] client
platform, things will break. Establishing a standard seems the only way to do this.

> These platforms issues should be isolated in the client -- as I note  
> Chris is doing.

Then all clients should be converting whatever their "native" character set to UTF-8 before
sending up to the server.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Sun Feb  5 19:43:58 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 5 Feb 2006 19:43:58 +0000 (GMT)
Subject: [Box Backup-dev] Win32 dist, bb-save-state merged, MSVC files?
 (was: COMMIT r348 - in box/chris/bb-save-state: . bin/bbackupd lib/common
 lib/server)
In-Reply-To: <F5ACB299-5E3D-437C-9549-21092860A213@fluffy.co.uk>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk>
 <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk>
 <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com>
 <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk>
 <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com>
 <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk>
 <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com>
 <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk>
 <1138652704.6319.9.camel@avenin.ebourne.me.uk> <9506006B-3EE4-4625-A694-D17E1F29445E@fluffy.co.uk>
 <Pine.LNX.4.62.0602022242310.14656@top.qwarx.com>
 <F5ACB299-5E3D-437C-9549-21092860A213@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602051943040.14656@top.qwarx.com>

Hi Ben,

On Fri, 3 Feb 2006, Ben Summers wrote:

> On a related note, is this relevant and in the right place?
>
>  http://bbdev.fluffy.co.uk/svn/box/trunk/bin/bbackupd/win32/
>
> I can't think of a totally convincing place for it, but contrib and 
> infrastructure seem better to me.

OK, I will move them to contrib/win32 and see what happens.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 19:48:13 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 5 Feb 2006 19:48:13 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r384 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
In-Reply-To: <185BB652-854A-4F7A-B3D2-3B61DF1B50B9@fluffy.co.uk>
References: <20060205000207.2CB9A94@s0g0.pems.testserver.co.uk>
 <185BB652-854A-4F7A-B3D2-3B61DF1B50B9@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602051947470.14656@top.qwarx.com>

Hi Ben,

>> 
>>  +			char* pEncoded = ConvertUtf8ToConsole(dir.c_str());
>
> Coding standards ask that capitalised first letters (apart from p or r 
> prefixes) imply arguments to functions. Use lowercase for local vars. So this 
> should be pencoded.
>
> I think it helps readability, but maybe others disagree. Not a big issue.

OK, I didn't know that, I will try to stick to it in future.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 19:49:34 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 5 Feb 2006 19:49:34 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r348 - in box/chris/bb-save-state: .
 bin/bbackupd lib/common lib/server
In-Reply-To: <65C2DD6D-62F1-4861-950A-80D472854BD8@fluffy.co.uk>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk>
 <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk>
 <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com>
 <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk>
 <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com>
 <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk>
 <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com>
 <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk>
 <Pine.LNX.4.62.0602041706240.14656@top.qwarx.com>
 <65C2DD6D-62F1-4861-950A-80D472854BD8@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602051948320.14656@top.qwarx.com>

Hi Ben,

On Sun, 5 Feb 2006, Ben Summers wrote:

>>  svn diff http://bbdev.fluffy.co.uk/svn/box/trunk \
>>   http://bbdev.fluffy.co.uk/svn/box/chris/win32/vc2005-compile-fixes
>
> I'm not sure that's quite right, as that diff will remove stuff from trunk. 
> Which trunk revision was vc2005-compile-fixes copied from?

I did deliberately merge all changes from the trunk into this branch, to 
resolve any conflicts myself and reduce work for others. So it should be 
good to go as it is.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 20:06:38 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 5 Feb 2006 20:06:38 +0000
Subject: [Box Backup-dev] COMMIT r348 - in box/chris/bb-save-state: . bin/bbackupd lib/common lib/server
In-Reply-To: <Pine.LNX.4.62.0602051948320.14656@top.qwarx.com>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk> <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk> <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com> <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk> <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com> <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk> <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com> <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk> <Pine.LNX.4.62.0602041706240.14656@top.qwarx.com> <65C2DD6D-62F1-4861-950A-80D472854BD8@fluffy.co.uk> <Pine.LNX.4.62.0602051948320.14656@top.qwarx.com>
Message-ID: <0207F3F2-8580-4BAC-A1AA-647C934E5CAC@fluffy.co.uk>

On 5 Feb 2006, at 19:49, Chris Wilson wrote:

> Hi Ben,
>
> On Sun, 5 Feb 2006, Ben Summers wrote:
>
>>>  svn diff http://bbdev.fluffy.co.uk/svn/box/trunk \
>>>   http://bbdev.fluffy.co.uk/svn/box/chris/win32/vc2005-compile-fixes
>>
>> I'm not sure that's quite right, as that diff will remove stuff  
>> from trunk. Which trunk revision was vc2005-compile-fixes copied  
>> from?
>
> I did deliberately merge all changes from the trunk into this  
> branch, to resolve any conflicts myself and reduce work for others.  
> So it should be good to go as it is.

Oh, sorry.

I don't think there is much to object to here, most of it is Win32  
stuff anyway.

lib/server/Daemon.cpp
	- we could syslog errors on non-Win32 platforms too. And indeed have  
a "both stderr and syslog" wrapper, it seems to be a common thing.

bin/bbackupquery/BackupQueries.cpp
	- we'll have to make that generic at some point

Finally, why have you changed const_iterator to iterator?


When you move the Win32 build files to contrib, remember to add it to  
the manifest file!

Thanks.

Ben




From boxbackup-dev@fluffy.co.uk  Sun Feb  5 20:15:53 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 5 Feb 2006 20:15:53 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r348 - in box/chris/bb-save-state: .
 bin/bbackupd lib/common lib/server
In-Reply-To: <0207F3F2-8580-4BAC-A1AA-647C934E5CAC@fluffy.co.uk>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk>
 <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk>
 <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com>
 <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk>
 <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com>
 <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk>
 <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com>
 <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk>
 <Pine.LNX.4.62.0602041706240.14656@top.qwarx.com>
 <65C2DD6D-62F1-4861-950A-80D472854BD8@fluffy.co.uk>
 <Pine.LNX.4.62.0602051948320.14656@top.qwarx.com>
 <0207F3F2-8580-4BAC-A1AA-647C934E5CAC@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602052014570.14656@top.qwarx.com>

Hi Ben,

On Sun, 5 Feb 2006, Ben Summers wrote:

> Finally, why have you changed const_iterator to iterator?

VS2005 won't compile with these as const_iterators - it seems to think 
that it needs to modify the iterated-over item.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 20:19:05 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 5 Feb 2006 20:19:05 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r348 - in box/chris/bb-save-state: .
 bin/bbackupd lib/common lib/server
In-Reply-To: <0207F3F2-8580-4BAC-A1AA-647C934E5CAC@fluffy.co.uk>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk>
 <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk>
 <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com>
 <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk>
 <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com>
 <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk>
 <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com>
 <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk>
 <Pine.LNX.4.62.0602041706240.14656@top.qwarx.com>
 <65C2DD6D-62F1-4861-950A-80D472854BD8@fluffy.co.uk>
 <Pine.LNX.4.62.0602051948320.14656@top.qwarx.com>
 <0207F3F2-8580-4BAC-A1AA-647C934E5CAC@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602052017180.14656@top.qwarx.com>

Hi Ben,

> bin/bbackupquery/BackupQueries.cpp
> 	- we'll have to make that generic at some point

I actually don't think it's necessary on other platforms. The problem is 
that Nick's emulated functions work with filenames in UTF-8, which seems 
reasonable, but the win32 console cannot display UTF-8. I would expect 
that on other platforms, especially unix ones, the console is at least 
capable of rendering file names in whatever encoding they are stored in.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 20:44:54 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 5 Feb 2006 20:44:54 +0000
Subject: [Box Backup-dev] COMMIT r348 - in box/chris/bb-save-state: . bin/bbackupd lib/common lib/server
In-Reply-To: <Pine.LNX.4.62.0602052017180.14656@top.qwarx.com>
References: <20060129195905.1609094@s0g0.pems.testserver.co.uk> <4AAB2E48-D1B8-40C7-AE00-52AF245C879A@fluffy.co.uk> <Pine.LNX.4.62.0601292214280.14656@top.qwarx.com> <D523C76E-4258-4C6E-B21C-149A2FE6FB66@fluffy.co.uk> <Pine.LNX.4.62.0601292230110.14656@top.qwarx.com> <983D9441-FE58-442C-9C29-80B69E74D825@fluffy.co.uk> <20060130130515.qwmqzb580owo48go@ebourne.me.uk> <Pine.LNX.4.62.0601301907510.14656@top.qwarx.com> <EDC63378-7FD0-46EC-9363-608D6B95C4AF@fluffy.co.uk> <Pine.LNX.4.62.0602041706240.14656@top.qwarx.com> <65C2DD6D-62F1-4861-950A-80D472854BD8@fluffy.co.uk> <Pine.LNX.4.62.0602051948320.14656@top.qwarx.com> <0207F3F2-8580-4BAC-A1AA-647C934E5CAC@fluffy.co.uk> <Pine.LNX.4.62.0602052017180.14656@top.qwarx.com>
Message-ID: <0CF81E15-5597-483A-AA9D-B0D0A4B3CE43@fluffy.co.uk>

On 5 Feb 2006, at 20:19, Chris Wilson wrote:

> Hi Ben,
>
>> bin/bbackupquery/BackupQueries.cpp
>> 	- we'll have to make that generic at some point
>
> I actually don't think it's necessary on other platforms. The  
> problem is that Nick's emulated functions work with filenames in  
> UTF-8, which seems reasonable, but the win32 console cannot display  
> UTF-8. I would expect that on other platforms, especially unix  
> ones, the console is at least capable of rendering file names in  
> whatever encoding they are stored in.

OK. Certainly true for the platforms I use, let's assume it's only  
Win32 which is rubbish for now.


>> Finally, why have you changed const_iterator to iterator?
>>
>
> VS2005 won't compile with these as const_iterators - it seems to  
> think that it needs to modify the iterated-over item.

Interesting. How about a #define const_iterator iterator in  
BoxPlatform.h for MSVC instead? It'd be nice to keep them as they  
have value.

Ben



From boxbackup-dev@fluffy.co.uk  Sun Feb  5 23:04:23 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun,  5 Feb 2006 23:04:23 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r388 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060205230423.0439194@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-05 23:04:21 +0000 (Sun, 05 Feb 2006)
New Revision: 388

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
Log:
* emu.cpp
- Fixed parameters for converting strings from wide to narrow
- Renamed ourstat and ourfstat to emu_stat and emu_fstat
- Added emulated chdir, getcwd, mkdir and unlink, that work with UTF-8 names


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-05 00:12:00 UTC (rev 387)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-05 23:04:21 UTC (rev 388)
@@ -308,7 +308,7 @@
 		NULL,     // output buffer
 		0,        // size of buffer - work out 
 		          //   how much space we need
-		"?",      // replace unknown chars with "?"
+		NULL,     // replace unknown chars with system default
 		NULL      // don't tell us when that happened
 	);
 
@@ -340,7 +340,7 @@
 		-1,       // number of bytes in string - auto detect
 		buffer,   // output buffer
 		len,      // size of buffer
-		"?",      // replace unknown chars with "?"
+		NULL,     // replace unknown chars with system default
 		NULL      // don't tell us when that happened
 	);
 
@@ -538,18 +538,18 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    ourfstat
+//		Name:    emu_fstat
 //		Purpose: replacement for fstat supply a windows handle
 //		Created: 25th October 2004
 //
 // --------------------------------------------------------------------------
-int ourfstat(HANDLE hdir, struct stat * st)
+int emu_fstat(HANDLE hdir, struct stat * st)
 {
 	ULARGE_INTEGER conv;
 
 	if (hdir == INVALID_HANDLE_VALUE)
 	{
-		::syslog(LOG_ERR, "Error: invalid file handle in ourfstat()");
+		::syslog(LOG_ERR, "Error: invalid file handle in emu_fstat()");
 		errno = EBADF;
 		return -1;
 	}
@@ -691,13 +691,13 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    ourstat 
+//		Name:    emu_stat 
 //		Purpose: replacement for the lstat and stat functions, 
 //			works with unicode filenames supplied in utf8 format
 //		Created: 25th October 2004
 //
 // --------------------------------------------------------------------------
-int ourstat(const char * pName, struct stat * st)
+int emu_stat(const char * pName, struct stat * st)
 {
 	// at the mo
 	st->st_uid = 0;
@@ -712,7 +712,7 @@
 		return -1;
 	}
 
-	int retVal = ourfstat(handle, st);
+	int retVal = emu_fstat(handle, st);
 	if (retVal != 0)
 	{
 		// error logged, but without filename
@@ -1050,4 +1050,99 @@
 	printf("%s\r\n", buffer);
 }
 
+int emu_chdir(const char* pDirName)
+{
+	WCHAR* pBuffer = ConvertUtf8ToWideString(pDirName);
+	if (!pBuffer) return -1;
+	int result = SetCurrentDirectoryW(pBuffer);
+	delete [] pBuffer;
+	if (result != 0) return 0;
+	errno = EACCES;
+	return -1;
+}
+
+char* emu_getcwd(char* pBuffer, int BufSize)
+{
+	DWORD len = GetCurrentDirectoryW(0, NULL);
+	if (len == 0)
+	{
+		errno = EINVAL;
+		return NULL;
+	}
+
+	if (len > BufSize)
+	{
+		errno = ENAMETOOLONG;
+		return NULL;
+	}
+
+	WCHAR* pWide = new WCHAR [len];
+	if (!pWide)
+	{
+		errno = ENOMEM;
+		return NULL;
+	}
+
+	DWORD result = GetCurrentDirectoryW(len, pWide);
+	if (result <= 0 || result >= len)
+	{
+		errno = EACCES;
+		return NULL;
+	}
+
+	char* pUtf8 = ConvertFromWideString(pWide, CP_UTF8);
+	delete [] pWide;
+
+	if (!pUtf8)
+	{
+		return NULL;
+	}
+
+	strncpy(pBuffer, pUtf8, BufSize - 1);
+	pBuffer[BufSize - 1] = 0;
+	delete [] pUtf8;
+
+	return pBuffer;
+}
+
+int emu_mkdir(const char* pPathName)
+{
+	WCHAR* pBuffer = ConvertToWideString(pPathName, CP_UTF8);
+	if (!pBuffer)
+	{
+		return -1;
+	}
+
+	BOOL result = CreateDirectoryW(pBuffer, NULL);
+	delete [] pBuffer;
+
+	if (!result)
+	{
+		errno = EACCES;
+		return -1;
+	}
+
+	return 0;
+}
+
+int emu_unlink(const char* pFileName)
+{
+	WCHAR* pBuffer = ConvertToWideString(pFileName, CP_UTF8);
+	if (!pBuffer)
+	{
+		return -1;
+	}
+
+	BOOL result = DeleteFileW(pBuffer);
+	delete [] pBuffer;
+
+	if (!result)
+	{
+		errno = EACCES;
+		return -1;
+	}
+
+	return 0;
+}
+
 #endif // WIN32


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 23:08:17 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun,  5 Feb 2006 23:08:17 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r389 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060205230817.3EAB194@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-05 23:08:16 +0000 (Sun, 05 Feb 2006)
New Revision: 389

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.h
- Removed some commented-out lines
- Replaced #defined chdir, mkdir, getcwd, unlink, stat, lstat and fstat 
  with inlined calls to our emulated versions
- Renamed _chmod to chmod to properly replace the system-supplied version
- Improved code formatting slightly


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-05 23:04:21 UTC (rev 388)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-05 23:08:16 UTC (rev 389)
@@ -3,7 +3,6 @@
 #if ! defined EMU_INCLUDE && defined WIN32
 #define EMU_INCLUDE
 
-// #define _STAT_DEFINED
 #define _INO_T_DEFINED
 
 #include <winsock2.h>
@@ -17,9 +16,6 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <time.h>
-//#include <winsock.h>
-//#include <sys/types.h>
-//#include <sys/stat.h>
 
 #include <string>
 
@@ -37,12 +33,7 @@
 #define read(fd,buf,count)    _read(fd,buf,count)
 #define write(fd,buf,count)   _write(fd,buf,count)
 #define lseek(fd,off,whence)  _lseek(fd,off,whence)
-#define unlink(file)          _unlink(file)
-#define chmod(file,mode)      _chmod(file,mode)
-#define ::chmod(file,mode)    _chmod(file,mode)
-#define getcwd(buf,length)    _getcwd(buf,length)
 #define fileno(struct_file)   _fileno(struct_file)
-#define chdir(dir)            _chdir(dir)
 #endif
 
 int SetTimerHandler(void (__cdecl *func ) (int));
@@ -122,12 +113,33 @@
 	return 0;
 }
 
-inline int _chmod(const char * Filename, int mode)
+inline int chmod(const char * Filename, int mode)
 {
 	// indicate success
 	return 0;
 }
 
+int emu_chdir(const char* pDirName);
+
+inline int chdir(const char* pDirName)
+{
+	return emu_chdir(pDirName);
+}
+
+char* emu_getcwd(char* pBuffer, int BufSize);
+
+inline char* getcwd(char* pBuffer, int BufSize)
+{
+	return emu_getcwd(pBuffer, BufSize);
+}
+
+int emu_unlink(const char* pFileName);
+
+inline int unlink(const char* pFileName)
+{
+	return emu_unlink(pFileName);
+}
+
 //I do not perceive a need to change the user or group on a backup client
 //at any rate the owner of a service can be set in the service settings
 inline int setegid(int)
@@ -162,55 +174,56 @@
 // MinGW provides a getopt implementation
 #ifndef __MINGW32__
 
-//this will need to be implimented if we see fit that command line
-//options are going to be used! (probably then:)
-//where the calling function looks for the parsed parameter
+// this will need to be implemented if we see fit that command line
+// options are going to be used! (probably then:)
+// where the calling function looks for the parsed parameter
 extern char *optarg;
-//optind looks like an index into the string - how far we have moved along
+
+// optind looks like an index into the string - how far we have moved along
 extern int optind;
 extern char nextchar;
 
 inline int getopt(int count, char * const * args, char * tolookfor)
 {
-	if ( optind >= count ) return -1;
+	if (optind >= count) return -1;
 
 	std::string str((const char *)args[optind]);
 	std::string interestin(tolookfor);
 	int opttolookfor = 0;
 	int index = -1;
-	//just initialize the string - just in case it is used.
-	//optarg[0] = 0;
+	// just initialize the string - just in case it is used.
+	// optarg[0] = 0;
 	std::string opt;
 
-	if ( count == 0 ) return -1;
+	if (count == 0) return -1;
 
 	do 
 	{
-		if ( index != -1 )
+		if (index != -1)
 		{
 			str = str.substr(index+1, str.size());
 		}
 
 		index = (int)str.find('-');
 
-		if ( index == -1 ) return -1;
+		if (index == -1) return -1;
 
 		opt = str[1];
 
 		optind ++;
 		str = args[optind];
 	}
-	while ( ( opttolookfor = (int)interestin.find(opt)) == -1 );
+	while ((opttolookfor = (int)interestin.find(opt)) == -1);
 
-	if ( interestin[opttolookfor+1] == ':' ) 
+	if (interestin[opttolookfor+1] == ':') 
 	{
 
-		//strcpy(optarg, str.c_str());
+		// strcpy(optarg, str.c_str());
 		optarg = args[optind];
 		optind ++;
 	}
 
-	//indicate we have finished
+	// indicate we have finished
 	return opt[0];
 }
 #endif // !__MINGW32__
@@ -257,20 +270,17 @@
 
 #define S_ISLNK(x) ( false )
 
-// nasty implementation to get working - TODO get the win32 equiv
-//#ifdef _DEBUG
-//#define getpid() 1
-//#endif
-
 #define vsnprintf _vsnprintf
 
 #ifndef __MINGW32__
 typedef unsigned int mode_t;
 #endif
 
-inline int mkdir(const char *pathname, mode_t mode)
+int emu_mkdir(const char* pPathName);
+
+inline int mkdir(const char *pPathName, mode_t mode)
 {
-	return _mkdir(pathname);
+	return emu_mkdir(pPathName);
 }
 
 #ifndef __MINGW32__
@@ -395,8 +405,8 @@
 #endif
 #endif
 
-int ourstat(const char * name, struct stat * st);
-int ourfstat(HANDLE file, struct stat * st);
+int emu_stat(const char * name, struct stat * st);
+int emu_fstat(HANDLE file, struct stat * st);
 int statfs(const char * name, struct statfs * s);
 
 //need this for converstions
@@ -422,17 +432,29 @@
 	return retVal;
 }
 
-#define stat(x,y) ourstat(x,y)
-#define fstat(x,y) ourfstat(x,y)
-#define lstat(x,y) ourstat(x,y)
+inline int stat(const char* filename, struct stat* stat)
+{
+	return emu_stat(filename, stat);
+}
+inline int lstat(const char* filename, struct stat* stat)
+{
+	return emu_stat(filename, stat);
+}
+inline int fstat(HANDLE handle, struct stat* stat)
+{
+	return emu_fstat(handle, stat);
+}
 
-int poll (struct pollfd *ufds, unsigned long nfds, int timeout);
+int poll(struct pollfd *ufds, unsigned long nfds, int timeout);
 bool EnableBackupRights( void );
 
 // caller must free the returned buffer with delete[]
 char* ConvertUtf8ToConsole(const char* pString);
 char* ConvertConsoleToUtf8(const char* pString);
 
+// std::string ConvertUtf8ToConsoleString(const std::string& rUtf8String);
+// std::string ConvertConsoleToUtf8String(const std::string& rConsoleString);
+
 //
 // MessageId: MSG_ERR_EXIST
 // MessageText:


From boxbackup-dev@fluffy.co.uk  Sun Feb  5 23:28:49 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun,  5 Feb 2006 23:28:49 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r390 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060205232849.53CE394@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-05 23:28:46 +0000 (Sun, 05 Feb 2006)
New Revision: 390

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Fixed more issues with file names containing special characters. Most things
  seem to work now - restore, compare, cd, ls, lcd, pwd
- FindDirectoryObjectID now takes a filename in UTF-8 encoding on Win32,
  rather than console encoding
- FindDirectoryObjectID always uses '/' to delimit file names, instead of
  the platform separator, for consistency


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-05 23:08:16 UTC (rev 389)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-05 23:28:46 UTC (rev 390)
@@ -252,16 +252,9 @@
 	case COMMAND_pwd:
 		{
 			// Simple implementation, so do it here
-			std::string dir(GetCurrentDirectoryName());
-#ifdef WIN32
-			char* pEncoded = ConvertUtf8ToConsole(dir.c_str());
-			printf("%s (%08llx)\n", pEncoded, 
+			printf("%s (%08llx)\n", 
+				GetCurrentDirectoryName().c_str(), 
 				(long long)GetCurrentDirectoryID());
-			delete [] pEncoded;
-#else
-			printf("%s (%08llx)\n", dir.c_str(), 
-				(long long)GetCurrentDirectoryID());
-#endif
 		}
 		break;
 
@@ -339,14 +332,20 @@
 	// Got a directory in the arguments?
 	if(args.size() > 0)
 	{
-		// Attempt to find the directory
 #ifdef WIN32
-		char* pBuffer = ConvertConsoleToUtf8(args[0].c_str());
-		rootDir = FindDirectoryObjectID(pBuffer, opts[LIST_OPTION_ALLOWOLD], opts[LIST_OPTION_ALLOWDELETED]);
-		delete [] pBuffer;
+		char* buffer = ConvertConsoleToUtf8(args[0].c_str());
+		if(!buffer) return;
+		std::string storeDirEncoded(buffer);
+		delete [] buffer;
 #else
-		rootDir = FindDirectoryObjectID(args[0], opts[LIST_OPTION_ALLOWOLD], opts[LIST_OPTION_ALLOWDELETED]);
+		const std::string& storeDirEncoded(rStoreDir);
 #endif
+	
+		// Attempt to find the directory
+		rootDir = FindDirectoryObjectID(storeDirEncoded, 
+			opts[LIST_OPTION_ALLOWOLD], 
+			opts[LIST_OPTION_ALLOWDELETED]);
+
 		if(rootDir == 0)
 		{
 			printf("Directory '%s' not found on store\n",
@@ -468,10 +467,11 @@
 		if(!FirstLevel)
 		{
 #ifdef WIN32
-			char* pNameBuffer = ConvertUtf8ToConsole(
+			char* buffer = ConvertUtf8ToConsole(
 				rListRoot.c_str());
-			printf("%s/", pNameBuffer);
-			delete [] pNameBuffer;
+			if(!buffer) return;
+			printf("%s/", buffer);
+			delete [] buffer;
 #else
 			printf("%s/", rListRoot.c_str());
 #endif
@@ -479,10 +479,11 @@
 		
 #ifdef WIN32
 		{
-			char* pNameBuffer = ConvertUtf8ToConsole(
+			char* buffer = ConvertUtf8ToConsole(
 				clear.GetClearFilename().c_str());
-			printf("%s", pNameBuffer);
-			delete [] pNameBuffer;
+			if(!buffer) return;
+			printf("%s", buffer);
+			delete [] buffer;
 		}
 #else
 		printf("%s", clear.GetClearFilename().c_str());
@@ -526,7 +527,7 @@
 {
 	// Split up string into elements
 	std::vector<std::string> dirElements;
-	SplitString(rDirName, DIRECTORY_SEPARATOR_ASCHAR, dirElements);
+	SplitString(rDirName, '/', dirElements);
 
 	// Start from current stack, or root, whichever is required
 	std::vector<std::pair<std::string, int64_t> > stack;
@@ -592,14 +593,7 @@
 
 				// Then... find the directory within it
 				BackupStoreDirectory::Iterator i(dir);
-#ifdef WIN32
-				char* pBuffer = ConvertConsoleToUtf8(
-					dirElements[e].c_str());
-				BackupStoreFilenameClear dirname(pBuffer);
-				delete [] pBuffer;
-#else
 				BackupStoreFilenameClear dirname(dirElements[e]);
-#endif
 				BackupStoreDirectory::Entry *en = i.FindMatchingClearName(dirname);
 				if(en == 0)
 				{
@@ -668,10 +662,11 @@
 	{
 		r += "/";
 #ifdef WIN32
-		char* pBuffer = ConvertUtf8ToConsole(
+		char* buffer = ConvertUtf8ToConsole(
 			mDirStack[l].first.c_str());
-		r += pBuffer;
-		delete [] pBuffer;
+		if(!buffer) return "unknown";
+		r += buffer;
+		delete [] buffer;
 #else
 		r += mDirStack[l].first;
 #endif
@@ -696,9 +691,19 @@
 		printf("Incorrect usage.\ncd [-o] [-d] <directory>\n");
 		return;
 	}
+
+#ifdef WIN32
+	char* buffer = ConvertConsoleToUtf8(args[0].c_str());
+	if(!buffer) return;
+	std::string dirName(buffer);
+	delete [] buffer;
+#else
+	std::string& dirName(args[0]);
+#endif
 	
 	std::vector<std::pair<std::string, int64_t> > newStack;
-	int64_t id = FindDirectoryObjectID(args[0], opts['o'], opts['d'], &newStack);
+	int64_t id = FindDirectoryObjectID(dirName, opts['o'], opts['d'], 
+		&newStack);
 	
 	if(id == 0)
 	{
@@ -728,7 +733,15 @@
 	}
 	
 	// Try changing directory
-	if(::chdir(args[0].c_str()) != 0)
+#ifdef WIN32
+	char* buffer = ConvertConsoleToUtf8(args[0].c_str());
+	if(!buffer) return;
+	int result = ::chdir(buffer);
+	delete [] buffer;
+#else
+	int result = ::chdir(args[0].c_str());
+#endif
+	if(result != 0)
 	{
 		printf((errno == ENOENT || errno == ENOTDIR)?"Directory '%s' does not exist\n":"Error changing dir to '%s'\n",
 			args[0].c_str());
@@ -742,8 +755,15 @@
 		printf("Error getting current directory\n");
 		return;
 	}
-	
+
+#ifdef WIN32
+	buffer = ConvertUtf8ToConsole(wd);
+	if(!buffer) return;
+	printf("Local current directory is now '%s'\n", buffer);
+	delete [] buffer;
+#else
 	printf("Local current directory is now '%s'\n", wd);
+#endif
 }
 
 
@@ -872,9 +892,10 @@
 			// Specified by name, find the object in the directory to get the ID
 			BackupStoreDirectory::Iterator i(dir);
 #ifdef WIN32
-			char* pBuffer = ConvertConsoleToUtf8(args[0].c_str());
-			BackupStoreFilenameClear fn(pBuffer);
-			delete [] pBuffer;
+			char* buffer = ConvertConsoleToUtf8(args[0].c_str());
+			if(!buffer) return;
+			BackupStoreFilenameClear fn(buffer);
+			delete [] buffer;
 #else
 			BackupStoreFilenameClear fn(args[0]);
 #endif
@@ -1125,32 +1146,76 @@
 // --------------------------------------------------------------------------
 void BackupQueries::Compare(const std::string &rStoreDir, const std::string &rLocalDir, BackupQueries::CompareParams &rParams)
 {
+#ifdef WIN32
+	char* buffer = ConvertConsoleToUtf8(rStoreDir.c_str());
+	if(!buffer) return;
+	std::string storeDirEncoded(buffer);
+	delete [] buffer;
+#else
+	const std::string& storeDirEncoded(rStoreDir);
+#endif
+	
 	// Get the directory ID of the directory -- only use current data
-	int64_t dirID = FindDirectoryObjectID(rStoreDir);
+	int64_t dirID = FindDirectoryObjectID(storeDirEncoded);
 	
 	// Found?
 	if(dirID == 0)
 	{
-		printf("Local directory '%s' exists, but server directory '%s' does not exist\n", rLocalDir.c_str(), rStoreDir.c_str());		
+		printf("Local directory '%s' exists, but "
+			"server directory '%s' does not exist\n", 
+			rLocalDir.c_str(), rStoreDir.c_str());		
 		rParams.mDifferences ++;
 		return;
 	}
+
+#ifdef WIN32
+	buffer = ConvertConsoleToUtf8(rLocalDir.c_str());
+	if(!buffer) return;
+	std::string localDirEncoded(buffer);
+	delete [] buffer;
+#else
+	std::string localDirEncoded(rLocalDir);
+#endif
 	
 	// Go!
-	Compare(dirID, rStoreDir, rLocalDir, rParams);
+	Compare(dirID, storeDirEncoded, localDirEncoded, rParams);
 }
 
 
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    BackupQueries::Compare(int64_t, const std::string &, BackupQueries::CompareParams &)
+//		Name:    BackupQueries::Compare(int64_t, const std::string &,
+//			 const std::string &, BackupQueries::CompareParams &)
 //		Purpose: Compare a store directory against a local directory
 //		Created: 2003/10/13
 //
 // --------------------------------------------------------------------------
 void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir, const std::string &rLocalDir, BackupQueries::CompareParams &rParams)
 {
+#ifdef WIN32
+	// By this point, rStoreDir and rLocalDir should be in UTF-8 encoding
+
+	char* localNamePtr = ConvertUtf8ToConsole(rLocalDir.c_str());
+	char* storeNamePtr = ConvertUtf8ToConsole(rStoreDir.c_str());
+
+	if (!localNamePtr || !storeNamePtr)
+	{
+		if (localNamePtr) delete [] localNamePtr;
+		if (storeNamePtr) delete [] storeNamePtr;
+		return;
+	}
+
+	std::string localName(localNamePtr);
+	std::string storeName(storeNamePtr);
+
+	delete [] localNamePtr;
+	delete [] storeNamePtr;
+#else
+	const std::string& localName(rLocalDir);
+	const std::string& storeName(rStoreDir);
+#endif
+
 	// Get info on the local directory
 	struct stat st;
 	if(::lstat(rLocalDir.c_str(), &st) != 0)
@@ -1158,16 +1223,21 @@
 		// What kind of error?
 		if(errno == ENOTDIR)
 		{
-			printf("Local object '%s' is a file, server object '%s' is a directory\n", rLocalDir.c_str(), rStoreDir.c_str());
+			printf("Local object '%s' is a file, "
+				"server object '%s' is a directory\n", 
+				localName.c_str(), storeName.c_str());
 			rParams.mDifferences ++;
 		}
 		else if(errno == ENOENT)
 		{
-			printf("Local directory '%s' does not exist (compared to server directory '%s')\n", rLocalDir.c_str(), rStoreDir.c_str());
+			printf("Local directory '%s' does not exist "
+				"(compared to server directory '%s')\n",
+				localName.c_str(), storeName.c_str());
 		}
 		else
 		{
-			printf("ERROR: stat on local dir '%s'\n", rLocalDir.c_str());
+			printf("ERROR: stat on local dir '%s'\n", 
+				localName.c_str());
 		}
 		return;
 	}
@@ -1187,7 +1257,8 @@
 	// Test out the attributes
 	if(!dir.HasAttributes())
 	{
-		printf("Store directory '%s' doesn't have attributes.\n", rStoreDir.c_str());
+		printf("Store directory '%s' doesn't have attributes.\n", 
+			storeName.c_str());
 	}
 	else
 	{
@@ -1197,12 +1268,14 @@
 
 		// Get attributes of local directory
 		BackupClientFileAttributes localAttr;
-		localAttr.ReadAttributes(rLocalDir.c_str(), true /* directories have zero mod times */);
+		localAttr.ReadAttributes(rLocalDir.c_str(), 
+			true /* directories have zero mod times */);
 
 		if(!(attr.Compare(localAttr, true, true /* ignore modification times */)))
 		{
-			printf("Local directory '%s' has different attributes to store directory '%s'.\n",
-				rLocalDir.c_str(), rStoreDir.c_str());
+			printf("Local directory '%s' has different attributes "
+				"to store directory '%s'.\n",
+				localName.c_str(), storeName.c_str());
 			rParams.mDifferences ++;
 		}
 	}
@@ -1211,7 +1284,7 @@
 	DIR *dirhandle = ::opendir(rLocalDir.c_str());
 	if(dirhandle == 0)
 	{
-		printf("ERROR: opendir on local dir '%s'\n", rLocalDir.c_str());
+		printf("ERROR: opendir on local dir '%s'\n", localName.c_str());
 		return;
 	}
 	try
@@ -1268,7 +1341,8 @@
 		// Close directory
 		if(::closedir(dirhandle) != 0)
 		{
-			printf("ERROR: closedir on local dir '%s'\n", rLocalDir.c_str());
+			printf("ERROR: closedir on local dir '%s'\n", 
+				localName.c_str());
 		}
 		dirhandle = 0;
 	
@@ -1304,8 +1378,10 @@
 			if(local == localFiles.end())
 			{
 				// Not found -- report
-				printf("Local file '%s/%s' does not exist, but store file '%s/%s' does.\n",
-					rLocalDir.c_str(), i->first.c_str(), rStoreDir.c_str(), i->first.c_str());
+				printf("Local file '%s/%s' does not exist, "
+					"but store file '%s/%s' does.\n",
+					localName.c_str(), i->first.c_str(), 
+					storeName.c_str(), i->first.c_str());
 				rParams.mDifferences ++;
 			}
 			else
@@ -1372,7 +1448,7 @@
 								fileOnServerStream->IsSymLink() /* ignore modification time if it's a symlink */))
 						{
 							printf("Local file '%s/%s' has different attributes to store file '%s/%s'.\n",
-								rLocalDir.c_str(), i->first.c_str(), rStoreDir.c_str(), i->first.c_str());						
+								localName.c_str(), i->first.c_str(), storeName.c_str(), i->first.c_str());						
 							rParams.mDifferences ++;
 							if(modifiedAfterLastSync)
 							{
@@ -1437,7 +1513,7 @@
 					if(!equal)
 					{
 						printf("Local file '%s/%s' has different contents to store file '%s/%s'.\n",
-							rLocalDir.c_str(), i->first.c_str(), rStoreDir.c_str(), i->first.c_str());
+							localName.c_str(), i->first.c_str(), storeName.c_str(), i->first.c_str());
 						rParams.mDifferences ++;
 						if(modifiedAfterLastSync)
 						{
@@ -1455,11 +1531,12 @@
 					printf("ERROR: (%d/%d) during file fetch and comparsion for '%s/%s'\n",
 						e.GetType(),
 						e.GetSubType(),
-						rStoreDir.c_str(), i->first.c_str());
+						storeName.c_str(), 
+						i->first.c_str());
 				}
 				catch(...)
 				{
-					printf("ERROR: (unknown) during file fetch and comparsion for '%s/%s'\n", rStoreDir.c_str(), i->first.c_str());
+					printf("ERROR: (unknown) during file fetch and comparsion for '%s/%s'\n", storeName.c_str(), i->first.c_str());
 				}
 
 				// Remove from set so that we know it's been compared
@@ -1470,18 +1547,22 @@
 		// Report any files which exist on the locally, but not on the store
 		for(std::set<std::string>::iterator i = localFiles.begin(); i != localFiles.end(); ++i)
 		{
-			std::string localName(rLocalDir + DIRECTORY_SEPARATOR + *i);
+			std::string localFileName(rLocalDir + 
+				DIRECTORY_SEPARATOR + *i);
 			// Should this be ignored (ie is excluded)?
-			if(rParams.mpExcludeFiles == 0 || !(rParams.mpExcludeFiles->IsExcluded(localName)))
+			if(rParams.mpExcludeFiles == 0 || 
+				!(rParams.mpExcludeFiles->IsExcluded(localFileName)))
 			{
-				printf("Local file '%s/%s' exists, but store file '%s/%s' does not exist.\n",
-					rLocalDir.c_str(), (*i).c_str(), rStoreDir.c_str(), (*i).c_str());
+				printf("Local file '%s/%s' exists, but "
+					"store file '%s/%s' does not exist.\n",
+					localName.c_str(), (*i).c_str(), 
+					storeName.c_str(), (*i).c_str());
 				rParams.mDifferences ++;
 				
 				// Check the file modification time
 				{
 					struct stat st;
-					if(::stat(localName.c_str(), &st) == 0)
+					if(::stat(localFileName.c_str(), &st) == 0)
 					{
 						if(FileModificationTime(st) > rParams.mLatestFileUploadTime)
 						{
@@ -1509,8 +1590,10 @@
 			if(local == localDirs.end())
 			{
 				// Not found -- report
-				printf("Local directory '%s/%s' does not exist, but store directory '%s/%s' does.\n",
-					rLocalDir.c_str(), i->first.c_str(), rStoreDir.c_str(), i->first.c_str());
+				printf("Local directory '%s/%s' does not exist, "
+					"but store directory '%s/%s' does.\n",
+					localName.c_str(), i->first.c_str(), 
+					storeName.c_str(), i->first.c_str());
 				rParams.mDifferences ++;
 			}
 			else
@@ -1530,8 +1613,10 @@
 			// Should this be ignored (ie is excluded)?
 			if(rParams.mpExcludeDirs == 0 || !(rParams.mpExcludeDirs->IsExcluded(localName)))
 			{
-				printf("Local directory '%s/%s' exists, but store directory '%s/%s' does not exist.\n",
-					rLocalDir.c_str(), (*i).c_str(), rStoreDir.c_str(), (*i).c_str());
+				printf("Local directory '%s/%s' exists, but "
+					"store directory '%s/%s' does not exist.\n",
+					localName.c_str(), (*i).c_str(), 
+					storeName.c_str(), (*i).c_str());
 				rParams.mDifferences ++;
 			}
 			else
@@ -1585,14 +1670,25 @@
 	}
 	else
 	{
+#ifdef WIN32
+		char* buffer = ConvertConsoleToUtf8(args[0].c_str());
+		if(!buffer) return;
+		std::string storeDirEncoded(buffer);
+		delete [] buffer;
+#else
+		const std::string& storeDirEncoded(args[0]);
+#endif
+	
 		// Look up directory ID
-		dirID = FindDirectoryObjectID(args[0], false /* no old versions */, restoreDeleted /* find deleted dirs */);
+		dirID = FindDirectoryObjectID(storeDirEncoded, 
+			false /* no old versions */, 
+			restoreDeleted /* find deleted dirs */);
 	}
 	
 	// Allowable?
 	if(dirID == 0)
 	{
-		printf("Directory %s not found on server\n", args[0].c_str());
+		printf("Directory '%s' not found on server\n", args[0].c_str());
 		return;
 	}
 	if(dirID == BackupProtocolClientListDirectory::RootDirectory)
@@ -1601,9 +1697,20 @@
 		return;
 	}
 	
+#ifdef WIN32
+	char* buffer = ConvertConsoleToUtf8(args[1].c_str());
+	if(!buffer) return;
+	std::string localName(buffer);
+	delete [] buffer;
+#else
+	std::string localName(args[1]);
+#endif
+
 	// Go and restore...
-	switch(BackupClientRestore(mrConnection, dirID, args[1].c_str(), true /* print progress dots */, restoreDeleted, 
-		false /* don't undelete after restore! */, opts['r'] /* resume? */))
+	switch(BackupClientRestore(mrConnection, dirID, localName.c_str(), 
+		true /* print progress dots */, restoreDeleted, 
+		false /* don't undelete after restore! */, 
+		opts['r'] /* resume? */))
 	{
 	case Restore_Complete:
 		printf("Restore complete\n");
@@ -1742,18 +1849,28 @@
 		return;
 	}
 
+#ifdef WIN32
+	char* buffer = ConvertConsoleToUtf8(args[0].c_str());
+	if(!buffer) return;
+	std::string storeDirEncoded(buffer);
+	delete [] buffer;
+#else
+	const std::string& storeDirEncoded(rStoreDir);
+#endif
+	
 	// Get directory ID
-	int64_t dirID = FindDirectoryObjectID(args[0], false /* no old versions */, true /* find deleted dirs */);
+	int64_t dirID = FindDirectoryObjectID(storeDirEncoded, 
+		false /* no old versions */, true /* find deleted dirs */);
 	
 	// Allowable?
 	if(dirID == 0)
 	{
-		printf("Directory %s not found on server\n", args[0].c_str());
+		printf("Directory '%s' not found on server\n", args[0].c_str());
 		return;
 	}
 	if(dirID == BackupProtocolClientListDirectory::RootDirectory)
 	{
-		printf("Cannot restore the root directory -- restore locations individually.\n");
+		printf("Cannot undelete the root directory.\n");
 		return;
 	}
 


From boxbackup-dev@fluffy.co.uk  Mon Feb  6 00:01:21 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon,  6 Feb 2006 00:01:21 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r391 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060206000121.C36B894@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-06 00:01:20 +0000 (Mon, 06 Feb 2006)
New Revision: 391

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
Log:
* BackupClientContext.cpp
- Minor compile fix to ensure that we don't try to use SIGVTALRM on Win32


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-05 23:28:46 UTC (rev 390)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-06 00:01:20 UTC (rev 391)
@@ -511,7 +511,7 @@
 
 #ifdef PLATFORM_CYGWIN
 	::signal(SIGALRM, TimerSigHandler);
-#elif WIN32
+#elif defined WIN32
 	// no support for SIGVTALRM
 	SetTimerHandler(TimerSigHandler);
 #else


From boxbackup-dev@fluffy.co.uk  Mon Feb  6 00:14:08 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon,  6 Feb 2006 00:14:08 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r392 - box/chris/win32/releases
Message-ID: <20060206001408.BD0E994@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-06 00:09:12 +0000 (Mon, 06 Feb 2006)
New Revision: 392

Added:
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r390-backup-client-mingw32.zip
Removed:
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.tgz
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.tgz
Log:
* boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.tgz
* boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.tgz
- Deleted the tgz files as probably nobody uses them on windows

* boxbackup-0.09_plus2_vc2005fix_r390-backup-client-mingw32.zip
- New release candidate, with more international character fixes in
  bbackupquery


Deleted: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r379-backup-client-mingw32.tgz
===================================================================
(Binary files differ)

Deleted: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r386-backup-client-mingw32.tgz
===================================================================
(Binary files differ)

Added: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r390-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r390-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Mon Feb  6 04:00:07 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 5 Feb 2006 20:00:07 -0800 (PST)
Subject: [Box Backup-dev] Re: [Box Backup] Danish and other special chars
In-Reply-To: <Pine.LNX.4.62.0602060020180.14656@top.qwarx.com>
Message-ID: <20060206040007.39207.qmail@web36714.mail.mud.yahoo.com>

[http://bbdev.fluffy.co.uk/svn/box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r390-backup-client-mingw32.zip]

bbackupquery seems to work fine this time around, although I did not backup/restore/query any
non-English character set files/folders, due to the following error in bbackupd right after remote
store connect:

Exception caught (Common RegexNotSupportedOnThisPlatform (Your platform does not have built in
regular expression libraries.) 1/30), reset state and waiting to retry....

I thought Nick had fixed this one for 0.9 Win32 client.

Gary

P.S.

Switched this thread to -dev, yet again :).


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Mon Feb  6 09:27:35 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 6 Feb 2006 09:27:35 +0000 (GMT)
Subject: [Box Backup-dev] Re: [Box Backup] Danish and other special chars
In-Reply-To: <20060206040007.39207.qmail@web36714.mail.mud.yahoo.com>
References: <20060206040007.39207.qmail@web36714.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602060926260.14656@top.qwarx.com>

Hi Gary,

> Exception caught (Common RegexNotSupportedOnThisPlatform (Your platform 
> does not have built in regular expression libraries.) 1/30), reset state 
> and waiting to retry....
>
> I thought Nick had fixed this one for 0.9 Win32 client.

No, we had to take out Boost because it was too big. I need to install the 
regex libraries on my build platform so that we can distribute a 
precompiled client with regex support.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb  6 15:32:58 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Mon, 6 Feb 2006 07:32:58 -0800 (PST)
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
Message-ID: <20060206153258.86777.qmail@web36712.mail.mud.yahoo.com>

I just tried to take the new boxbackup-0.09_plus2 for a spin, but ran into two problems:

1.) Configure is very slow, sometimes takes 10 seconds to make a single check (25 minutes for an
incomplete run).

2.) Configure bombs out with the following error:

---

checking for sys/mnttab.h... no
checking for sys/mount.h... yes
checking for struct statfs.f_mntonname... no
checking for struct mntent.mnt_dir... no
checking for struct mnttab.mnt_mountp... no
configure: error: cannot work out how to discover mount points on your platform

---

Are we dropping Cygwin support? If that is the case, regex support in native Win32 would be a
must, since otherwise bbackupd.exe is not usable...

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Mon Feb  6 22:44:45 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 06 Feb 2006 22:44:45 +0000
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <20060206153258.86777.qmail@web36712.mail.mud.yahoo.com>
References: <20060206153258.86777.qmail@web36712.mail.mud.yahoo.com>
Message-ID: <1139265885.5666.10.camel@localhost>

Hi all,

On Mon, 2006-02-06 at 07:32 -0800, Gary wrote:
> I just tried to take the new boxbackup-0.09_plus2 for a spin, but ran
> into two problems:
> 
> 1.) Configure is very slow, sometimes takes 10 seconds to make a
> single check (25 minutes for an incomplete run).

I didn't get that - configure runs OK for me. What kind of system are
you running it on? Is your cygwin up to date?

> 2.) Configure bombs out with the following error:
> checking for sys/mnttab.h... no
> checking for sys/mount.h... yes
> checking for struct statfs.f_mntonname... no
> checking for struct mntent.mnt_dir... no
> checking for struct mnttab.mnt_mountp... no
> configure: error: cannot work out how to discover mount points on your platform

With a fair amount of hacking, I was able to get Box trunk to compile on
Cygwin, but it doesn't work. When bbackupd tries to connect to the
store, it fails with the following error:

> Exception caught (Connection Protocol_ObjTooBig 7/42), reset state and
> waiting to retry...

Anyone have any ideas about this?

> Are we dropping Cygwin support? If that is the case, regex support in
> native Win32 would be a must, since otherwise bbackupd.exe is not
> usable...

As far as I know, there was no explicit intention to drop Cygwin
support, but I guess nobody has tested it since we autoconfiscated Box.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb  6 22:59:25 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Mon, 6 Feb 2006 14:59:25 -0800 (PST)
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <1139265885.5666.10.camel@localhost>
Message-ID: <20060206225925.87053.qmail@web36706.mail.mud.yahoo.com>

> > 1.) Configure is very slow, sometimes takes 10 seconds to make a
> > single check (25 minutes for an incomplete run).
> 
> I didn't get that - configure runs OK for me. What kind of system are
> you running it on? Is your cygwin up to date?

A pretty high-end Pentium system, Cygwin is up to date. I will re-install it, to see if it helps.

> As far as I know, there was no explicit intention to drop Cygwin
> support, but I guess nobody has tested it since we autoconfiscated Box.

Hmmmm, things are getting complicated with the 0.10 (or should it rather be: 0.9 >> 1.0?) release.
It's either Cygwin (untested), or Win32 native (no regex). For Win32 native, it's Cygwin anyway
(to build), but no Cygwin to run.

I would be happy to test/debug, but there does not seem to be a functional 10.0 for Win32
around...

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Tue Feb  7 09:38:26 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 7 Feb 2006 09:38:26 +0000 (GMT)
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <20060206225925.87053.qmail@web36706.mail.mud.yahoo.com>
References: <20060206225925.87053.qmail@web36706.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602070936140.14656@top.qwarx.com>

Hi Gary,

>> I didn't get that - configure runs OK for me. What kind of system are 
>> you running it on? Is your cygwin up to date?
>
> A pretty high-end Pentium system, Cygwin is up to date. I will 
> re-install it, to see if it helps.

I'm running it in vmware on a P4 laptop with 192 MB RAM. Not blazingly 
fast, but not 10 seconds per check either, more like 1-2.

> Hmmmm, things are getting complicated with the 0.10 (or should it rather 
> be: 0.9 >> 1.0?) release. It's either Cygwin (untested), or Win32 native 
> (no regex). For Win32 native, it's Cygwin anyway (to build), but no 
> Cygwin to run.

Cygwin is NOT required to build - you can use MSVC. And regexes are 
supported if you have the libraries - it's just that I don't have them 
installed for native builds yet (it's not easy).

> I would be happy to test/debug, but there does not seem to be a 
> functional 10.0 for Win32 around...

Please could you help to fix Cygwin? I'll check in my updated tree to 
Subversion this evening, which at least allows it to build.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:02:11 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:02:11 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r393 - box/chris/win32
Message-ID: <20060207110211.EF79194@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:02:07 +0000 (Tue, 07 Feb 2006)
New Revision: 393

Added:
   box/chris/win32/cygwin-compile-fixes/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/cygwin-compile-fixes
- Created a branch for Cygwin compile fixes


Copied: box/chris/win32/cygwin-compile-fixes (from rev 392, box/trunk)


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:04:10 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:04:10 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r394 - box/chris/win32/cygwin-compile-fixes/lib/common
Message-ID: <20060207110410.D249294@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:04:05 +0000 (Tue, 07 Feb 2006)
New Revision: 394

Modified:
   box/chris/win32/cygwin-compile-fixes/lib/common/BoxPlatform.h
Log:
* BoxPlatform.h
- Interception impossible on Cygwin as well
- Include emu.h on Cygwin


Modified: box/chris/win32/cygwin-compile-fixes/lib/common/BoxPlatform.h
===================================================================
--- box/chris/win32/cygwin-compile-fixes/lib/common/BoxPlatform.h	2006-02-07 11:02:07 UTC (rev 393)
+++ box/chris/win32/cygwin-compile-fixes/lib/common/BoxPlatform.h	2006-02-07 11:04:05 UTC (rev 394)
@@ -46,6 +46,10 @@
 	#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
 #endif
 
+#ifdef __CYGWIN__
+	#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
+#endif
+
 // Find out if credentials on UNIX sockets can be obtained
 #ifndef HAVE_GETPEEREID
 	#if !HAVE_DECL_SO_PEERCRED
@@ -140,7 +144,7 @@
 	typedef ino_t InodeRefType;
 #endif
 
-#ifdef WIN32
+#if defined WIN32 || defined __CYGWIN__
 	#define WIN32_LEAN_AND_MEAN
 	#include "emu.h"
 #endif


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:04:28 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:04:28 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r395 - box/chris/win32/cygwin-compile-fixes/bin/bbackupquery
Message-ID: <20060207110428.A456694@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:04:26 +0000 (Tue, 07 Feb 2006)
New Revision: 395

Modified:
   box/chris/win32/cygwin-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Fixed printf warning


Modified: box/chris/win32/cygwin-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/cygwin-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-07 11:04:05 UTC (rev 394)
+++ box/chris/win32/cygwin-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-07 11:04:26 UTC (rev 395)
@@ -1669,8 +1669,8 @@
 	}
 	bar[b] = '\0';
 
-	// Print the entryj
-	::printf("%14s %10.1fMb %3d%% %s\n", Name, mb, (int32_t)percent, bar);
+	// Print the entry
+	::printf("%14s %10.1fMb %3d%% %s\n", Name, mb, (int)percent, bar);
 }
 
 


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:05:05 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:05:05 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r396 - box/chris/win32/cygwin-compile-fixes/bin/bbackupd
Message-ID: <20060207110505.C941D94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:05:03 +0000 (Tue, 07 Feb 2006)
New Revision: 396

Modified:
   box/chris/win32/cygwin-compile-fixes/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- Fixed resolving mount points on Cygwin


Modified: box/chris/win32/cygwin-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/cygwin-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-07 11:04:26 UTC (rev 395)
+++ box/chris/win32/cygwin-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-07 11:05:03 UTC (rev 396)
@@ -1292,7 +1292,8 @@
 			// Do a fsstat on the pathname to find out which mount it's on
 			{
 
-#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32
+#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32 \
+	|| defined __CYGWIN__
 
 				// BSD style statfs -- includes mount point, which is nice.
 				struct statfs s;


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:41:45 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:41:45 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r397 - box/chris/win32/cygwin-compile-fixes
Message-ID: <20060207114145.938A794@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:41:42 +0000 (Tue, 07 Feb 2006)
New Revision: 397

Modified:
   box/chris/win32/cygwin-compile-fixes/parcels.txt
Log:
* parcels.txt
- 'CYGWIN' platform should now be in lower case


Modified: box/chris/win32/cygwin-compile-fixes/parcels.txt
===================================================================
--- box/chris/win32/cygwin-compile-fixes/parcels.txt	2006-02-07 11:05:03 UTC (rev 396)
+++ box/chris/win32/cygwin-compile-fixes/parcels.txt	2006-02-07 11:41:42 UTC (rev 397)
@@ -18,7 +18,7 @@
 END-ONLY
 
 OMIT:mingw32
-OMIT:CYGWIN
+OMIT:cygwin
 
 backup-server
 	bin bbstored


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:42:53 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:42:53 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r398 - box/chris/win32/cygwin-compile-fixes/lib/win32
Message-ID: <20060207114253.DE04994@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:42:50 +0000 (Tue, 07 Feb 2006)
New Revision: 398

Modified:
   box/chris/win32/cygwin-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/cygwin-compile-fixes/lib/win32/emu.h
Log:
* emu.cpp, emu.h
- Enable some emulations on Cygwin


Modified: box/chris/win32/cygwin-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/cygwin-compile-fixes/lib/win32/emu.cpp	2006-02-07 11:41:42 UTC (rev 397)
+++ box/chris/win32/cygwin-compile-fixes/lib/win32/emu.cpp	2006-02-07 11:42:50 UTC (rev 398)
@@ -5,16 +5,24 @@
 
 #include "Box.h"
 
+#if defined WIN32 || defined __CYGWIN__
+	#include <windows.h>
+	#ifdef __CYGWIN__
+		#undef WIN32
+	#endif
+	HANDLE OpenFileByNameUtf8(const char* pName);
+	#include <string>
+#endif
+
+#ifdef __CYGWIN__
+	#include <stdio.h>
+#endif
+
 #ifdef WIN32
 
-// #include "emu.h"
-
-#include <windows.h>
 #include <fcntl.h>
-// #include <atlenc.h>
 #include <unistd.h>
 
-#include <string>
 #include <list>
 
 //our implimentation for a timer
@@ -393,131 +401,6 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    OpenFileByNameUtf8
-//		Purpose: Converts filename to Unicode and returns 
-//			a handle to it. In case of error, sets errno,
-//			logs the error and returns NULL.
-//		Created: 10th December 2004
-//
-// --------------------------------------------------------------------------
-HANDLE OpenFileByNameUtf8(const char* pName)
-{
-	//some string thing - required by ms to indicate long/unicode filename
-	std::string tmpStr("\\\\?\\");
-
-	// is the path relative or otherwise
-	std::string fileN(pName);
-	if (fileN[1] != ':')
-	{
-		// we need to get the current directory
-		char wd[PATH_MAX];
-		if(::getcwd(wd, PATH_MAX) == 0)
-		{
-			::syslog(LOG_WARNING, 
-				"Failed to open '%s': path too long", pName);
-			errno = ENAMETOOLONG;
-			return NULL;
-		}
-
-		tmpStr += wd;
-		if (tmpStr[tmpStr.length()] != '\\')
-		{
-			tmpStr += '\\';
-		}
-	}
-
-	tmpStr += fileN;
-
-	int strlen = MultiByteToWideChar(
-		CP_UTF8,               // code page
-		0,                     // character-type options
-		tmpStr.c_str(),        // string to map
-		(int)tmpStr.length(),  // number of bytes in string
-		NULL,                  // wide-character buffer
-		0                      // size of buffer - work out 
-		                       //   how much space we need
-		);
-
-	wchar_t* buffer = new wchar_t[strlen+1];
-
-	if (buffer == NULL)
-	{
-		::syslog(LOG_WARNING, 
-			"Failed to open '%s': out of memory", pName);
-		errno = ENOMEM;
-		return NULL;
-	}
-
-	strlen = MultiByteToWideChar(
-		CP_UTF8,               // code page
-		0,                     // character-type options
-		tmpStr.c_str(),        // string to map
-		(int)tmpStr.length(),  // number of bytes in string
-		buffer,                // wide-character buffer
-		strlen                 // size of buffer
-		);
-
-	if (strlen == 0)
-	{
-		::syslog(LOG_WARNING, 
-			"Failed to open '%s': could not convert "
-			"file name to Unicode", pName);
-		errno = EACCES;
-		delete [] buffer;
-		return NULL;
-	}
-
-	buffer[strlen] = L'\0';
-
-	HANDLE handle = CreateFileW(buffer, 
-		FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA, 
-		FILE_SHARE_READ | FILE_SHARE_DELETE | FILE_SHARE_WRITE, 
-		NULL, 
-		OPEN_EXISTING, 
-		FILE_FLAG_BACKUP_SEMANTICS,
-		NULL);
-
-	if (handle == INVALID_HANDLE_VALUE)
-	{
-		// if our open fails we should always be able to 
-		// open in this mode - to get the inode information
-		// at least one process must have the file open - 
-		// in this case someone else does.
-		handle = CreateFileW(buffer, 
-			0, 
-			FILE_SHARE_READ, 
-			NULL, 
-			OPEN_EXISTING, 
-			FILE_FLAG_BACKUP_SEMANTICS,
-			NULL);
-	}
-
-	delete [] buffer;
-
-	if (handle == INVALID_HANDLE_VALUE)
-	{
-		DWORD err = GetLastError();
-
-		if (err == ERROR_FILE_NOT_FOUND)
-		{
-			errno = ENOENT;
-		}
-		else
-		{
-			::syslog(LOG_WARNING, 
-				"Failed to open '%s': error %d", pName);
-			errno = EACCES;
-		}
-
-		return NULL;
-	}
-
-	return handle;
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
 //		Name:    ourstat 
 //		Purpose: replacement for the lstat and stat functions, 
 //			works with unicode filenames supplied in utf8 format
@@ -553,50 +436,6 @@
 	return retVal;
 }
 
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    statfs
-//		Purpose: returns the mount point of where a file is located - 
-//			in this case the volume serial number
-//		Created: 25th October 2004
-//
-// --------------------------------------------------------------------------
-int statfs(const char * pName, struct statfs * s)
-{
-	HANDLE handle = OpenFileByNameUtf8(pName);
-
-	if (handle == NULL)
-	{
-		// errno already set and error logged by OpenFileByNameUtf8()
-		return -1;
-	}
-
-	BY_HANDLE_FILE_INFORMATION fi;
-	if (!GetFileInformationByHandle(handle, &fi))
-	{
-		::syslog(LOG_WARNING, "Failed to get file information "
-			"for '%s': error %d", pName, GetLastError());
-		CloseHandle(handle);
-		errno = EACCES;
-		return -1;
-	}
-
-	// convert volume serial number to a string
-	_ui64toa(fi.dwVolumeSerialNumber, s->f_mntonname + 1, 16);
-
-	// pseudo unix mount point
-	s->f_mntonname[0] = DIRECTORY_SEPARATOR_ASCHAR;
-
-	CloseHandle(handle);   // close the handle
-
-	return 0;
-}
-
-
-
-
-
 // MinGW provides opendir(), etc. via <dirent.h>
 // MSVC does not provide these, so emulation is needed
 
@@ -871,7 +710,10 @@
 
 	return -1;
 }
+#endif // WIN32
 
+#if defined WIN32 || defined __CYGWIN__
+
 HANDLE gSyslogH = 0;
 
 void syslog(int loglevel, const char *frmt, ...)
@@ -917,7 +759,7 @@
 		va_list args;
 		va_start(args, frmt);
 
-#ifdef __MINGW32__
+#if defined __MINGW32__ || defined __CYGWIN__
 		// no _vscprintf, use a fixed size buffer
 		buffer = new char[1024];
 		int len = 1023;
@@ -960,7 +802,7 @@
 		{
 			DWORD err = GetLastError();
 			printf("Unable to send message to Event Log "
-				"(error %i):\r\n", err);
+				"(error %i):\r\n", (int)err);
 		}
 
 		printf("%s\r\n", buffer);
@@ -973,4 +815,174 @@
 	}
 }
 
-#endif // WIN32
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    OpenFileByNameUtf8
+//		Purpose: Converts filename to Unicode and returns 
+//			a handle to it. In case of error, sets errno,
+//			logs the error and returns NULL.
+//		Created: 10th December 2004
+//
+// --------------------------------------------------------------------------
+HANDLE OpenFileByNameUtf8(const char* pName)
+{
+	//some string thing - required by ms to indicate long/unicode filename
+	std::string tmpStr("\\\\?\\");
+
+	// is the path relative or otherwise
+	std::string fileN(pName);
+	if (fileN[1] != ':')
+	{
+		// we need to get the current directory
+		char wd[PATH_MAX];
+		if(::getcwd(wd, PATH_MAX) == 0)
+		{
+			::syslog(LOG_WARNING, 
+				"Failed to open '%s': path too long", pName);
+			errno = ENAMETOOLONG;
+			return NULL;
+		}
+
+		tmpStr += wd;
+		if (tmpStr[tmpStr.length()] != '\\')
+		{
+			tmpStr += '\\';
+		}
+	}
+
+	tmpStr += fileN;
+
+	int strlen = MultiByteToWideChar(
+		CP_UTF8,               // code page
+		0,                     // character-type options
+		tmpStr.c_str(),        // string to map
+		(int)tmpStr.length(),  // number of bytes in string
+		NULL,                  // wide-character buffer
+		0                      // size of buffer - work out 
+		                       //   how much space we need
+		);
+
+	wchar_t* buffer = new wchar_t[strlen+1];
+
+	if (buffer == NULL)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to open '%s': out of memory", pName);
+		errno = ENOMEM;
+		return NULL;
+	}
+
+	strlen = MultiByteToWideChar(
+		CP_UTF8,               // code page
+		0,                     // character-type options
+		tmpStr.c_str(),        // string to map
+		(int)tmpStr.length(),  // number of bytes in string
+		buffer,                // wide-character buffer
+		strlen                 // size of buffer
+		);
+
+	if (strlen == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to open '%s': could not convert "
+			"file name to Unicode", pName);
+		errno = EACCES;
+		delete [] buffer;
+		return NULL;
+	}
+
+	buffer[strlen] = L'\0';
+
+	HANDLE handle = CreateFileW(buffer, 
+		FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA, 
+		FILE_SHARE_READ | FILE_SHARE_DELETE | FILE_SHARE_WRITE, 
+		NULL, 
+		OPEN_EXISTING, 
+		FILE_FLAG_BACKUP_SEMANTICS,
+		NULL);
+
+	if (handle == INVALID_HANDLE_VALUE)
+	{
+		// if our open fails we should always be able to 
+		// open in this mode - to get the inode information
+		// at least one process must have the file open - 
+		// in this case someone else does.
+		handle = CreateFileW(buffer, 
+			0, 
+			FILE_SHARE_READ, 
+			NULL, 
+			OPEN_EXISTING, 
+			FILE_FLAG_BACKUP_SEMANTICS,
+			NULL);
+	}
+
+	delete [] buffer;
+
+	if (handle == INVALID_HANDLE_VALUE)
+	{
+		DWORD err = GetLastError();
+
+		if (err == ERROR_FILE_NOT_FOUND)
+		{
+			errno = ENOENT;
+		}
+		else
+		{
+			::syslog(LOG_WARNING, 
+				"Failed to open '%s': error %d", pName);
+			errno = EACCES;
+		}
+
+		return NULL;
+	}
+
+	return handle;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    statfs
+//		Purpose: returns the mount point of where a file is located - 
+//			in this case the volume serial number
+//		Created: 25th October 2004
+//
+// --------------------------------------------------------------------------
+int statfs(const char * pName, struct statfs * s)
+{
+	HANDLE handle = OpenFileByNameUtf8(pName);
+
+	if (handle == NULL)
+	{
+		// errno already set and error logged by OpenFileByNameUtf8()
+		return -1;
+	}
+
+	BY_HANDLE_FILE_INFORMATION fi;
+	if (!GetFileInformationByHandle(handle, &fi))
+	{
+		::syslog(LOG_WARNING, "Failed to get file information "
+			"for '%s': error %d", pName, GetLastError());
+		CloseHandle(handle);
+		errno = EACCES;
+		return -1;
+	}
+
+	// convert volume serial number to a string
+
+#ifdef __CYGWIN__
+	snprintf(s->f_mntonname, sizeof(s->f_mntonname), "/%llx",
+		(long long)fi.dwVolumeSerialNumber);
+#else
+	_ui64toa(fi.dwVolumeSerialNumber, s->f_mntonname + 1, 16);
+
+	// pseudo unix mount point
+	s->f_mntonname[0] = DIRECTORY_SEPARATOR_ASCHAR;
+#endif
+
+	CloseHandle(handle);   // close the handle
+
+	return 0;
+}
+#endif

Modified: box/chris/win32/cygwin-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/cygwin-compile-fixes/lib/win32/emu.h	2006-02-07 11:41:42 UTC (rev 397)
+++ box/chris/win32/cygwin-compile-fixes/lib/win32/emu.h	2006-02-07 11:42:50 UTC (rev 398)
@@ -1,8 +1,23 @@
 // emulates unix syscalls to win32 functions
 
-#if ! defined EMU_INCLUDE && defined WIN32
+#ifndef EMU_INCLUDE
 #define EMU_INCLUDE
 
+#if defined WIN32 || defined __CYGWIN__
+	#include <errno.h>
+	#define LOG_INFO 6
+	#define LOG_WARNING 4
+	#define LOG_ERR 3
+	#define LOG_PID 0
+	#define LOG_LOCAL6 0
+
+	#ifndef PATH_MAX
+		#define PATH_MAX MAX_PATH
+	#endif
+#endif
+
+#ifdef WIN32
+
 #define _STAT_DEFINED
 #define _INO_T_DEFINED
 
@@ -10,7 +25,6 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <direct.h>
-#include <errno.h>
 #include <io.h>
 #include <stdlib.h>
 #include <string.h>
@@ -142,10 +156,6 @@
 	return 0;
 }
 
-#ifndef PATH_MAX
-#define PATH_MAX MAX_PATH
-#endif
-
 // MinGW provides a getopt implementation
 #ifndef __MINGW32__
 
@@ -290,12 +300,6 @@
 
 HANDLE openfile(const char *filename, int flags, int mode);
 
-#define LOG_INFO 6
-#define LOG_WARNING 4
-#define LOG_ERR 3
-#define LOG_PID 0
-#define LOG_LOCAL6 0
-
 extern HANDLE gSyslogH;
 void MyReportEvent(LPCTSTR *szMsg, DWORD errinfo);
 inline void openlog(const char * daemonName, int, int)
@@ -352,12 +356,6 @@
 	return 0;
 }
 
-//this shouldn't be needed.
-struct statfs
-{
-	TCHAR f_mntonname[MAX_PATH];
-};
-
 // I think this should get us going
 // Although there is a warning about 
 // mount points in win32 can now exists - which means inode number can be 
@@ -384,7 +382,6 @@
 
 int ourstat(const char * name, struct stat * st);
 int ourfstat(HANDLE file, struct stat * st);
-int statfs(const char * name, struct statfs * s);
 
 //need this for converstions
 inline time_t ConvertFileTimeToTime_t(FILETIME *fileTime)
@@ -416,6 +413,14 @@
 int poll (struct pollfd *ufds, unsigned long nfds, int timeout);
 bool EnableBackupRights( void );
 
+#endif // WIN32
+
+#ifdef __CYGWIN__
+typedef char TCHAR;
+#define MAX_PATH 1024
+#endif
+
+#if defined WIN32 || defined __CYGWIN__
 //
 // MessageId: MSG_ERR_EXIST
 // MessageText:
@@ -423,4 +428,13 @@
 //
 #define MSG_ERR_EXIST                         ((DWORD)0xC0000004L)
 
-#endif // !EMU_INCLUDE && WIN32
+// this shouldn't be needed.
+struct statfs
+{
+	TCHAR f_mntonname[MAX_PATH];
+};
+
+int statfs(const char * name, struct statfs * s);
+#endif // WIN32 || __CYGWIN__
+
+#endif // !EMU_INCLUDE


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:50:20 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:50:20 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r399 - box/chris/win32/cygwin-compile-fixes
Message-ID: <20060207115020.9C70E94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:50:17 +0000 (Tue, 07 Feb 2006)
New Revision: 399

Modified:
   box/chris/win32/cygwin-compile-fixes/configure.ac
Log:
* configure.ac
- Use emulation to "detect" mount points on Cygwin as well


Modified: box/chris/win32/cygwin-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/cygwin-compile-fixes/configure.ac	2006-02-07 11:42:50 UTC (rev 398)
+++ box/chris/win32/cygwin-compile-fixes/configure.ac	2006-02-07 11:50:17 UTC (rev 399)
@@ -115,7 +115,7 @@
   AX_RANDOM_DEVICE
 fi
 AX_CHECK_MOUNT_POINT(,[
-  if test "$target_os" != "mingw32" -a "$target_os" != "winnt"; then
+  if test "$target_os" != "mingw32" -a "$target_os" != "cygwin"; then
     AC_MSG_ERROR([[cannot work out how to discover mount points on your platform]])
   fi
   ])


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:52:57 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:52:57 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r400 - box/chris/win32/cygwin-compile-fixes
Message-ID: <20060207115257.2640094@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:52:53 +0000 (Tue, 07 Feb 2006)
New Revision: 400

Modified:
   box/chris/win32/cygwin-compile-fixes/modules.txt
Log:
* modules.txt
- 'CYGWIN' is now known as 'cygwin'


Modified: box/chris/win32/cygwin-compile-fixes/modules.txt
===================================================================
--- box/chris/win32/cygwin-compile-fixes/modules.txt	2006-02-07 11:50:17 UTC (rev 399)
+++ box/chris/win32/cygwin-compile-fixes/modules.txt	2006-02-07 11:52:53 UTC (rev 400)
@@ -10,7 +10,7 @@
 # Generic support code and modules
 
 OMIT:mingw32
-OMIT:CYGWIN
+OMIT:cygwin
 lib/raidfile
 END-OMIT
 
@@ -24,7 +24,7 @@
 
 OMIT:mingw32
 test/basicserver	lib/server	lib/win32
-OMIT:CYGWIN
+OMIT:cygwin
 test/raidfile		lib/raidfile
 END-OMIT
 
@@ -35,7 +35,7 @@
 lib/backupclient	lib/server	lib/crypto	lib/compress
 
 OMIT:mingw32
-OMIT:CYGWIN
+OMIT:cygwin
 lib/backupstore		lib/server	lib/raidfile	lib/backupclient
 bin/bbstored		lib/raidfile	lib/server	lib/backupstore	lib/backupclient	lib/win32
 bin/bbstoreaccounts	lib/raidfile	lib/backupstore	lib/win32
@@ -47,7 +47,7 @@
 bin/bbackupctl		lib/server	lib/backupclient	lib/win32
 
 OMIT:mingw32
-OMIT:CYGWIN
+OMIT:cygwin
 test/backupstore	bin/bbstored	bin/bbstoreaccounts lib/server lib/backupstore lib/backupclient lib/raidfile
 test/backupstorefix	bin/bbstored	bin/bbstoreaccounts	lib/backupstore	lib/raidfile	bin/bbackupquery	bin/bbackupd
 test/backupstorepatch	bin/bbstored	bin/bbstoreaccounts	lib/backupstore	lib/raidfile


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:53:18 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 11:53:18 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r401 - box/chris/win32/cygwin-compile-fixes/infrastructure
Message-ID: <20060207115318.7C5B394@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 11:53:15 +0000 (Tue, 07 Feb 2006)
New Revision: 401

Modified:
   box/chris/win32/cygwin-compile-fixes/infrastructure/makebuildenv.pl
Log:
* makebuildenv.pl
- Include lib/win32 on Cygwin as well


Modified: box/chris/win32/cygwin-compile-fixes/infrastructure/makebuildenv.pl
===================================================================
--- box/chris/win32/cygwin-compile-fixes/infrastructure/makebuildenv.pl	2006-02-07 11:52:53 UTC (rev 400)
+++ box/chris/win32/cygwin-compile-fixes/infrastructure/makebuildenv.pl	2006-02-07 11:53:15 UTC (rev 401)
@@ -39,7 +39,7 @@
 my %env_flags;
 
 my $windows_include_path = "-I../../lib/win32 ";
-if ($target_os ne "mingw32" && $target_os ne "winnt")
+if ($target_os ne "mingw32" && $target_os ne "cygwin")
 {
 	$windows_include_path = "";
 	$env_flags{'IGNORE_lib/win32'} = 1;


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 11:56:32 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 7 Feb 2006 11:56:32 +0000
Subject: [Box Backup-dev] COMMIT r401 - box/chris/win32/cygwin-compile-fixes/infrastructure
In-Reply-To: <20060207115318.7C5B394@s0g0.pems.testserver.co.uk>
References: <20060207115318.7C5B394@s0g0.pems.testserver.co.uk>
Message-ID: <6E7DAD43-8F03-4177-8785-C35D39A3B289@fluffy.co.uk>

On 7 Feb 2006, at 11:53, subversion@fluffy.co.uk wrote:


>
>  my $windows_include_path = "-I../../lib/win32 ";
> -if ($target_os ne "mingw32" && $target_os ne "winnt")
> +if ($target_os ne "mingw32" && $target_os ne "cygwin")

won't that break the MSVC port?

Ben





From boxbackup-dev@fluffy.co.uk  Tue Feb  7 13:36:45 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Tue, 7 Feb 2006 05:36:45 -0800 (PST)
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <Pine.LNX.4.62.0602070936140.14656@top.qwarx.com>
Message-ID: <20060207133645.16365.qmail@web36701.mail.mud.yahoo.com>

Chris,

> Cygwin is NOT required to build - you can use MSVC. And regexes are 
> supported if you have the libraries - it's just that I don't have them 
> installed for native builds yet (it's not easy).

Ok, then I am at a loss here - where does th Cygwin/MinGW comes into pleay in that case? I will
try to build Win32 native using VS2K5, if you let me know which distribution is the way to go. Is
anyone else working on VS2K5?

> Please could you help to fix Cygwin? I'll check in my updated tree to 
> Subversion this evening, which at least allows it to build.

If I can build a native Win32 version, then a native Cygwin version is somewhat of a redundancy,
there, but I can help you build/test, sure.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Tue Feb  7 13:45:06 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 07 Feb 2006 13:45:06 +0000
Subject: [Box Backup-dev] COMMIT r401 -
 box/chris/win32/cygwin-compile-fixes/infrastructure
In-Reply-To: <6E7DAD43-8F03-4177-8785-C35D39A3B289@fluffy.co.uk>
References: <20060207115318.7C5B394@s0g0.pems.testserver.co.uk>
 <6E7DAD43-8F03-4177-8785-C35D39A3B289@fluffy.co.uk>
Message-ID: <1139319907.5660.0.camel@localhost>

Hi Ben,

> >  my $windows_include_path = "-I../../lib/win32 ";
> > -if ($target_os ne "mingw32" && $target_os ne "winnt")
> > +if ($target_os ne "mingw32" && $target_os ne "cygwin")
> 
> won't that break the MSVC port?

I don't think it uses this script, certainly not Makefiles.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 20:36:05 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 7 Feb 2006 20:36:05 +0000 (GMT)
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <20060207133645.16365.qmail@web36701.mail.mud.yahoo.com>
References: <20060207133645.16365.qmail@web36701.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602072033520.14656@top.qwarx.com>

Hi Gary,

>> Cygwin is NOT required to build - you can use MSVC. And regexes are
>> supported if you have the libraries - it's just that I don't have them
>> installed for native builds yet (it's not easy).
>
> Ok, then I am at a loss here - where does th Cygwin/MinGW comes into 
> pleay in that case? I will try to build Win32 native using VS2K5, if you 
> let me know which distribution is the way to go. Is anyone else working 
> on VS2K5?

There are TWO ways to create a native build: cygwin+mingw, and perl+msvc. 
For the latter, just run win32.bat, open the solution (in 
infrastructure/msvc/2005) and compile. But it doesn't have regex support 
either (at the moment). You will probably need to download something like 
pcre and link it into the project.

>> Please could you help to fix Cygwin? I'll check in my updated tree to 
>> Subversion this evening, which at least allows it to build.
>
> If I can build a native Win32 version, then a native Cygwin version is 
> somewhat of a redundancy, there, but I can help you build/test, sure.

I have no idea if I can get regex support working in time for this 
release, so Cygwin support might still be worth having.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 20:50:02 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 7 Feb 2006 20:50:02 +0000
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <Pine.LNX.4.62.0602072033520.14656@top.qwarx.com>
References: <20060207133645.16365.qmail@web36701.mail.mud.yahoo.com> <Pine.LNX.4.62.0602072033520.14656@top.qwarx.com>
Message-ID: <D3DC42DE-E982-48D9-837F-196F1A324533@fluffy.co.uk>

On 7 Feb 2006, at 20:36, Chris Wilson wrote:

> Hi Gary,
>
>>> Cygwin is NOT required to build - you can use MSVC. And regexes are
>>> supported if you have the libraries - it's just that I don't have  
>>> them
>>> installed for native builds yet (it's not easy).
>>
>> Ok, then I am at a loss here - where does th Cygwin/MinGW comes  
>> into pleay in that case? I will try to build Win32 native using  
>> VS2K5, if you let me know which distribution is the way to go. Is  
>> anyone else working on VS2K5?
>
> There are TWO ways to create a native build: cygwin+mingw, and perl 
> +msvc. For the latter, just run win32.bat, open the solution (in  
> infrastructure/msvc/2005) and compile. But it doesn't have regex  
> support either (at the moment). You will probably need to download  
> something like pcre and link it into the project.

I used pcre on Win32 recently, and it was very easy to use.

>
>>> Please could you help to fix Cygwin? I'll check in my updated  
>>> tree to Subversion this evening, which at least allows it to build.
>>
>> If I can build a native Win32 version, then a native Cygwin  
>> version is somewhat of a redundancy, there, but I can help you  
>> build/test, sure.
>
> I have no idea if I can get regex support working in time for this  
> release, so Cygwin support might still be worth having.

How long? Sounds like it's worth having.

Ben




From boxbackup-dev@fluffy.co.uk  Tue Feb  7 21:02:05 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 7 Feb 2006 21:02:05 +0000 (GMT)
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <D3DC42DE-E982-48D9-837F-196F1A324533@fluffy.co.uk>
References: <20060207133645.16365.qmail@web36701.mail.mud.yahoo.com>
 <Pine.LNX.4.62.0602072033520.14656@top.qwarx.com>
 <D3DC42DE-E982-48D9-837F-196F1A324533@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602072100200.14656@top.qwarx.com>

Hi Ben,

> I used pcre on Win32 recently, and it was very easy to use.

Which release, compiler, environment? I can't get it to build and install 
properly from source on cygwin+mingw.

>>  I have no idea if I can get regex support working in time for this 
>>  release, so Cygwin support might still be worth having.
>
> How long? Sounds like it's worth having.

Not sure, but at a guess another 8 hours to have it building and 
installing properly in a cygwin environment, then I have to make bb 
autoconf detect and link to it properly.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 21:07:50 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 7 Feb 2006 21:07:50 +0000
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <Pine.LNX.4.62.0602072100200.14656@top.qwarx.com>
References: <20060207133645.16365.qmail@web36701.mail.mud.yahoo.com> <Pine.LNX.4.62.0602072033520.14656@top.qwarx.com> <D3DC42DE-E982-48D9-837F-196F1A324533@fluffy.co.uk> <Pine.LNX.4.62.0602072100200.14656@top.qwarx.com>
Message-ID: <7A018FF3-BE7E-4261-A100-CED016AC3D2F@fluffy.co.uk>

On 7 Feb 2006, at 21:02, Chris Wilson wrote:

> Hi Ben,
>
>> I used pcre on Win32 recently, and it was very easy to use.
>
> Which release, compiler, environment? I can't get it to build and  
> install properly from source on cygwin+mingw.

Latest release, MSVC++ 6.0, Win XP. I cheated and used the binary  
download with the dll and header file.

>
>>>  I have no idea if I can get regex support working in time for  
>>> this  release, so Cygwin support might still be worth having.
>>
>> How long? Sounds like it's worth having.
>
> Not sure, but at a guess another 8 hours to have it building and  
> installing properly in a cygwin environment, then I have to make bb  
> autoconf detect and link to it properly.

Scary. Feel like having a go?

Ben




From boxbackup-dev@fluffy.co.uk  Tue Feb  7 21:58:57 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 7 Feb 2006 21:58:57 +0000 (GMT)
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <7A018FF3-BE7E-4261-A100-CED016AC3D2F@fluffy.co.uk>
References: <20060207133645.16365.qmail@web36701.mail.mud.yahoo.com>
 <Pine.LNX.4.62.0602072033520.14656@top.qwarx.com>
 <D3DC42DE-E982-48D9-837F-196F1A324533@fluffy.co.uk>
 <Pine.LNX.4.62.0602072100200.14656@top.qwarx.com>
 <7A018FF3-BE7E-4261-A100-CED016AC3D2F@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602072158180.14656@top.qwarx.com>

Hi Ben,

>>  Not sure, but at a guess another 8 hours to have it building and 
>>  installing properly in a cygwin environment, then I have to make bb 
>>  autoconf detect and link to it properly.
>
> Scary. Feel like having a go?

Sure, I'm already trying, I just don't know when I will actually get it 
working.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 22:14:45 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 7 Feb 2006 22:14:45 +0000
Subject: [Box Backup-dev] boxbackup-0.09_plus2 under Cygwin
In-Reply-To: <Pine.LNX.4.62.0602072158180.14656@top.qwarx.com>
References: <20060207133645.16365.qmail@web36701.mail.mud.yahoo.com> <Pine.LNX.4.62.0602072033520.14656@top.qwarx.com> <D3DC42DE-E982-48D9-837F-196F1A324533@fluffy.co.uk> <Pine.LNX.4.62.0602072100200.14656@top.qwarx.com> <7A018FF3-BE7E-4261-A100-CED016AC3D2F@fluffy.co.uk> <Pine.LNX.4.62.0602072158180.14656@top.qwarx.com>
Message-ID: <C2F52437-D684-4447-B5D7-91E35417E514@fluffy.co.uk>

On 7 Feb 2006, at 21:58, Chris Wilson wrote:

> Hi Ben,
>
>>>  Not sure, but at a guess another 8 hours to have it building  
>>> and  installing properly in a cygwin environment, then I have to  
>>> make bb  autoconf detect and link to it properly.
>>
>> Scary. Feel like having a go?
>
> Sure, I'm already trying, I just don't know when I will actually  
> get it working.

I'm happy to wait a while. One of the big aims of this release is to  
get Win32 working nicely.

Ben




From boxbackup-dev@fluffy.co.uk  Tue Feb  7 23:49:33 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 23:49:33 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r402 - box/chris/win32/cygwin-compile-fixes/bin/bbackupd
Message-ID: <20060207234933.8343394@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 23:49:23 +0000 (Tue, 07 Feb 2006)
New Revision: 402

Modified:
   box/chris/win32/cygwin-compile-fixes/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- Don't try to use emulated statfs on Cygwin, as it doesn't do what we want


Modified: box/chris/win32/cygwin-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/cygwin-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-07 11:53:15 UTC (rev 401)
+++ box/chris/win32/cygwin-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-07 23:49:23 UTC (rev 402)
@@ -1292,8 +1292,7 @@
 			// Do a fsstat on the pathname to find out which mount it's on
 			{
 
-#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32 \
-	|| defined __CYGWIN__
+#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32
 
 				// BSD style statfs -- includes mount point, which is nice.
 				struct statfs s;


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 23:50:54 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 23:50:54 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r403 - box/chris/win32/cygwin-compile-fixes/lib/win32
Message-ID: <20060207235054.6BAF194@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 23:50:42 +0000 (Tue, 07 Feb 2006)
New Revision: 403

Modified:
   box/chris/win32/cygwin-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/cygwin-compile-fixes/lib/win32/emu.h
Log:
* emu.cpp, emu.h
- Don't try to use win32 emulated statfs on Cygwin, it doesn't work
- Put some things back how they were to reduce diff sizes


Modified: box/chris/win32/cygwin-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/cygwin-compile-fixes/lib/win32/emu.cpp	2006-02-07 23:49:23 UTC (rev 402)
+++ box/chris/win32/cygwin-compile-fixes/lib/win32/emu.cpp	2006-02-07 23:50:42 UTC (rev 403)
@@ -10,13 +10,12 @@
 	#ifdef __CYGWIN__
 		#undef WIN32
 	#endif
-	HANDLE OpenFileByNameUtf8(const char* pName);
 	#include <string>
 #endif
 
-#ifdef __CYGWIN__
-	#include <stdio.h>
-#endif
+// #ifdef __CYGWIN__
+//	#include <stdio.h>
+// #endif
 
 #ifdef WIN32
 
@@ -401,6 +400,131 @@
 // --------------------------------------------------------------------------
 //
 // Function
+//		Name:    OpenFileByNameUtf8
+//		Purpose: Converts filename to Unicode and returns 
+//			a handle to it. In case of error, sets errno,
+//			logs the error and returns NULL.
+//		Created: 10th December 2004
+//
+// --------------------------------------------------------------------------
+HANDLE OpenFileByNameUtf8(const char* pName)
+{
+	//some string thing - required by ms to indicate long/unicode filename
+	std::string tmpStr("\\\\?\\");
+
+	// is the path relative or otherwise
+	std::string fileN(pName);
+	if (fileN[1] != ':')
+	{
+		// we need to get the current directory
+		char wd[PATH_MAX];
+		if(::getcwd(wd, PATH_MAX) == 0)
+		{
+			::syslog(LOG_WARNING, 
+				"Failed to open '%s': path too long", pName);
+			errno = ENAMETOOLONG;
+			return NULL;
+		}
+
+		tmpStr += wd;
+		if (tmpStr[tmpStr.length()] != '\\')
+		{
+			tmpStr += '\\';
+		}
+	}
+
+	tmpStr += fileN;
+
+	int strlen = MultiByteToWideChar(
+		CP_UTF8,               // code page
+		0,                     // character-type options
+		tmpStr.c_str(),        // string to map
+		(int)tmpStr.length(),  // number of bytes in string
+		NULL,                  // wide-character buffer
+		0                      // size of buffer - work out 
+		                       //   how much space we need
+		);
+
+	wchar_t* buffer = new wchar_t[strlen+1];
+
+	if (buffer == NULL)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to open '%s': out of memory", pName);
+		errno = ENOMEM;
+		return NULL;
+	}
+
+	strlen = MultiByteToWideChar(
+		CP_UTF8,               // code page
+		0,                     // character-type options
+		tmpStr.c_str(),        // string to map
+		(int)tmpStr.length(),  // number of bytes in string
+		buffer,                // wide-character buffer
+		strlen                 // size of buffer
+		);
+
+	if (strlen == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to open '%s': could not convert "
+			"file name to Unicode", pName);
+		errno = EACCES;
+		delete [] buffer;
+		return NULL;
+	}
+
+	buffer[strlen] = L'\0';
+
+	HANDLE handle = CreateFileW(buffer, 
+		FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA, 
+		FILE_SHARE_READ | FILE_SHARE_DELETE | FILE_SHARE_WRITE, 
+		NULL, 
+		OPEN_EXISTING, 
+		FILE_FLAG_BACKUP_SEMANTICS,
+		NULL);
+
+	if (handle == INVALID_HANDLE_VALUE)
+	{
+		// if our open fails we should always be able to 
+		// open in this mode - to get the inode information
+		// at least one process must have the file open - 
+		// in this case someone else does.
+		handle = CreateFileW(buffer, 
+			0, 
+			FILE_SHARE_READ, 
+			NULL, 
+			OPEN_EXISTING, 
+			FILE_FLAG_BACKUP_SEMANTICS,
+			NULL);
+	}
+
+	delete [] buffer;
+
+	if (handle == INVALID_HANDLE_VALUE)
+	{
+		DWORD err = GetLastError();
+
+		if (err == ERROR_FILE_NOT_FOUND)
+		{
+			errno = ENOENT;
+		}
+		else
+		{
+			::syslog(LOG_WARNING, 
+				"Failed to open '%s': error %d", pName);
+			errno = EACCES;
+		}
+
+		return NULL;
+	}
+
+	return handle;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
 //		Name:    ourstat 
 //		Purpose: replacement for the lstat and stat functions, 
 //			works with unicode filenames supplied in utf8 format
@@ -436,6 +560,46 @@
 	return retVal;
 }
 
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    statfs
+//		Purpose: returns the mount point of where a file is located - 
+//			in this case the volume serial number
+//		Created: 25th October 2004
+//
+// --------------------------------------------------------------------------
+int statfs(const char * pName, struct statfs * s)
+{
+	HANDLE handle = OpenFileByNameUtf8(pName);
+
+	if (handle == NULL)
+	{
+		// errno already set and error logged by OpenFileByNameUtf8()
+		return -1;
+	}
+
+	BY_HANDLE_FILE_INFORMATION fi;
+	if (!GetFileInformationByHandle(handle, &fi))
+	{
+		::syslog(LOG_WARNING, "Failed to get file information "
+			"for '%s': error %d", pName, GetLastError());
+		CloseHandle(handle);
+		errno = EACCES;
+		return -1;
+	}
+
+	// convert volume serial number to a string
+	_ui64toa(fi.dwVolumeSerialNumber, s->f_mntonname + 1, 16);
+
+	// pseudo unix mount point
+	s->f_mntonname[0] = DIRECTORY_SEPARATOR_ASCHAR;
+
+	CloseHandle(handle);   // close the handle
+
+	return 0;
+}
+
 // MinGW provides opendir(), etc. via <dirent.h>
 // MSVC does not provide these, so emulation is needed
 
@@ -815,174 +979,5 @@
 	}
 }
 
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    OpenFileByNameUtf8
-//		Purpose: Converts filename to Unicode and returns 
-//			a handle to it. In case of error, sets errno,
-//			logs the error and returns NULL.
-//		Created: 10th December 2004
-//
-// --------------------------------------------------------------------------
-HANDLE OpenFileByNameUtf8(const char* pName)
-{
-	//some string thing - required by ms to indicate long/unicode filename
-	std::string tmpStr("\\\\?\\");
 
-	// is the path relative or otherwise
-	std::string fileN(pName);
-	if (fileN[1] != ':')
-	{
-		// we need to get the current directory
-		char wd[PATH_MAX];
-		if(::getcwd(wd, PATH_MAX) == 0)
-		{
-			::syslog(LOG_WARNING, 
-				"Failed to open '%s': path too long", pName);
-			errno = ENAMETOOLONG;
-			return NULL;
-		}
-
-		tmpStr += wd;
-		if (tmpStr[tmpStr.length()] != '\\')
-		{
-			tmpStr += '\\';
-		}
-	}
-
-	tmpStr += fileN;
-
-	int strlen = MultiByteToWideChar(
-		CP_UTF8,               // code page
-		0,                     // character-type options
-		tmpStr.c_str(),        // string to map
-		(int)tmpStr.length(),  // number of bytes in string
-		NULL,                  // wide-character buffer
-		0                      // size of buffer - work out 
-		                       //   how much space we need
-		);
-
-	wchar_t* buffer = new wchar_t[strlen+1];
-
-	if (buffer == NULL)
-	{
-		::syslog(LOG_WARNING, 
-			"Failed to open '%s': out of memory", pName);
-		errno = ENOMEM;
-		return NULL;
-	}
-
-	strlen = MultiByteToWideChar(
-		CP_UTF8,               // code page
-		0,                     // character-type options
-		tmpStr.c_str(),        // string to map
-		(int)tmpStr.length(),  // number of bytes in string
-		buffer,                // wide-character buffer
-		strlen                 // size of buffer
-		);
-
-	if (strlen == 0)
-	{
-		::syslog(LOG_WARNING, 
-			"Failed to open '%s': could not convert "
-			"file name to Unicode", pName);
-		errno = EACCES;
-		delete [] buffer;
-		return NULL;
-	}
-
-	buffer[strlen] = L'\0';
-
-	HANDLE handle = CreateFileW(buffer, 
-		FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA, 
-		FILE_SHARE_READ | FILE_SHARE_DELETE | FILE_SHARE_WRITE, 
-		NULL, 
-		OPEN_EXISTING, 
-		FILE_FLAG_BACKUP_SEMANTICS,
-		NULL);
-
-	if (handle == INVALID_HANDLE_VALUE)
-	{
-		// if our open fails we should always be able to 
-		// open in this mode - to get the inode information
-		// at least one process must have the file open - 
-		// in this case someone else does.
-		handle = CreateFileW(buffer, 
-			0, 
-			FILE_SHARE_READ, 
-			NULL, 
-			OPEN_EXISTING, 
-			FILE_FLAG_BACKUP_SEMANTICS,
-			NULL);
-	}
-
-	delete [] buffer;
-
-	if (handle == INVALID_HANDLE_VALUE)
-	{
-		DWORD err = GetLastError();
-
-		if (err == ERROR_FILE_NOT_FOUND)
-		{
-			errno = ENOENT;
-		}
-		else
-		{
-			::syslog(LOG_WARNING, 
-				"Failed to open '%s': error %d", pName);
-			errno = EACCES;
-		}
-
-		return NULL;
-	}
-
-	return handle;
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    statfs
-//		Purpose: returns the mount point of where a file is located - 
-//			in this case the volume serial number
-//		Created: 25th October 2004
-//
-// --------------------------------------------------------------------------
-int statfs(const char * pName, struct statfs * s)
-{
-	HANDLE handle = OpenFileByNameUtf8(pName);
-
-	if (handle == NULL)
-	{
-		// errno already set and error logged by OpenFileByNameUtf8()
-		return -1;
-	}
-
-	BY_HANDLE_FILE_INFORMATION fi;
-	if (!GetFileInformationByHandle(handle, &fi))
-	{
-		::syslog(LOG_WARNING, "Failed to get file information "
-			"for '%s': error %d", pName, GetLastError());
-		CloseHandle(handle);
-		errno = EACCES;
-		return -1;
-	}
-
-	// convert volume serial number to a string
-
-#ifdef __CYGWIN__
-	snprintf(s->f_mntonname, sizeof(s->f_mntonname), "/%llx",
-		(long long)fi.dwVolumeSerialNumber);
-#else
-	_ui64toa(fi.dwVolumeSerialNumber, s->f_mntonname + 1, 16);
-
-	// pseudo unix mount point
-	s->f_mntonname[0] = DIRECTORY_SEPARATOR_ASCHAR;
 #endif
-
-	CloseHandle(handle);   // close the handle
-
-	return 0;
-}
-#endif

Modified: box/chris/win32/cygwin-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/cygwin-compile-fixes/lib/win32/emu.h	2006-02-07 23:49:23 UTC (rev 402)
+++ box/chris/win32/cygwin-compile-fixes/lib/win32/emu.h	2006-02-07 23:50:42 UTC (rev 403)
@@ -10,10 +10,6 @@
 	#define LOG_ERR 3
 	#define LOG_PID 0
 	#define LOG_LOCAL6 0
-
-	#ifndef PATH_MAX
-		#define PATH_MAX MAX_PATH
-	#endif
 #endif
 
 #ifdef WIN32
@@ -156,6 +152,10 @@
 	return 0;
 }
 
+#ifndef PATH_MAX
+#define PATH_MAX MAX_PATH
+#endif
+
 // MinGW provides a getopt implementation
 #ifndef __MINGW32__
 
@@ -356,6 +356,12 @@
 	return 0;
 }
 
+// this shouldn't be needed.
+struct statfs
+{
+	TCHAR f_mntonname[MAX_PATH];
+};
+
 // I think this should get us going
 // Although there is a warning about 
 // mount points in win32 can now exists - which means inode number can be 
@@ -382,6 +388,7 @@
 
 int ourstat(const char * name, struct stat * st);
 int ourfstat(HANDLE file, struct stat * st);
+int statfs(const char * name, struct statfs * s);
 
 //need this for converstions
 inline time_t ConvertFileTimeToTime_t(FILETIME *fileTime)
@@ -427,14 +434,6 @@
 //  Box Backup.
 //
 #define MSG_ERR_EXIST                         ((DWORD)0xC0000004L)
-
-// this shouldn't be needed.
-struct statfs
-{
-	TCHAR f_mntonname[MAX_PATH];
-};
-
-int statfs(const char * name, struct statfs * s);
 #endif // WIN32 || __CYGWIN__
 
 #endif // !EMU_INCLUDE


From boxbackup-dev@fluffy.co.uk  Tue Feb  7 23:52:57 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue,  7 Feb 2006 23:52:57 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r404 - box/chris/win32/cygwin-compile-fixes
Message-ID: <20060207235257.ED56594@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-07 23:52:49 +0000 (Tue, 07 Feb 2006)
New Revision: 404

Modified:
   box/chris/win32/cygwin-compile-fixes/configure.ac
Log:
* configure.ac
- Do complain if we can't figure out mount points on Cygwin


Modified: box/chris/win32/cygwin-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/cygwin-compile-fixes/configure.ac	2006-02-07 23:50:42 UTC (rev 403)
+++ box/chris/win32/cygwin-compile-fixes/configure.ac	2006-02-07 23:52:49 UTC (rev 404)
@@ -115,7 +115,7 @@
   AX_RANDOM_DEVICE
 fi
 AX_CHECK_MOUNT_POINT(,[
-  if test "$target_os" != "mingw32" -a "$target_os" != "cygwin"; then
+  if test "$target_os" != "mingw32"; then
     AC_MSG_ERROR([[cannot work out how to discover mount points on your platform]])
   fi
   ])


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 00:17:24 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  8 Feb 2006 00:17:24 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r405 - box/chris/win32/vc2005-compile-fixes/infrastructure
Message-ID: <20060208001724.1E5FC94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-08 00:17:11 +0000 (Wed, 08 Feb 2006)
New Revision: 405

Modified:
   box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
Log:
* makeparcels.pl
- Added support for optional items (only copied if present) in parcels


Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-07 23:52:49 UTC (rev 404)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-08 00:17:11 UTC (rev 405)
@@ -113,6 +113,12 @@
 	for(@{$parcel_contents{$parcel}})
 	{
 		my ($type,$name) = split /\s+/;
+		my $optional = '';
+
+		if ($type eq 'optional')
+		{
+			($optional,$type,$name) = split /\s+/;
+		}
 		
 		if($type eq 'bin')
 		{
@@ -122,7 +128,14 @@
 		}
 		elsif ($type eq 'script')
 		{
-			print MAKE "\tcp $name $dir\n";
+			if ($optional)
+			{
+				print MAKE "\ttest -r $name && cp $name $dir\n";
+			}
+			else
+			{
+				print MAKE "\tcp $name $dir\n";
+			}
 			# remove path from script name
 			$name =~ m~/([^/]+)\Z~;
 			$name = $1;


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 00:18:18 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  8 Feb 2006 00:18:18 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r406 - box/chris/win32/vc2005-compile-fixes
Message-ID: <20060208001818.D1F2B94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-08 00:17:56 +0000 (Wed, 08 Feb 2006)
New Revision: 406

Modified:
   box/chris/win32/vc2005-compile-fixes/parcels.txt
Log:
* parcels.txt
- Include pcreposix.dll, if it exists, in mingw32 client parcels


Modified: box/chris/win32/vc2005-compile-fixes/parcels.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/parcels.txt	2006-02-08 00:17:11 UTC (rev 405)
+++ box/chris/win32/vc2005-compile-fixes/parcels.txt	2006-02-08 00:17:56 UTC (rev 406)
@@ -15,6 +15,7 @@
 	script bin/bbackupd/win32/bbackupd.conf
 	script /bin/mgwz.dll
 	script /bin/mingwm10.dll
+	optional script /bin/pcreposix.dll
 END-ONLY
 
 OMIT:mingw32


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 00:19:15 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  8 Feb 2006 00:19:15 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r407 - box/chris/win32/vc2005-compile-fixes/lib/backupclient
Message-ID: <20060208001915.6C31494@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-08 00:19:01 +0000 (Wed, 08 Feb 2006)
New Revision: 407

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreObjectDump.cpp
Log:
* BackupStoreObjectDump.cpp
- Avoid compiler warnings due to mismatched types in printf


Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreObjectDump.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreObjectDump.cpp	2006-02-08 00:17:56 UTC (rev 406)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreObjectDump.cpp	2006-02-08 00:19:01 UTC (rev 407)
@@ -96,18 +96,18 @@
 		int depends_l = 0;
 		if((*i)->GetDependsNewer() != 0)
 		{
-#ifdef WIN32
+#ifdef _MSC_VER
 			depends_l += ::sprintf(depends + depends_l, " depNew(%I64x)", (*i)->GetDependsNewer());
 #else
-			depends_l += ::sprintf(depends + depends_l, " depNew(%llx)", (*i)->GetDependsNewer());
+			depends_l += ::sprintf(depends + depends_l, " depNew(%llx)", (long long)((*i)->GetDependsNewer()));
 #endif
 		}
 		if((*i)->GetDependsOlder() != 0)
 		{
-#ifdef WIN32
+#ifdef _MSC_VER
 			depends_l += ::sprintf(depends + depends_l, " depOld(%I64x)", (*i)->GetDependsOlder());
 #else
-			depends_l += ::sprintf(depends + depends_l, " depOld(%llx)", (*i)->GetDependsOlder());
+			depends_l += ::sprintf(depends + depends_l, " depOld(%llx)", (long long)((*i)->GetDependsOlder()));
 #endif
 		}
 


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 00:19:47 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  8 Feb 2006 00:19:47 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r408 - box/chris/win32/vc2005-compile-fixes
Message-ID: <20060208001947.2BF8394@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-08 00:19:40 +0000 (Wed, 08 Feb 2006)
New Revision: 408

Modified:
   box/chris/win32/vc2005-compile-fixes/configure.ac
Log:
* configure.ac
- Detect if we need to link with pcreposix.dll to get regex functions


Modified: box/chris/win32/vc2005-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-08 00:19:01 UTC (rev 407)
+++ box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-08 00:19:40 UTC (rev 408)
@@ -85,6 +85,9 @@
 AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])
 AC_CHECK_HEADERS([sys/xattr.h])
 
+if test "$ac_cv_header_regex_h" = "yes"; then
+  AC_SEARCH_LIBS([regcomp], [pcreposix])
+fi
 
 ### Checks for typedefs, structures, and compiler characteristics.
 


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 00:20:26 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  8 Feb 2006 00:20:26 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r409 - box/chris/win32/vc2005-compile-fixes/docs/backup
Message-ID: <20060208002026.B401594@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-08 00:20:17 +0000 (Wed, 08 Feb 2006)
New Revision: 409

Modified:
   box/chris/win32/vc2005-compile-fixes/docs/backup/win32_build_on_cygwin_using_mingw.txt
Log:
* win32_build_on_cygwin_using_mingw.txt
- Describe how to build and install pcre on MinGW/Cygwin


Modified: box/chris/win32/vc2005-compile-fixes/docs/backup/win32_build_on_cygwin_using_mingw.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/docs/backup/win32_build_on_cygwin_using_mingw.txt	2006-02-08 00:19:40 UTC (rev 408)
+++ box/chris/win32/vc2005-compile-fixes/docs/backup/win32_build_on_cygwin_using_mingw.txt	2006-02-08 00:20:17 UTC (rev 409)
@@ -22,6 +22,23 @@
 	make
 	make install
 
+Download PCRE from 
+[http://prdownloads.sourceforge.net/pcre/pcre-6.3.tar.bz2?download]
+
+Open a Cygwin shell, and unpack PCRE:
+
+	tar xjvf pcre-6.3.tar.bz2
+
+Configure PCRE for MinGW compilation, and build and install it:
+	
+	cd pcre-6.3
+	export CFLAGS="-mno-cygwin"
+	./configure
+	make winshared
+	cp .libs/pcreposix.dll /bin
+	cp .libs/pcreposix.dll.a /usr/i686-pc-mingw32/lib
+	cp pcreposix.h /usr/i686-pc-mingw32/include/regex.h
+
 Now unpack the Box Backup sources, enter the source directory,
 and configure like this:
 


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 00:21:44 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  8 Feb 2006 00:21:44 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r410 - box/chris/win32/cygwin-compile-fixes/infrastructure/m4
Message-ID: <20060208002144.B94DF94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-08 00:21:31 +0000 (Wed, 08 Feb 2006)
New Revision: 410

Modified:
   box/chris/win32/cygwin-compile-fixes/infrastructure/m4/ax_check_mount_point.m4
Log:
* ax_check_mount_point.m4
- Cygwin needs <stdio.h> before <mntent.h>


Modified: box/chris/win32/cygwin-compile-fixes/infrastructure/m4/ax_check_mount_point.m4
===================================================================
--- box/chris/win32/cygwin-compile-fixes/infrastructure/m4/ax_check_mount_point.m4	2006-02-08 00:20:17 UTC (rev 409)
+++ box/chris/win32/cygwin-compile-fixes/infrastructure/m4/ax_check_mount_point.m4	2006-02-08 00:21:31 UTC (rev 410)
@@ -34,7 +34,10 @@
     #include <sys/mount.h>
     ]])
   # Linux
-  AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])
+  AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[
+    #include <stdio.h>
+    #include <mntent.h>
+    ]])
   # Solaris
   AC_CHECK_MEMBERS([struct mnttab.mnt_mountp],,, [[
     #include <stdio.h>


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 01:07:59 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  8 Feb 2006 01:07:59 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r411 - box/chris/win32/releases
Message-ID: <20060208010759.C66D494@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-08 00:48:57 +0000 (Wed, 08 Feb 2006)
New Revision: 411

Added:
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r410-backup-client-mingw32.zip
Log:
* boxbackup-0.09_plus2_vc2005fix_r410-backup-client-mingw32.zip
- Added a new release candidate, with regular expression support


Added: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r410-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r410-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 20:39:46 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed,  8 Feb 2006 20:39:46 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r412 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060208203946.8847C94@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-08 20:39:44 +0000 (Wed, 08 Feb 2006)
New Revision: 412

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
Log:
* BackupClientContext.cpp
- Log when keepalive packets are sent


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-08 00:48:57 UTC (rev 411)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-08 20:39:44 UTC (rev 412)
@@ -602,8 +602,17 @@
 void BackupClientContext::DoKeepAlive()
 {
 	if (!mpConnection)
+	{
+		::syslog(LOG_ERR, "DoKeepAlive() called with no connection!");
 		return;
+	}
 
+	if (mExtendedLogging)
+	{
+		::syslog(LOG_INFO, "DoKeepAlive() sending keep-alive "
+			"packet now");
+	}
+
 	mpConnection->QueryGetIsAlive();
 }
 


From boxbackup-dev@fluffy.co.uk  Wed Feb  8 21:43:31 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Wed, 8 Feb 2006 22:43:31 +0100
Subject: [Box Backup-dev] Solaris update
Message-ID: <02be01c62cf8$b44dd8b0$0301050a@stenorhem>

This is a multi-part message in MIME format.

------=_NextPart_000_02BB_01C62D01.15E03430
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

After a few days without looking at this I now started again...

* Solaris 10 x86 *

Ok, you need GNU tar for the tests to work since "-C" option does
not work in the same way with original tar. After installing GNU tar
(praise sunfreeware!) all tests pass (if you make sure you do not
have bbackupd or bbstored running when starting). :-)

* Solaris 10 Sparc *

GNU tar here as well...

** debug tests **

All tests pass with the change below (timing, 18 secs -> 28 secs).
Is that ok?

Index: test/bbackupd/testbbackupd.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- test/bbackupd/testbbackupd.cpp      (revision 411)
+++ test/bbackupd/testbbackupd.cpp      (working copy)
@@ -758,7 +758,7 @@
=20
                        printf("Keep on continuously updating file, =
check it is uploaded eventually\n");
=20
-                       for(int l =3D 0; l < 18; ++l)
+                       for(int l =3D 0; l < 28; ++l)
                        {
                                FILE *f =3D =
::fopen("testfiles/TestDir1/continousupdate", "w+");
                                TEST_THAT(f !=3D 0);


** release tests **

All tests pass except raidfile: 3431 failures similar to this one:

FAILURE: Condition [::memcmp(((char*)data) + seekpos[p], testbuff, 256) =
=3D=3D 0] fa
iled at testraidfile.cpp(186)
FAILURE: Condition [readstream3.GetPosition() =3D=3D pos] failed at =
testraidfile.cpp
(185)

------=_NextPart_000_02BB_01C62D01.15E03430
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>After a few days without looking at =
this I now=20
started again...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>* Solaris 10 x86 *</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Ok, you need GNU tar for the tests to =
work since=20
"-C" option does</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>not work in the same way with original =
tar. After=20
installing GNU tar</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>(praise sunfreeware!) all tests pass =
(if you make=20
sure you do not</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>have bbackupd or bbstored running when =
starting).=20
:-)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>* Solaris 10 Sparc *</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>GNU tar here as well...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>** debug tests **</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>All tests pass with the change below =
(timing, 18=20
secs -&gt; 28 secs).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is that ok?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Index:=20
test/bbackupd/testbbackupd.cpp<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D<BR>---=20
test/bbackupd/testbbackupd.cpp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (revision=20
411)<BR>+++ test/bbackupd/testbbackupd.cpp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

(working copy)<BR>@@ -758,7 +758,7=20
@@<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
printf("Keep on continuously updating file, check it is uploaded=20
eventually\n");<BR>&nbsp;<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;=20
for(int l =3D 0; l &lt; 18;=20
++l)<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
for(int l =3D 0; l &lt; 28;=20
++l)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
FILE *f =3D ::fopen("testfiles/TestDir1/continousupdate",=20
"w+");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
TEST_THAT(f !=3D 0);<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>** release tests **</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>All tests pass except raidfile: 3431 =
failures=20
similar to this one:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>FAILURE: Condition =
[::memcmp(((char*)data) +=20
seekpos[p], testbuff, 256) =3D=3D 0] fa<BR>iled at =
testraidfile.cpp(186)<BR>FAILURE:=20
Condition [readstream3.GetPosition() =3D=3D pos] failed at=20
testraidfile.cpp<BR>(185)<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_02BB_01C62D01.15E03430--


From boxbackup-dev@fluffy.co.uk  Thu Feb  9 08:20:35 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Thu, 9 Feb 2006 08:20:35 +0000
Subject: [Box Backup-dev] COMMIT r412 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
In-Reply-To: <20060208203946.8847C94@s0g0.pems.testserver.co.uk>
References: <20060208203946.8847C94@s0g0.pems.testserver.co.uk>
Message-ID: <B64B1251-8858-45A1-B914-B4CC036A4D69@fluffy.co.uk>

Why is this necessary? There's nothing special about the keep alive  
messages which would mean that the Protocol object wouldn't do the  
logging.

Ben


On 8 Feb 2006, at 20:39, subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-08 20:39:44 +0000 (Wed, 08 Feb 2006)
> New Revision: 412
>
> Modified:
>    box/chris/win32/vc2005-compile-fixes/bin/bbackupd/ 
> BackupClientContext.cpp
> Log:
> * BackupClientContext.cpp
> - Log when keepalive packets are sent
>
>
> Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/ 
> BackupClientContext.cpp
> ===================================================================
> --- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/ 
> BackupClientContext.cpp	2006-02-08 00:48:57 UTC (rev 411)
> +++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/ 
> BackupClientContext.cpp	2006-02-08 20:39:44 UTC (rev 412)
> @@ -602,8 +602,17 @@
>  void BackupClientContext::DoKeepAlive()
>  {
>  	if (!mpConnection)
> +	{
> +		::syslog(LOG_ERR, "DoKeepAlive() called with no connection!");
>  		return;
> +	}
>
> +	if (mExtendedLogging)
> +	{
> +		::syslog(LOG_INFO, "DoKeepAlive() sending keep-alive "
> +			"packet now");
> +	}
> +
>  	mpConnection->QueryGetIsAlive();
>  }
>
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Thu Feb  9 09:29:12 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 9 Feb 2006 09:29:12 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r412 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
In-Reply-To: <B64B1251-8858-45A1-B914-B4CC036A4D69@fluffy.co.uk>
References: <20060208203946.8847C94@s0g0.pems.testserver.co.uk>
 <B64B1251-8858-45A1-B914-B4CC036A4D69@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602090928000.14656@top.qwarx.com>

Hi Ben,

> Why is this necessary? There's nothing special about the keep alive 
> messages which would mean that the Protocol object wouldn't do the 
> logging.

Maybe it's not necessary, I didn't know that Protocol did logging and I 
wasn't sure why Gary wasn't seeing keepalives being sent, so I guessed 
that I might have removed some logging while merging his code.

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 |


From boxbackup-dev@fluffy.co.uk  Fri Feb 10 14:16:07 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 10 Feb 2006 14:16:07 +0000
Subject: [Box Backup-dev] COMMIT r412 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
In-Reply-To: <Pine.LNX.4.62.0602090928000.14656@top.qwarx.com>
References: <20060208203946.8847C94@s0g0.pems.testserver.co.uk> <B64B1251-8858-45A1-B914-B4CC036A4D69@fluffy.co.uk> <Pine.LNX.4.62.0602090928000.14656@top.qwarx.com>
Message-ID: <9693FCDA-278E-465F-A248-57DB5C2B12B3@fluffy.co.uk>

On 9 Feb 2006, at 09:29, Chris Wilson wrote:

> Hi Ben,
>
>> Why is this necessary? There's nothing special about the keep  
>> alive messages which would mean that the Protocol object wouldn't  
>> do the logging.
>
> Maybe it's not necessary, I didn't know that Protocol did logging  
> and I wasn't sure why Gary wasn't seeing keepalives being sent, so  
> I guessed that I might have removed some logging while merging his  
> code.

I don't think so. Logging is fairly well embedded in the Protocol class.

Ben




From boxbackup-dev@fluffy.co.uk  Fri Feb 10 17:37:54 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 10 Feb 2006 17:37:54 +0000
Subject: [Box Backup-dev] 0.10 anyone?
Message-ID: <855AA712-5F0F-4CC6-9127-8F6B657B6A5D@fluffy.co.uk>

Hi,

What's currently outstanding for a 0.10 release?

There seems to be quite a few Win32 issues, which is only to be  
expected for such a new thing. Do we want to hold off a release for  
these?

Ben




From boxbackup-dev@fluffy.co.uk  Fri Feb 10 17:53:20 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Fri, 10 Feb 2006 18:53:20 +0100
Subject: [Box Backup-dev] 0.10 anyone?
References: <855AA712-5F0F-4CC6-9127-8F6B657B6A5D@fluffy.co.uk>
Message-ID: <002e01c62e6a$e177e560$0301050a@stenorhem>

> What's currently outstanding for a 0.10 release?
> 


Maybe the raidfile errors on Solaris?

Stefan


From boxbackup-dev@fluffy.co.uk  Fri Feb 10 19:45:08 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Fri, 10 Feb 2006 11:45:08 -0800 (PST)
Subject: [Box Backup-dev] 0.10 anyone?
In-Reply-To: <855AA712-5F0F-4CC6-9127-8F6B657B6A5D@fluffy.co.uk>
Message-ID: <20060210194508.91512.qmail@web36714.mail.mud.yahoo.com>

Ben,

> There seems to be quite a few Win32 issues, which is only to be  
> expected for such a new thing. Do we want to hold off a release for  
> these?

I would say yes, since there still might be required changes on the server side (thus affecting
other releases).

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Fri Feb 10 19:50:34 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 10 Feb 2006 19:50:34 +0000
Subject: [Box Backup-dev] 0.10 anyone?
In-Reply-To: <20060210194508.91512.qmail@web36714.mail.mud.yahoo.com>
References: <20060210194508.91512.qmail@web36714.mail.mud.yahoo.com>
Message-ID: <A03D3E1E-3E6B-476C-B57B-B21A0B60EBD3@fluffy.co.uk>

On 10 Feb 2006, at 19:45, Gary wrote:

> Ben,
>
>> There seems to be quite a few Win32 issues, which is only to be
>> expected for such a new thing. Do we want to hold off a release for
>> these?
>
> I would say yes, since there still might be required changes on the  
> server side (thus affecting
> other releases).

What were you thinking about changing on the server?

Would it be a good plan to get the UNIX release done, seeing as it  
has some nifty new bits, and release 0.11 to clear up Win32 shortly  
afterwards?

Ben




From boxbackup-dev@fluffy.co.uk  Fri Feb 10 21:41:55 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Fri, 10 Feb 2006 13:41:55 -0800 (PST)
Subject: [Box Backup-dev] 0.10 anyone?
In-Reply-To: <A03D3E1E-3E6B-476C-B57B-B21A0B60EBD3@fluffy.co.uk>
Message-ID: <20060210214155.52123.qmail@web36711.mail.mud.yahoo.com>

> What were you thinking about changing on the server?

We are still running into one SSL-timeout related issue; it is not clear whether it is the result
of a missing KeepAlive() set, or, perhaps something new that has come up when it comes to diffing
large files (mentioned in the previous thread).

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Fri Feb 10 22:55:24 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Fri, 10 Feb 2006 22:55:24 +0000 (GMT)
Subject: [Box Backup-dev] 0.10 anyone?
In-Reply-To: <A03D3E1E-3E6B-476C-B57B-B21A0B60EBD3@fluffy.co.uk>
References: <20060210194508.91512.qmail@web36714.mail.mud.yahoo.com>
 <A03D3E1E-3E6B-476C-B57B-B21A0B60EBD3@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602102254490.14656@top.qwarx.com>

Hi Ben,

> Would it be a good plan to get the UNIX release done, seeing as it has 
> some nifty new bits, and release 0.11 to clear up Win32 shortly 
> afterwards?

I'd like to see things like SSL keepalives tested on other platforms, so 
I'd prefer that option, yes.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 00:30:08 2006
From: boxbackup-dev@fluffy.co.uk (Charles Lecklider)
Date: Sat, 11 Feb 2006 00:30:08 +0000
Subject: [Box Backup-dev] 0.10 anyone?
In-Reply-To: <A03D3E1E-3E6B-476C-B57B-B21A0B60EBD3@fluffy.co.uk>
References: <20060210194508.91512.qmail@web36714.mail.mud.yahoo.com> <A03D3E1E-3E6B-476C-B57B-B21A0B60EBD3@fluffy.co.uk>
Message-ID: <43ED3010.80607@invis.net>

Ben Summers wrote:
> Would it be a good plan to get the UNIX release done, seeing as it has
> some nifty new bits, and release 0.11 to clear up Win32 shortly afterwards?

Yes. The sooner there's a fixed point for the Win32 stuff to work from
the better.

Most of the things on the Win32 bug list will be resolved by changing to
a proper Win32 architecture, i.e. overlapped IO. Timeouts, keep-alives,
and interrupts are all much easier when done the way Windows works, and
while it's not a small change it's less work than trying to fix the
current design.

My view is to disable anything that can't be fixed simply, get the
release out, and work from there. As long as it builds clean with MSVC
that's enough for this release.

-C


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 00:54:46 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 11 Feb 2006 00:54:46 +0000
Subject: [Box Backup-dev] make clean
In-Reply-To: <FAAD7550-258C-4C6B-B015-703A683AD4E9@fluffy.co.uk>
References: <007901c62895$c5ad60b0$1601060a@cs>
 <Pine.LNX.4.62.0602030923210.14656@top.qwarx.com>
 <FAAD7550-258C-4C6B-B015-703A683AD4E9@fluffy.co.uk>
Message-ID: <1139619287.5096.19.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-03 at 09:45 +0000, Ben Summers wrote:
> I never use make in the top level while developing. If you make in a  
> test/* directory, it all works as you need. make in the top level is  
> really just for people compiling it ready to actually use.

Yes the build system is rather unusual and takes a while to get used to.
I now work the way Ben does because it's easier than fighting it, and it
does work that way. (Although the dependencies still aren't 100%, though
I haven't ever attempted to track down the problem.)

I would like to be able to build and rebuild with dependencies from the
top level though, it's one of the things I'd like to fix one day. Also
I'd prefer the release/debug split to be a flag or target passed to
make, rather than depending on the directory you are in.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 01:03:37 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 11 Feb 2006 01:03:37 +0000
Subject: [Box Backup-dev] Solaris update
In-Reply-To: <02be01c62cf8$b44dd8b0$0301050a@stenorhem>
References: <02be01c62cf8$b44dd8b0$0301050a@stenorhem>
Message-ID: <1139619817.5096.25.camel@avenin.ebourne.me.uk>

On Wed, 2006-02-08 at 22:43 +0100, Stefan Norlin wrote:
> * Solaris 10 x86 *
>  
> Ok, you need GNU tar for the tests to work since "-C" option does
> not work in the same way with original tar. After installing GNU tar
> (praise sunfreeware!) all tests pass (if you make sure you do not
> have bbackupd or bbstored running when starting). :-)

In what way does the -C option behave differently? Maybe we can change
it to work for both?

> ** debug tests **
>  
> All tests pass with the change below (timing, 18 secs -> 28 secs).
> Is that ok?

Yes, I think that should be fine.

> ** release tests **
>  
> All tests pass except raidfile: 3431 failures similar to this one:

Hmm, interesting that they pass on debug. Did you try this a couple of
times with each to check it is repeatable?
 
> FAILURE: Condition [::memcmp(((char*)data) + seekpos[p], testbuff,
> 256) == 0] fa
> iled at testraidfile.cpp(186)
> FAILURE: Condition [readstream3.GetPosition() == pos] failed at
> testraidfile.cpp
> (185)

Those failures are inside the testReadingFileContents function, which is
called from all over the place. Unfortunately in release mode the tests
don't output much progress information, so the full log probably
wouldn't help.

The best thing to do would be to breakpoint on that failure and get a
backtrace of the first such occurrence.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 01:14:10 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 11 Feb 2006 01:14:10 +0000
Subject: [Box Backup-dev] 0.10 anyone?
In-Reply-To: <855AA712-5F0F-4CC6-9127-8F6B657B6A5D@fluffy.co.uk>
References: <855AA712-5F0F-4CC6-9127-8F6B657B6A5D@fluffy.co.uk>
Message-ID: <1139620451.5096.35.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-10 at 17:37 +0000, Ben Summers wrote:
> Hi,
> 
> What's currently outstanding for a 0.10 release?
> 
> There seems to be quite a few Win32 issues, which is only to be  
> expected for such a new thing. Do we want to hold off a release for  
> these?

I feel we shouldn't try and make 0.10 perfect. There's no harm in
following up with 0.11 in a month or two if necessary.

I think we should only hold 0.10 if there are any known data integrity
issues in any configuration, or if the normal usage just doesn't work on
a supported platform.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 02:28:53 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 02:28:53 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r413 - in box/trunk: . infrastructure
Message-ID: <20060211022853.E762A95@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-11 02:28:52 +0000 (Sat, 11 Feb 2006)
New Revision: 413

Modified:
   box/trunk/configure.ac
   box/trunk/infrastructure/BoxPlatform.pm.in
Log:
Workaround for autoconf's unexpanded directory substitutions vs. the current Makefile not being able to expand them itself.

Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2006-02-08 20:39:44 UTC (rev 412)
+++ box/trunk/configure.ac	2006-02-11 02:28:52 UTC (rev 413)
@@ -175,7 +175,19 @@
   LIBS="-Wl,-Bstatic $LIBS -Wl,-Bdynamic"
 fi
 
+## Kludge to allow makeparcels.pl to use bindir. This is not a good long term
+## solution because it prevents use of "make exec_prefix=/some/dir"
+saved_prefix=$prefix
+saved_exec_prefix=$exec_prefix
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+bindir_expanded=`eval "echo $bindir"`
+bindir_expanded=`eval "echo $bindir_expanded"`
+prefix=$saved_prefix
+exec_prefix=$saved_exec_prefix
+AC_SUBST([bindir_expanded])
 
+
 ### Output files
 AC_CONFIG_FILES([infrastructure/BoxPlatform.pm])
 AC_OUTPUT

Modified: box/trunk/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/trunk/infrastructure/BoxPlatform.pm.in	2006-02-08 20:39:44 UTC (rev 412)
+++ box/trunk/infrastructure/BoxPlatform.pm.in	2006-02-11 02:28:52 UTC (rev 413)
@@ -13,9 +13,9 @@
 	chomp $build_cpu;
 	# Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1
 	# Box Backup tried on Win2000,XP only :)
-	
-    $build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
 
+	$build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
+
 	$make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make';
 	$bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' && $build_os ne "SunOS");
 
@@ -34,10 +34,10 @@
 	$product_name = <VERSION>;
 	chomp $product_name;
 	close VERSION;
-	
+
 	# where to put the files
-	$install_into_dir = '@bindir@';
-	
+	$install_into_dir = '@bindir_expanded@';
+
 	# if it's Darwin,
 	if($build_os eq 'Darwin')
 	{


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 02:42:54 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 02:42:54 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r414 - in box/trunk: . lib/raidfile
Message-ID: <20060211024254.5938495@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-11 02:42:50 +0000 (Sat, 11 Feb 2006)
New Revision: 414

Modified:
   box/trunk/configure.ac
   box/trunk/lib/raidfile/RaidFileWrite.cpp
Log:
Added workaround option for GCC on the PPC platform. This is a manually invoked option because I do not know under what circumstances (eg. versions etc) the problem occurs.
If the raidfile test fails in release mode but passes in debug mode then try this option and see if it fixes it.

Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2006-02-11 02:28:52 UTC (rev 413)
+++ box/trunk/configure.ac	2006-02-11 02:42:50 UTC (rev 414)
@@ -10,6 +10,17 @@
 AC_CANONICAL_SYSTEM
 test -s install-sh || rm install-sh
 
+
+### Temporary hacks
+AC_ARG_ENABLE(
+  [ppc-workaround],
+  [AC_HELP_STRING([--enable-ppc-workaround],
+                  [Enable a workaround for a compiler bug in GCC on PPC platforms (raidfile tests fail).])])
+if test "x$enable_ppc_workaround" = "xyes"; then
+  AC_DEFINE([HAVE_PPC_WORKAROUND], 1, [Define to 1 to workaround a GCC compiler bug on PPC])
+fi
+
+
 ### Checks for programs.
 
 AC_LANG([C++])

Modified: box/trunk/lib/raidfile/RaidFileWrite.cpp
===================================================================
--- box/trunk/lib/raidfile/RaidFileWrite.cpp	2006-02-11 02:28:52 UTC (rev 413)
+++ box/trunk/lib/raidfile/RaidFileWrite.cpp	2006-02-11 02:42:50 UTC (rev 414)
@@ -462,6 +462,9 @@
 						ASSERT(sizeof(RaidFileRead::FileSizeType) >= sizeof(off_t));
 						int sizePos = (blockSize/sizeof(unsigned int)) - 2;
 						RaidFileRead::FileSizeType sw = box_hton64(writeFileStat.st_size);
+#ifdef HAVE_PPC_WORKAROUND
+                                                static RaidFileRead::FileSizeType ppcWorkaround = sw;
+#endif
 						unsigned int *psize = (unsigned int *)(&sw);
 						pparity[sizePos+0] = pstripe1[sizePos+0] ^ psize[0];
 						pparity[sizePos+1] = pstripe1[sizePos+1] ^ psize[1];


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 02:49:48 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 11 Feb 2006 02:49:48 +0000
Subject: [Box Backup-dev] Solaris update
In-Reply-To: <02be01c62cf8$b44dd8b0$0301050a@stenorhem>
References: <02be01c62cf8$b44dd8b0$0301050a@stenorhem>
Message-ID: <1139626188.5944.4.camel@avenin.ebourne.me.uk>

On Wed, 2006-02-08 at 22:43 +0100, Stefan Norlin wrote:
> All tests pass except raidfile: 3431 failures similar to this one:
>  
> FAILURE: Condition [::memcmp(((char*)data) + seekpos[p], testbuff,
> 256) == 0] fa
> iled at testraidfile.cpp(186)
> FAILURE: Condition [readstream3.GetPosition() == pos] failed at
> testraidfile.cpp
> (185)

You know, these failures look just like the ones on the PPC platform.
Also, that only fails on the release test due to an apparent
optimisation bug.

Furthermore both platforms are big endian and the compiler bug is right
where the box_hton64 is called, which is stripped out by the
pre-processor in the big endian case.

Try the new --enable-ppc-workaround option to configure in trunk. It is
entirely likely that the optimisation bug occurs in the generic
optimisation phases of GCC before the architecture specific stuff.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 08:46:35 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 08:46:35 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r415 - box/trunk/infrastructure
Message-ID: <20060211084635.8A02A95@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-11 08:46:34 +0000 (Sat, 11 Feb 2006)
New Revision: 415

Modified:
   box/trunk/infrastructure/makeparcels.pl
Log:
Remove extra version number on OpenBSD -- functionality provided elsewhere

Modified: box/trunk/infrastructure/makeparcels.pl
===================================================================
--- box/trunk/infrastructure/makeparcels.pl	2006-02-11 02:42:50 UTC (rev 414)
+++ box/trunk/infrastructure/makeparcels.pl	2006-02-11 08:46:34 UTC (rev 415)
@@ -4,13 +4,6 @@
 use lib 'infrastructure';
 use BoxPlatform;
 
-my $os_suffix = '';
-if($build_os eq 'OpenBSD')
-{
-	$os_suffix = `uname -r`;
-	$os_suffix =~ tr/0-9//cd;
-}
-
 my @parcels;
 my %parcel_contents;
 
@@ -169,7 +162,7 @@
 
 sub parcel_root
 {
-	$product_name.'-'.$product_version.'-'.$_[0].'-'.$target_os.$os_suffix
+	$product_name.'-'.$product_version.'-'.$_[0].'-'.$target_os
 }
 
 sub parcel_dir


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 08:52:33 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 11 Feb 2006 08:52:33 +0000
Subject: [Box Backup-dev] make clean
In-Reply-To: <1139619287.5096.19.camel@avenin.ebourne.me.uk>
References: <007901c62895$c5ad60b0$1601060a@cs> <Pine.LNX.4.62.0602030923210.14656@top.qwarx.com> <FAAD7550-258C-4C6B-B015-703A683AD4E9@fluffy.co.uk> <1139619287.5096.19.camel@avenin.ebourne.me.uk>
Message-ID: <0C2D5F10-13FA-42BC-A48D-B4B3FEF437CD@fluffy.co.uk>

On 11 Feb 2006, at 00:54, Martin Ebourne wrote:

> On Fri, 2006-02-03 at 09:45 +0000, Ben Summers wrote:
>> I never use make in the top level while developing. If you make in a
>> test/* directory, it all works as you need. make in the top level is
>> really just for people compiling it ready to actually use.
>
> Yes the build system is rather unusual and takes a while to get  
> used to.
> I now work the way Ben does because it's easier than fighting it,  
> and it
> does work that way. (Although the dependencies still aren't 100%,  
> though
> I haven't ever attempted to track down the problem.)

Unusual? Maybe... Unfortunately other build systems didn't quite work  
the way I needed for some other stuff I was doing.

>
> I would like to be able to build and rebuild with dependencies from  
> the
> top level though, it's one of the things I'd like to fix one day. Also
> I'd prefer the release/debug split to be a flag or target passed to
> make, rather than depending on the directory you are in.

Are you sure? In one of the test/* (or bin/* or whatever), you pass a  
flag to make it build the release version.

With BSD make, do

   make -D RELEASE

and with GNU make do

   make RELEASE=1

Of course, the object files and executables are made within the  
release/ tree to keep them separate from the debug versions.

Ben




From boxbackup-dev@fluffy.co.uk  Sat Feb 11 09:08:57 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 11 Feb 2006 09:08:57 +0000
Subject: [Box Backup-dev] 0.10 anyone?
In-Reply-To: <1139620451.5096.35.camel@avenin.ebourne.me.uk>
References: <855AA712-5F0F-4CC6-9127-8F6B657B6A5D@fluffy.co.uk> <1139620451.5096.35.camel@avenin.ebourne.me.uk>
Message-ID: <95E8AC27-9F76-479F-A477-A2DD72B82AC7@fluffy.co.uk>

On 11 Feb 2006, at 01:14, Martin Ebourne wrote:

> On Fri, 2006-02-10 at 17:37 +0000, Ben Summers wrote:
>> Hi,
>>
>> What's currently outstanding for a 0.10 release?
>>
>> There seems to be quite a few Win32 issues, which is only to be
>> expected for such a new thing. Do we want to hold off a release for
>> these?
>
> I feel we shouldn't try and make 0.10 perfect. There's no harm in
> following up with 0.11 in a month or two if necessary.
>
> I think we should only hold 0.10 if there are any known data integrity
> issues in any configuration, or if the normal usage just doesn't  
> work on
> a supported platform.


I think the consensus is to release 0.10, and do another release  
shortly afterwards to get Win32 native perfect.

Work to be done before:

* Work out what's up with Solaris

* Test SSL keep-alives and diff timer -- do we know they actually  
work? (There is some uncertainty from the Win32 platform, but maybe  
that's because the timer is done in a different way.)

* Review and merge the latest Win32 changes

* Decide whether the Win32 client might need anything else from the  
server -- it would be good for 0.11 clients not to need an upgrade on  
the server from 0.10.

* Test on all "supported" platforms, sign off release

Ben





From boxbackup-dev@fluffy.co.uk  Sat Feb 11 09:40:33 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 09:40:33 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r416 - box/trunk/bin/bbstored
Message-ID: <20060211094033.A848C95@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-11 09:40:32 +0000 (Sat, 11 Feb 2006)
New Revision: 416

Modified:
   box/trunk/bin/bbstored/backupprotocol.txt
Log:
Bump ident string version to stop new clients connecting to old servers

Modified: box/trunk/bin/bbstored/backupprotocol.txt
===================================================================
--- box/trunk/bin/bbstored/backupprotocol.txt	2006-02-11 08:46:34 UTC (rev 415)
+++ box/trunk/bin/bbstored/backupprotocol.txt	2006-02-11 09:40:32 UTC (rev 416)
@@ -3,7 +3,7 @@
 #
 
 Name 				Backup
-IdentString			Box-Backup:v=B
+IdentString			Box-Backup:v=C
 ServerContextClass	BackupContext	BackupContext.h
 
 ClientType		Filename	BackupStoreFilenameClear	BackupStoreFilenameClear.h


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 12:06:21 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Sat, 11 Feb 2006 13:06:21 +0100
Subject: [Box Backup-dev] Solaris update
References: <02be01c62cf8$b44dd8b0$0301050a@stenorhem> <1139626188.5944.4.camel@avenin.ebourne.me.uk>
Message-ID: <002e01c62f03$9295dc60$0301050a@stenorhem>

> Try the new --enable-ppc-workaround option to configure in trunk. It is
> entirely likely that the optimisation bug occurs in the generic
> optimisation phases of GCC before the architecture specific stuff.

Bingo!

Now all releases tests pass on Solaris 10 (Sparc) when compiling
from trunk with your new --enable-ppc-workaround option.

Great!

Stefan


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 13:03:08 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 13:03:08 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r417 - box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005
Message-ID: <20060211130308.DB56895@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 13:03:03 +0000 (Sat, 11 Feb 2006)
New Revision: 417

Modified:
   box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj
Log:
* common.vcproj
- Added BoxConfig.h to common project, to make it easier to edit


Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj	2006-02-11 09:40:32 UTC (rev 416)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj	2006-02-11 13:03:03 UTC (rev 417)
@@ -4,6 +4,7 @@
 	Version="8.00"
 	Name="common"
 	ProjectGUID="{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
+	RootNamespace="common"
 	Keyword="Win32Proj"
 	>
 	<Platforms>
@@ -503,6 +504,10 @@
 						>
 					</File>
 					<File
+						RelativePath="..\..\..\lib\common\BoxConfig.h"
+						>
+					</File>
+					<File
 						RelativePath="..\..\..\lib\common\BoxException.h"
 						>
 					</File>


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 13:04:47 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 13:04:47 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r418 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060211130447.9FEB795@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 13:04:45 +0000 (Sat, 11 Feb 2006)
New Revision: 418

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.h
- Use #defines to replace chmod, chdir, unlink, getcwd, stat, lstat, fstat
  on MSVC, instead of inline functions, which don't work on MSVC (but work
  better than #defines on MinGW)


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-11 13:03:03 UTC (rev 417)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-11 13:04:45 UTC (rev 418)
@@ -113,33 +113,44 @@
 	return 0;
 }
 
-inline int chmod(const char * Filename, int mode)
-{
-	// indicate success
-	return 0;
-}
+int   emu_chdir (const char* pDirName);
+int   emu_unlink(const char* pFileName);
+char* emu_getcwd(char* pBuffer, int BufSize);
 
-int emu_chdir(const char* pDirName);
+#ifdef _MSC_VER
+	inline int emu_chmod(const char * Filename, int mode)
+	{
+		// indicate success
+		return 0;
+	}
 
-inline int chdir(const char* pDirName)
-{
-	return emu_chdir(pDirName);
-}
+	#define chmod(file, mode)    emu_chmod(file, mode)
+	#define chdir(directory)     emu_chdir(directory)
+	#define unlink(file)         emu_unlink(file)
+	#define getcwd(buffer, size) emu_getcwd(buffer, size)
+#else
+	inline int chmod(const char * Filename, int mode)
+	{
+		// indicate success
+		return 0;
+	}
 
-char* emu_getcwd(char* pBuffer, int BufSize);
+	inline int chdir(const char* pDirName)
+	{
+		return emu_chdir(pDirName);
+	}
 
-inline char* getcwd(char* pBuffer, int BufSize)
-{
-	return emu_getcwd(pBuffer, BufSize);
-}
+	inline char* getcwd(char* pBuffer, int BufSize)
+	{
+		return emu_getcwd(pBuffer, BufSize);
+	}
 
-int emu_unlink(const char* pFileName);
+	inline int unlink(const char* pFileName)
+	{
+		return emu_unlink(pFileName);
+	}
+#endif
 
-inline int unlink(const char* pFileName)
-{
-	return emu_unlink(pFileName);
-}
-
 //I do not perceive a need to change the user or group on a backup client
 //at any rate the owner of a service can be set in the service settings
 inline int setegid(int)
@@ -432,18 +443,24 @@
 	return retVal;
 }
 
-inline int stat(const char* filename, struct stat* stat)
-{
-	return emu_stat(filename, stat);
-}
-inline int lstat(const char* filename, struct stat* stat)
-{
-	return emu_stat(filename, stat);
-}
-inline int fstat(HANDLE handle, struct stat* stat)
-{
-	return emu_fstat(handle, stat);
-}
+#ifdef _MSC_VER
+	#define stat(filename,  struct) emu_stat (filename, struct)
+	#define lstat(filename, struct) emu_stat (filename, struct)
+	#define fstat(handle,   struct) emu_fstat(handle,   struct)
+#else
+	inline int stat(const char* filename, struct stat* stat)
+	{
+		return emu_stat(filename, stat);
+	}
+	inline int lstat(const char* filename, struct stat* stat)
+	{
+		return emu_stat(filename, stat);
+	}
+	inline int fstat(HANDLE handle, struct stat* stat)
+	{
+		return emu_fstat(handle, stat);
+	}
+#endif
 
 int poll(struct pollfd *ufds, unsigned long nfds, int timeout);
 bool EnableBackupRights( void );


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 13:06:51 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 13:06:51 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r419 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060211130651.3636195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 13:06:49 +0000 (Sat, 11 Feb 2006)
New Revision: 419

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp
Log:
* WinNamedPipeStream.cpp
- Use Close() method to properly close sockets if ConnectNamedPipe fails
- Detect and fix mIsConnected with no socket handle
- Null the socket handle and set mIsConnected to FALSE even if CloseHandle
  fails
- Use upper-case constants (TRUE, FALSE) instead of lower case


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp	2006-02-11 13:04:45 UTC (rev 418)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp	2006-02-11 13:06:49 UTC (rev 419)
@@ -100,8 +100,7 @@
 	{
 		::syslog(LOG_ERR, "ConnectNamedPipe failed: %d", 
 			GetLastError());
-		CloseHandle(mSocketHandle);
-		mSocketHandle = NULL;
+		Close();
 		THROW_EXCEPTION(ServerException, SocketOpenError)
 	}
 	
@@ -184,7 +183,7 @@
 	// Closed for reading at EOF?
 	if (NumBytesRead == 0)
 	{
-		mReadClosed = true;
+		mReadClosed = TRUE;
 	}
 	
 	return NumBytesRead;
@@ -224,7 +223,7 @@
 
 		if (!Success)
 		{
-			mWriteClosed = true;	// assume can't write again
+			mWriteClosed = TRUE;	// assume can't write again
 			THROW_EXCEPTION(ConnectionException, 
 				Conn_SocketWriteError)
 		}
@@ -243,8 +242,15 @@
 // --------------------------------------------------------------------------
 void WinNamedPipeStream::Close()
 {
-	if (mSocketHandle == NULL || !mIsConnected) 
+	if (mSocketHandle == NULL && mIsConnected)
 	{
+		fprintf(stderr, "Inconsistent connected state\n");
+		::syslog(LOG_ERR, "Inconsistent connected state");
+		mIsConnected = FALSE;
+	}
+
+	if (mSocketHandle == NULL) 
+	{
 		THROW_EXCEPTION(ServerException, BadSocketHandle)
 	}
 
@@ -265,14 +271,16 @@
 		mIsServer = false;
 	}
 
-	if (!CloseHandle(mSocketHandle))
+	bool result = CloseHandle(mSocketHandle);
+
+	mSocketHandle = NULL;
+	mIsConnected = FALSE;
+
+	if (!result) 
 	{
 		::syslog(LOG_ERR, "CloseHandle failed: %d", GetLastError());
 		THROW_EXCEPTION(ServerException, SocketCloseError)
 	}
-	
-	mSocketHandle = NULL;
-	mIsConnected = FALSE;
 }
 
 // --------------------------------------------------------------------------


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 13:12:58 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 13:12:58 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r420 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060211131258.4C7A495@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 13:12:57 +0000 (Sat, 11 Feb 2006)
New Revision: 420

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- Start the helper thread when BackupDaemon is created, and don't delete
  it or close the socket from the main thread (race condition)
- Simplified BackupDaemon::Run()
- Don't print the "parameter" when starting the helper thread
- Allow the 100-second delay after catching an exception to be interrupted
  (after 10 seconds) by changing it to a normal inter-run sleep


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-11 13:06:49 UTC (rev 419)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-11 13:12:57 UTC (rev 420)
@@ -83,9 +83,29 @@
 // This prevents repetative cycles of load on the server
 #define		SYNC_PERIOD_RANDOM_EXTRA_TIME_SHIFT_BY	6
 
+#ifdef WIN32
 // --------------------------------------------------------------------------
 //
 // Function
+//		Name:    HelperThread()
+//		Purpose: Background thread function, called by Windows,
+//			calls the BackupDaemon's RunHelperThread method
+//			to listen for and act on control communications
+//		Created: 18/2/04
+//
+// --------------------------------------------------------------------------
+unsigned int WINAPI HelperThread( LPVOID lpParam ) 
+{ 
+	// printf( "Parameter = %lu.\n", *(DWORD*)lpParam ); 
+	((BackupDaemon *)lpParam)->RunHelperThread();
+
+	return 0;
+}
+#endif
+
+// --------------------------------------------------------------------------
+//
+// Function
 //		Name:    BackupDaemon::BackupDaemon()
 //		Purpose: constructor
 //		Created: 2003/10/08
@@ -104,6 +124,20 @@
 	{
 		mNotificationsSent[l] = false;
 	}
+
+#ifdef WIN32
+	// Create a thread to handle the named pipe
+	HANDLE hThread;
+	unsigned int dwThreadId;
+
+	hThread = (HANDLE) _beginthreadex( 
+        	NULL,                        // default security attributes 
+        	0,                           // use default stack size  
+        	HelperThread,                // thread function 
+        	this,                        // argument to thread function 
+        	0,                           // use default creation flags 
+        	&dwThreadId);                // returns the thread identifier 
+#endif
 }
 
 // --------------------------------------------------------------------------
@@ -227,30 +261,13 @@
 }
 
 #ifdef WIN32
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    HelperThread()
-//		Purpose: Background thread function, called by Windows,
-//			calls the BackupDaemon's RunHelperThread method
-//			to listen for and act on control communications
-//		Created: 18/2/04
-//
-// --------------------------------------------------------------------------
-unsigned int WINAPI HelperThread( LPVOID lpParam ) 
-{ 
-	printf( "Parameter = %lu.\n", *(DWORD*)lpParam ); 
-	((BackupDaemon *)lpParam)->RunHelperThread();
-
-	return 0;
-}
-
 void BackupDaemon::RunHelperThread(void)
 {
 	mpCommandSocketInfo = new CommandSocketInfo;
 	this->mReceivedCommandConn = false;
 
-	while ( !IsTerminateWanted() )
+	// loop until the parent process exits
+	while (TRUE)
 	{
 		try
 		{
@@ -290,7 +307,7 @@
 				bool disconnect = false;
 
 				// Command to process!
-				if(command == "quit" || command == "")
+				if (command == "quit" || command == "")
 				{
 					// Close the socket.
 					disconnect = true;
@@ -303,20 +320,20 @@
 					this->mSyncIsForcedOut = false;
 					sendOK = true;
 				}
-				else if(command == "force-sync")
+				else if (command == "force-sync")
 				{
 					// Sync now (forced -- overrides any SyncAllowScript)
 					this->mDoSyncFlagOut = true;
 					this->mSyncIsForcedOut = true;
 					sendOK = true;
 				}
-				else if(command == "reload")
+				else if (command == "reload")
 				{
 					// Reload the configuration
 					SetReloadConfigWanted();
 					sendOK = true;
 				}
-				else if(command == "terminate")
+				else if (command == "terminate")
 				{
 					// Terminate the daemon cleanly
 					SetTerminateWanted();
@@ -365,24 +382,21 @@
 void BackupDaemon::Run()
 {
 #ifdef WIN32
-
-	// Create a thread to handle the named pipe
-	HANDLE hThread;
-	unsigned int dwThreadId;
-
-	hThread = (HANDLE) _beginthreadex( 
-        	NULL,                        // default security attributes 
-        	0,                           // use default stack size  
-        	HelperThread,                // thread function 
-        	this,                        // argument to thread function 
-        	0,                           // use default creation flags 
-        	&dwThreadId);                // returns the thread identifier 
-
 	// init our own timer for file diff timeouts
 	InitTimer();
 
+	try
+	{
+		Run2();
+	}
+	catch (...)
+	{
+		FiniTimer();
+		throw;
+	}
+
+	FiniTimer();
 #else // ! WIN32
-
 	// Ignore SIGPIPE (so that if a command connection is broken, the daemon doesn't terminate)
 	::signal(SIGPIPE, SIG_IGN);
 
@@ -396,8 +410,6 @@
 		::unlink(socketName);
 		mpCommandSocketInfo->mListeningSocket.Listen(Socket::TypeUNIX, socketName);
 	}
-	
-#endif // WIN32
 
 	// Handle things nicely on exceptions
 	try
@@ -423,17 +435,13 @@
 
 		throw;
 	}
-	
+
 	// Clean up
 	if(mpCommandSocketInfo != 0)
 	{
 		delete mpCommandSocketInfo;
 		mpCommandSocketInfo = 0;
 	}
-
-#ifdef WIN32
-	// clean up windows specific stuff.
-	FiniTimer();
 #endif
 }
 
@@ -766,7 +774,12 @@
 						"to retry...", 
 						errorString, errorCode, 
 						errorSubCode);
-					::sleep(100);
+					::sleep(10);
+					nextSyncTime = currentSyncStartTime + 
+						SecondsToBoxTime(90) +
+						Random::RandomInt(
+							updateStoreInterval >> 
+							SYNC_PERIOD_RANDOM_EXTRA_TIME_SHIFT_BY);
 				}
 			}
 
@@ -1080,25 +1093,23 @@
 // --------------------------------------------------------------------------
 void BackupDaemon::CloseCommandConnection()
 {
+#ifndef WIN32
 	try
 	{
 		TRACE0("Closing command connection\n");
 		
-#ifdef WIN32
-		mpCommandSocketInfo->mListeningSocket.Close();
-#else
 		if(mpCommandSocketInfo->mpGetLine)
 		{
 			delete mpCommandSocketInfo->mpGetLine;
 			mpCommandSocketInfo->mpGetLine = 0;
 		}
 		mpCommandSocketInfo->mpConnectedSocket.reset();
-#endif
 	}
 	catch(...)
 	{
 		// Ignore any errors
 	}
+#endif
 }
 
 
@@ -1115,7 +1126,11 @@
 {
 	// The bbackupctl program can't rely on a state change, because it may never
 	// change if the server doesn't need to be contacted.
-	
+
+#ifdef __MINGW32__
+#warning race condition: what happens if socket is closed?
+#endif
+
 	if (mpCommandSocketInfo != NULL &&
 #ifdef WIN32
 	    mpCommandSocketInfo->mListeningSocket.IsConnected()
@@ -2119,17 +2134,6 @@
 // --------------------------------------------------------------------------
 BackupDaemon::CommandSocketInfo::~CommandSocketInfo()
 {
-#ifdef WIN32
-	try
-	{
-		mListeningSocket.Close();
-	}
-	catch(ServerException &e)
-	{
-		// ignore errors as we're closing down anyway
-	}
-#endif
-
 	if(mpGetLine)
 	{
 		delete mpGetLine;


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 13:23:06 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 13:23:06 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r421 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060211132306.C1DD495@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 13:23:04 +0000 (Sat, 11 Feb 2006)
New Revision: 421

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32
Log:
* config.h.win32
- Updated to more closely match the header currently generated by configure
  on MinGW


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32	2006-02-11 13:12:57 UTC (rev 420)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32	2006-02-11 13:23:04 UTC (rev 421)
@@ -1,12 +1,22 @@
-/* lib/common/config.h.  Generated by configure.  */
-/* lib/common/config.h.in.  Generated from configure.ac by autoheader.  */
+/* lib/common/BoxConfig.h.  Generated by configure.  */
+/* lib/common/BoxConfig.h.in.  Generated from configure.ac by autoheader.  */
+/* Hacked by hand to work for MSVC by Chris Wilson */
 
+/* Define to major version for BDB_VERSION */
+/* #undef BDB_VERSION_MAJOR */
+
+/* Define to minor version for BDB_VERSION */
+/* #undef BDB_VERSION_MINOR */
+
+/* Define to point version for BDB_VERSION */
+/* #undef BDB_VERSION_POINT */
+
+/* Name of the 64 bit endian swapping function */
+/* #undef BSWAP64 */
+
 /* Define to 1 if the `closedir' function returns void instead of `int'. */
-/* #undef CLOSEDIR_VOID */
+#define CLOSEDIR_VOID 1
 
-/* Define to the location of the Berkeley DB 1.85 header */
-/* #undef DB_HEADER */
-
 /* Define to 1 if non-aligned int16 access will fail */
 /* #undef HAVE_ALIGNED_ONLY_INT16 */
 
@@ -16,21 +26,13 @@
 /* Define to 1 if non-aligned int64 access will fail */
 /* #undef HAVE_ALIGNED_ONLY_INT64 */
 
-/* Define to 1 if Berkeley DB is available */
-/* #undef HAVE_DB */
+/* Define to 1 if you have the <asm/byteorder.h> header file. */
+/* #undef HAVE_ASM_BYTEORDER_H */
 
-/* Define to 1 if you have the <db1/db.h> header file. */
-/* #undef HAVE_DB1_DB_H */
+/* Define to 1 if BSWAP64 is defined to the name of a valid 64 bit endian
+   swapping function */
+/* #undef HAVE_BSWAP64 */
 
-/* Define to 1 if you have the <db3/db_185.h> header file. */
-/* #undef HAVE_DB3_DB_185_H */
-
-/* Define to 1 if you have the <db4/db_185.h> header file. */
-/* #undef HAVE_DB4_DB_185_H */
-
-/* Define to 1 if you have the <db_185.h> header file. */
-/* #undef HAVE_DB_185_H */
-
 /* Define to 1 if you have the <db.h> header file. */
 /* #undef HAVE_DB_H */
 
@@ -50,13 +52,20 @@
    don't. */
 #define HAVE_DECL_SO_PEERCRED 0
 
+/* Define to 1 if you have the declaration of `XATTR_NOFOLLOW', and to 0 if
+   you don't. */
+#define HAVE_DECL_XATTR_NOFOLLOW 0
+
 /* Define to 1 if #define of pragmas works */
 /* #undef HAVE_DEFINE_PRAGMA */
 
 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
    */
-// #define HAVE_DIRENT_H 1
+/* #undef HAVE_DIRENT_H */
 
+/* Define to 1 if you have the <editline/readline.h> header file. */
+/* #undef HAVE_EDITLINE_READLINE_H */
+
 /* define if the compiler supports exceptions */
 #define HAVE_EXCEPTIONS 
 
@@ -72,21 +81,27 @@
 /* Define to 1 if you have the `getpeereid' function. */
 /* #undef HAVE_GETPEEREID */
 
+/* Define to 1 if you have the `getpid' function. */
+#define HAVE_GETPID 1
+
+/* Define to 1 if you have the `getxattr' function. */
+/* #undef HAVE_GETXATTR */
+
 /* Define to 1 if you have the <history.h> header file. */
 /* #undef HAVE_HISTORY_H */
 
 /* Define to 1 if you have the <inttypes.h> header file. */
-/* #undef HAVE_INTTYPES_H */
+// #define HAVE_INTTYPES_H 1
 
 /* Define to 1 if you have the `kqueue' function. */
 /* #undef HAVE_KQUEUE */
 
-/* Define to 1 large file support is in use */
-/* #undef HAVE_LARGE_FILE_SUPPORT */
-
 /* Define to 1 if you have the `lchown' function. */
 /* #undef HAVE_LCHOWN */
 
+/* Define to 1 if you have the `lgetxattr' function. */
+/* #undef HAVE_LGETXATTR */
+
 /* Define to 1 if you have the `crypto' library (-lcrypto). */
 #define HAVE_LIBCRYPTO 1
 
@@ -99,9 +114,18 @@
 /* Define to 1 if you have the `z' library (-lz). */
 #define HAVE_LIBZ 1
 
+/* Define to 1 if you have the `listxattr' function. */
+/* #undef HAVE_LISTXATTR */
+
+/* Define to 1 if you have the `llistxattr' function. */
+/* #undef HAVE_LLISTXATTR */
+
 /* Define to 1 if syscall lseek requires a dummy middle parameter */
 /* #undef HAVE_LSEEK_DUMMY_PARAM */
 
+/* Define to 1 if you have the `lsetxattr' function. */
+/* #undef HAVE_LSETXATTR */
+
 /* Define to 1 if you have the <memory.h> header file. */
 #define HAVE_MEMORY_H 1
 
@@ -120,21 +144,25 @@
 /* Define to 1 if you have the <netinet/in.h> header file. */
 /* #undef HAVE_NETINET_IN_H */
 
-#define HAVE_PROCESS_H 1
-
 /* Define to 1 if SSL is pre-0.9.7 */
 /* #undef HAVE_OLD_SSL */
 
 /* Define to 1 if you have the <openssl/ssl.h> header file. */
 #define HAVE_OPENSSL_SSL_H 1
 
+/* Define to 1 if you have the <process.h> header file. */
+#define HAVE_PROCESS_H 1
+
+/* Define to 1 if you have the <pwd.h> header file. */
+/* #undef HAVE_PWD_H */
+
 /* Define to 1 (and set RANDOM_DEVICE) if a random device is available */
 /* #undef HAVE_RANDOM_DEVICE */
 
 /* Define to 1 if you have the <readline.h> header file. */
 /* #undef HAVE_READLINE_H */
 
-/* Define if your readline library has \`add_history' */
+/* Define if your readline library has add_history */
 /* #undef HAVE_READLINE_HISTORY */
 
 /* Define to 1 if you have the <readline/history.h> header file. */
@@ -144,11 +172,17 @@
 /* #undef HAVE_READLINE_READLINE_H */
 
 /* Define to 1 if you have the <regex.h> header file. */
-/* #undef HAVE_REGEX_H */
+// #define HAVE_REGEX_H 1
 
 /* Define to 1 if you have the `setproctitle' function. */
 /* #undef HAVE_SETPROCTITLE */
 
+/* Define to 1 if you have the `setxattr' function. */
+/* #undef HAVE_SETXATTR */
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
 /* Define to 1 if SSL is available */
 #define HAVE_SSL 1
 
@@ -163,7 +197,7 @@
 #define HAVE_STDBOOL_H 1
 
 /* Define to 1 if you have the <stdint.h> header file. */
-/* #undef HAVE_STDINT_H */
+// #define HAVE_STDINT_H 1
 
 /* Define to 1 if you have the <stdlib.h> header file. */
 #define HAVE_STDLIB_H 1
@@ -198,10 +232,16 @@
 /* Define to 1 if you have the `syscall' function. */
 /* #undef HAVE_SYSCALL */
 
+/* Define to 1 if you have the <syslog.h> header file. */
+/* #undef HAVE_SYSLOG_H */
+
 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
    */
 /* #undef HAVE_SYS_DIR_H */
 
+/* Define to 1 if you have the <sys/endian.h> header file. */
+/* #undef HAVE_SYS_ENDIAN_H */
+
 /* Define to 1 if you have the <sys/mnttab.h> header file. */
 /* #undef HAVE_SYS_MNTTAB_H */
 
@@ -212,32 +252,44 @@
    */
 /* #undef HAVE_SYS_NDIR_H */
 
+/* Define to 1 if you have the <sys/param.h> header file. */
+// #define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+/* #undef HAVE_SYS_SOCKET_H */
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #define HAVE_SYS_STAT_H 1
 
 /* Define to 1 if you have the <sys/syscall.h> header file. */
 /* #undef HAVE_SYS_SYSCALL_H */
 
+/* Define to 1 if you have the <sys/time.h> header file. */
+// #define HAVE_SYS_TIME_H 1
+
 /* Define to 1 if you have the <sys/types.h> header file. */
 #define HAVE_SYS_TYPES_H 1
 
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+/* Define to 1 if you have the <sys/wait.h> header file. */
 /* #undef HAVE_SYS_WAIT_H */
 
 /* Define to 1 if you have the <sys/xattr.h> header file. */
 /* #undef HAVE_SYS_XATTR_H */
 
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
 /* Define to 1 if the system has the type `uint16_t'. */
-// #define HAVE_UINT16_T 1
+#define HAVE_UINT16_T 1
 
 /* Define to 1 if the system has the type `uint32_t'. */
-// #define HAVE_UINT32_T 1
+#define HAVE_UINT32_T 1
 
 /* Define to 1 if the system has the type `uint64_t'. */
-// #define HAVE_UINT64_T 1
+#define HAVE_UINT64_T 1
 
 /* Define to 1 if the system has the type `uint8_t'. */
-// #define HAVE_UINT8_T 1
+#define HAVE_UINT8_T 1
 
 /* Define to 1 if you have the <unistd.h> header file. */
 // #define HAVE_UNISTD_H 1


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 14:49:39 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 14:49:39 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r422 - box/chris/win32
Message-ID: <20060211144939.A50F995@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 14:49:36 +0000 (Sat, 11 Feb 2006)
New Revision: 422

Added:
   box/chris/win32/support/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/support
- Created a directory for support tools (OpenSSL patches and patched version)
  for compilation with MSVC



From boxbackup-dev@fluffy.co.uk  Sat Feb 11 15:06:17 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 15:06:17 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r423 - box/chris/win32/support
Message-ID: <20060211150617.C0D4F95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 14:53:32 +0000 (Sat, 11 Feb 2006)
New Revision: 423

Added:
   box/chris/win32/support/openssl-0.9.8a-vc2005.zip
   box/chris/win32/support/openssl-0.9.8a-win32fix.patch
Log:
* openssl-0.9.8a-win32fix.patch
- Patch to make OpenSSL 0.9.8a compile with Visual Studio 2005

* openssl-0.9.8a-vc2005.zip
- OpenSSL 0.9.8a with patch applied


Added: box/chris/win32/support/openssl-0.9.8a-vc2005.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/support/openssl-0.9.8a-vc2005.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: box/chris/win32/support/openssl-0.9.8a-win32fix.patch
===================================================================
--- box/chris/win32/support/openssl-0.9.8a-win32fix.patch	2006-02-11 14:49:36 UTC (rev 422)
+++ box/chris/win32/support/openssl-0.9.8a-win32fix.patch	2006-02-11 14:53:32 UTC (rev 423)
@@ -0,0 +1,356 @@
+diff -ru openssl-0.9.8a/apps/ca.c openssl-0.9.8a-win32fix/apps/ca.c
+--- openssl-0.9.8a/apps/ca.c	2005-09-30 17:47:15.000000000 +0100
++++ openssl-0.9.8a-win32fix/apps/ca.c	2005-12-20 17:32:23.388875000 +0000
+@@ -845,7 +845,7 @@
+ 	       that to access().  However, time's too short to do that just
+ 	       now.
+ 	    */
+-		if (access(outdir,R_OK|W_OK|X_OK) != 0)
++		if (_access(outdir,R_OK|W_OK|X_OK) != 0)
+ 			{
+ 			BIO_printf(bio_err,"I am unable to access the %s directory\n",outdir);
+ 			perror(outdir);
+diff -ru openssl-0.9.8a/apps/s_apps.h openssl-0.9.8a-win32fix/apps/s_apps.h
+--- openssl-0.9.8a/apps/s_apps.h	2005-04-26 18:43:52.000000000 +0100
++++ openssl-0.9.8a-win32fix/apps/s_apps.h	2005-12-20 17:35:14.795125000 +0000
+@@ -118,7 +118,7 @@
+ #endif
+ 
+ #ifdef OPENSSL_SYS_MSDOS
+-#define _kbhit kbhit
++//#define _kbhit kbhit
+ #endif
+ 
+ #if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
+diff -ru openssl-0.9.8a/apps/s_client.c openssl-0.9.8a-win32fix/apps/s_client.c
+--- openssl-0.9.8a/apps/s_client.c	2005-10-01 00:38:19.000000000 +0100
++++ openssl-0.9.8a-win32fix/apps/s_client.c	2005-12-20 17:36:36.357625000 +0000
+@@ -924,7 +924,7 @@
+ #ifdef CHARSET_EBCDIC
+ 			ascii2ebcdic(&(sbuf[sbuf_off]),&(sbuf[sbuf_off]),sbuf_len);
+ #endif
+-			i=write(fileno(stdout),&(sbuf[sbuf_off]),sbuf_len);
++			i=_write(_fileno(stdout),&(sbuf[sbuf_off]),sbuf_len);
+ 
+ 			if (i <= 0)
+ 				{
+@@ -1011,7 +1011,7 @@
+ 				{
+ 				int j, lf_num;
+ 
+-				i=read(fileno(stdin),cbuf,BUFSIZZ/2);
++				i=_read(_fileno(stdin),cbuf,BUFSIZZ/2);
+ 				lf_num = 0;
+ 				/* both loops are skipped when i <= 0 */
+ 				for (j = 0; j < i; j++)
+@@ -1030,7 +1030,7 @@
+ 				assert(lf_num == 0);
+ 				}
+ 			else
+-				i=read(fileno(stdin),cbuf,BUFSIZZ);
++				i=_read(_fileno(stdin),cbuf,BUFSIZZ);
+ 
+ 			if ((!c_ign_eof) && ((i <= 0) || (cbuf[0] == 'Q')))
+ 				{
+diff -ru openssl-0.9.8a/apps/s_server.c openssl-0.9.8a-win32fix/apps/s_server.c
+--- openssl-0.9.8a/apps/s_server.c	2005-09-02 13:27:02.000000000 +0100
++++ openssl-0.9.8a-win32fix/apps/s_server.c	2005-12-20 17:34:43.576375000 +0000
+@@ -1291,7 +1291,7 @@
+ 				{
+ 				int j, lf_num;
+ 
+-				i=read(fileno(stdin), buf, bufsize/2);
++				i=_read(_fileno(stdin), buf, bufsize/2);
+ 				lf_num = 0;
+ 				/* both loops are skipped when i <= 0 */
+ 				for (j = 0; j < i; j++)
+@@ -1310,7 +1310,7 @@
+ 				assert(lf_num == 0);
+ 				}
+ 			else
+-				i=read(fileno(stdin),buf,bufsize);
++				i=_read(_fileno(stdin),buf,bufsize);
+ 			if (!s_quiet)
+ 				{
+ 				if ((i <= 0) || (buf[0] == 'Q'))
+@@ -1426,7 +1426,7 @@
+ #ifdef CHARSET_EBCDIC
+ 					ascii2ebcdic(buf,buf,i);
+ #endif
+-					write(fileno(stdout),buf,
++					_write(_fileno(stdout),buf,
+ 						(unsigned int)i);
+ 					if (SSL_pending(con)) goto again;
+ 					break;
+diff -ru openssl-0.9.8a/apps/s_socket.c openssl-0.9.8a-win32fix/apps/s_socket.c
+--- openssl-0.9.8a/apps/s_socket.c	2005-06-13 04:21:00.000000000 +0100
++++ openssl-0.9.8a-win32fix/apps/s_socket.c	2005-12-20 17:37:11.154500000 +0000
+@@ -276,7 +276,7 @@
+ #endif
+ 
+ 	if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1)
+-		{ close(s); perror("connect"); return(0); }
++		{ _close(s); perror("connect"); return(0); }
+ 	*sock=s;
+ 	return(1);
+ 	}
+Only in openssl-0.9.8a-win32fix/crypto/bf/asm: b_win32.asm
+diff -ru openssl-0.9.8a/crypto/bio/bss_file.c openssl-0.9.8a-win32fix/crypto/bio/bss_file.c
+--- openssl-0.9.8a/crypto/bio/bss_file.c	2005-09-29 21:18:05.000000000 +0100
++++ openssl-0.9.8a-win32fix/crypto/bio/bss_file.c	2005-12-20 16:53:47.557750000 +0000
+@@ -272,7 +272,7 @@
+ #endif
+ 		{
+ #if defined(OPENSSL_SYS_WINDOWS)
+-		int fd = fileno((FILE*)ptr);
++		int fd = _fileno((FILE*)ptr);
+ 		if (num & BIO_FP_TEXT)
+ 			_setmode(fd,_O_TEXT);
+ 		else
+diff -ru openssl-0.9.8a/crypto/des/enc_read.c openssl-0.9.8a-win32fix/crypto/des/enc_read.c
+--- openssl-0.9.8a/crypto/des/enc_read.c	2001-10-24 22:20:26.000000000 +0100
++++ openssl-0.9.8a-win32fix/crypto/des/enc_read.c	2005-12-20 16:50:42.245250000 +0000
+@@ -147,7 +147,7 @@
+ 	/* first - get the length */
+ 	while (net_num < HDRSIZE) 
+ 		{
+-		i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
++		i=_read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
+ #ifdef EINTR
+ 		if ((i == -1) && (errno == EINTR)) continue;
+ #endif
+@@ -169,7 +169,7 @@
+ 	net_num=0;
+ 	while (net_num < rnum)
+ 		{
+-		i=read(fd,(void *)&(net[net_num]),rnum-net_num);
++		i=_read(fd,(void *)&(net[net_num]),rnum-net_num);
+ #ifdef EINTR
+ 		if ((i == -1) && (errno == EINTR)) continue;
+ #endif
+diff -ru openssl-0.9.8a/crypto/des/enc_writ.c openssl-0.9.8a-win32fix/crypto/des/enc_writ.c
+--- openssl-0.9.8a/crypto/des/enc_writ.c	2001-10-24 22:20:26.000000000 +0100
++++ openssl-0.9.8a-win32fix/crypto/des/enc_writ.c	2005-12-20 16:51:06.839000000 +0000
+@@ -153,7 +153,7 @@
+ 		{
+ 		/* eay 26/08/92 I was not doing writing from where we
+ 		 * got up to. */
+-		i=write(fd,(void *)&(outbuf[j]),outnum-j);
++		i=_write(fd,(void *)&(outbuf[j]),outnum-j);
+ 		if (i == -1)
+ 			{
+ #ifdef EINTR
+diff -ru openssl-0.9.8a/crypto/rand/randfile.c openssl-0.9.8a-win32fix/crypto/rand/randfile.c
+--- openssl-0.9.8a/crypto/rand/randfile.c	2005-05-21 18:39:52.000000000 +0100
++++ openssl-0.9.8a-win32fix/crypto/rand/randfile.c	2005-12-20 16:56:38.385875000 +0000
+@@ -181,7 +181,7 @@
+ 	if (out == NULL) goto err;
+ 
+ #ifndef NO_CHMOD
+-	chmod(file,0600);
++	_chmod(file,0600);
+ #endif
+ 	n=RAND_DATA;
+ 	for (;;)
+diff -ru openssl-0.9.8a/crypto/ui/ui_openssl.c openssl-0.9.8a-win32fix/crypto/ui/ui_openssl.c
+--- openssl-0.9.8a/crypto/ui/ui_openssl.c	2005-09-26 03:40:18.000000000 +0100
++++ openssl-0.9.8a-win32fix/crypto/ui/ui_openssl.c	2005-12-20 17:05:08.917125000 +0000
+@@ -678,7 +678,7 @@
+ #ifdef WIN16TTY
+ 		i=_inchar();
+ #else
+-		i=getch();
++		i=_getch();
+ #endif
+ 		if (i == '\r') i='\n';
+ 		*(p++)=i;
+diff -ru openssl-0.9.8a/engines/e_aep.c openssl-0.9.8a-win32fix/engines/e_aep.c
+--- openssl-0.9.8a/engines/e_aep.c	2005-07-16 12:13:08.000000000 +0100
++++ openssl-0.9.8a-win32fix/engines/e_aep.c	2005-12-20 17:05:52.448375000 +0000
+@@ -863,7 +863,7 @@
+ 	CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
+ 
+ #ifndef NETWARE_CLIB
+-	curr_pid = getpid();
++	curr_pid = _getpid();
+ #else
+ 	curr_pid = GetThreadID();
+ #endif
+diff -ru openssl-0.9.8a/ssl/d1_clnt.c openssl-0.9.8a-win32fix/ssl/d1_clnt.c
+--- openssl-0.9.8a/ssl/d1_clnt.c	2005-10-01 00:38:19.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/d1_clnt.c	2005-12-20 17:29:34.029500000 +0000
+@@ -144,7 +144,7 @@
+ int dtls1_connect(SSL *s)
+ 	{
+ 	BUF_MEM *buf=NULL;
+-	unsigned long Time=time(NULL),l;
++	unsigned long Time=(unsigned long)time(NULL),l;
+ 	long num1;
+ 	void (*cb)(const SSL *ssl,int type,int val)=NULL;
+ 	int ret= -1;
+@@ -544,7 +544,7 @@
+ 		/* else use the pre-loaded session */
+ 
+ 		p=s->s3->client_random;
+-		Time=time(NULL);			/* Time */
++		Time=(unsigned long)time(NULL);			/* Time */
+ 		l2n(Time,p);
+ 		RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
+ 
+diff -ru openssl-0.9.8a/ssl/d1_srvr.c openssl-0.9.8a-win32fix/ssl/d1_srvr.c
+--- openssl-0.9.8a/ssl/d1_srvr.c	2005-10-01 00:38:19.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/d1_srvr.c	2005-12-20 17:29:17.279500000 +0000
+@@ -144,7 +144,7 @@
+ int dtls1_accept(SSL *s)
+ 	{
+ 	BUF_MEM *buf;
+-	unsigned long l,Time=time(NULL);
++	unsigned long l,Time=(unsigned long)time(NULL);
+ 	void (*cb)(const SSL *ssl,int type,int val)=NULL;
+ 	long num1;
+ 	int ret= -1;
+@@ -666,7 +666,7 @@
+ 		{
+ 		buf=(unsigned char *)s->init_buf->data;
+ 		p=s->s3->server_random;
+-		Time=time(NULL);			/* Time */
++		Time=(unsigned long)time(NULL);			/* Time */
+ 		l2n(Time,p);
+ 		RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
+ 		/* Do the message type and length last */
+diff -ru openssl-0.9.8a/ssl/s23_clnt.c openssl-0.9.8a-win32fix/ssl/s23_clnt.c
+--- openssl-0.9.8a/ssl/s23_clnt.c	2005-08-06 00:52:07.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/s23_clnt.c	2005-12-20 17:28:27.607625000 +0000
+@@ -88,7 +88,7 @@
+ int ssl23_connect(SSL *s)
+ 	{
+ 	BUF_MEM *buf=NULL;
+-	unsigned long Time=time(NULL);
++	unsigned long Time=(unsigned long)time(NULL);
+ 	void (*cb)(const SSL *ssl,int type,int val)=NULL;
+ 	int ret= -1;
+ 	int new_state,state;
+@@ -236,7 +236,7 @@
+ #endif
+ 
+ 		p=s->s3->client_random;
+-		Time=time(NULL);			/* Time */
++		Time=(unsigned long)time(NULL);			/* Time */
+ 		l2n(Time,p);
+ 		if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
+ 			return -1;
+diff -ru openssl-0.9.8a/ssl/s23_srvr.c openssl-0.9.8a-win32fix/ssl/s23_srvr.c
+--- openssl-0.9.8a/ssl/s23_srvr.c	2005-10-11 11:16:20.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/s23_srvr.c	2005-12-20 17:25:18.326375000 +0000
+@@ -140,7 +140,7 @@
+ int ssl23_accept(SSL *s)
+ 	{
+ 	BUF_MEM *buf;
+-	unsigned long Time=time(NULL);
++	unsigned long Time=(unsigned long)time(NULL);
+ 	void (*cb)(const SSL *ssl,int type,int val)=NULL;
+ 	int ret= -1;
+ 	int new_state,state;
+diff -ru openssl-0.9.8a/ssl/s2_clnt.c openssl-0.9.8a-win32fix/ssl/s2_clnt.c
+--- openssl-0.9.8a/ssl/s2_clnt.c	2005-08-06 00:52:07.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/s2_clnt.c	2005-12-20 17:19:56.870250000 +0000
+@@ -144,7 +144,7 @@
+ 
+ int ssl2_connect(SSL *s)
+ 	{
+-	unsigned long l=time(NULL);
++	unsigned long l=(unsigned long)time(NULL);
+ 	BUF_MEM *buf=NULL;
+ 	int ret= -1;
+ 	void (*cb)(const SSL *ssl,int type,int val)=NULL;
+diff -ru openssl-0.9.8a/ssl/s2_srvr.c openssl-0.9.8a-win32fix/ssl/s2_srvr.c
+--- openssl-0.9.8a/ssl/s2_srvr.c	2005-08-06 00:52:07.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/s2_srvr.c	2005-12-20 17:19:09.276500000 +0000
+@@ -144,7 +144,7 @@
+ 
+ int ssl2_accept(SSL *s)
+ 	{
+-	unsigned long l=time(NULL);
++	unsigned long l=(unsigned long)time(NULL);
+ 	BUF_MEM *buf=NULL;
+ 	int ret= -1;
+ 	long num1;
+diff -ru openssl-0.9.8a/ssl/s3_clnt.c openssl-0.9.8a-win32fix/ssl/s3_clnt.c
+--- openssl-0.9.8a/ssl/s3_clnt.c	2005-10-01 00:38:19.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/s3_clnt.c	2005-12-20 17:24:44.576375000 +0000
+@@ -159,7 +159,7 @@
+ int ssl3_connect(SSL *s)
+ 	{
+ 	BUF_MEM *buf=NULL;
+-	unsigned long Time=time(NULL),l;
++	unsigned long Time=(unsigned long)time(NULL),l;
+ 	long num1;
+ 	void (*cb)(const SSL *ssl,int type,int val)=NULL;
+ 	int ret= -1;
+@@ -541,7 +541,7 @@
+ 		/* else use the pre-loaded session */
+ 
+ 		p=s->s3->client_random;
+-		Time=time(NULL);			/* Time */
++		Time=(unsigned long)time(NULL);			/* Time */
+ 		l2n(Time,p);
+ 		if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
+ 			goto err;
+diff -ru openssl-0.9.8a/ssl/s3_srvr.c openssl-0.9.8a-win32fix/ssl/s3_srvr.c
+--- openssl-0.9.8a/ssl/s3_srvr.c	2005-10-01 00:38:20.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/s3_srvr.c	2005-12-20 17:23:17.217000000 +0000
+@@ -164,7 +164,7 @@
+ int ssl3_accept(SSL *s)
+ 	{
+ 	BUF_MEM *buf;
+-	unsigned long l,Time=time(NULL);
++	unsigned long l,Time=(unsigned long)time(NULL);
+ 	void (*cb)(const SSL *ssl,int type,int val)=NULL;
+ 	long num1;
+ 	int ret= -1;
+@@ -1038,7 +1038,7 @@
+ 		{
+ 		buf=(unsigned char *)s->init_buf->data;
+ 		p=s->s3->server_random;
+-		Time=time(NULL);			/* Time */
++		Time=(unsigned long)time(NULL);			/* Time */
+ 		l2n(Time,p);
+ 		if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
+ 			return -1;
+diff -ru openssl-0.9.8a/ssl/ssl_asn1.c openssl-0.9.8a-win32fix/ssl/ssl_asn1.c
+--- openssl-0.9.8a/ssl/ssl_asn1.c	2005-04-20 22:48:48.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/ssl_asn1.c	2005-12-20 17:30:54.998250000 +0000
+@@ -344,7 +344,7 @@
+ 		OPENSSL_free(ai.data); ai.data=NULL; ai.length=0;
+ 		}
+ 	else
+-		ret->time=time(NULL);
++		ret->time=(unsigned long)time(NULL);
+ 
+ 	ai.length=0;
+ 	M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,2);
+diff -ru openssl-0.9.8a/ssl/ssl_lib.c openssl-0.9.8a-win32fix/ssl/ssl_lib.c
+--- openssl-0.9.8a/ssl/ssl_lib.c	2005-10-01 00:38:20.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/ssl_lib.c	2005-12-20 17:30:04.404500000 +0000
+@@ -1901,7 +1901,7 @@
+ 			?s->ctx->stats.sess_connect_good
+ 			:s->ctx->stats.sess_accept_good) & 0xff) == 0xff)
+ 			{
+-			SSL_CTX_flush_sessions(s->ctx,time(NULL));
++			SSL_CTX_flush_sessions(s->ctx,(unsigned long)time(NULL));
+ 			}
+ 		}
+ 	}
+diff -ru openssl-0.9.8a/ssl/ssl_sess.c openssl-0.9.8a-win32fix/ssl/ssl_sess.c
+--- openssl-0.9.8a/ssl/ssl_sess.c	2005-04-29 21:10:06.000000000 +0100
++++ openssl-0.9.8a-win32fix/ssl/ssl_sess.c	2005-12-20 17:30:31.420125000 +0000
+@@ -118,7 +118,7 @@
+ 	ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */
+ 	ss->references=1;
+ 	ss->timeout=60*5+4; /* 5 minute timeout by default */
+-	ss->time=time(NULL);
++	ss->time=(unsigned long)time(NULL);
+ 	ss->prev=NULL;
+ 	ss->next=NULL;
+ 	ss->compress_meth=0;
+Only in openssl-0.9.8a-win32fix: tmp32dll


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 22:12:09 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 22:12:09 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r424 - box/chris/win32/vc2005-compile-fixes
Message-ID: <20060211221209.76D2095@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 22:12:06 +0000 (Sat, 11 Feb 2006)
New Revision: 424

Modified:
   box/chris/win32/vc2005-compile-fixes/configure.ac
Log:
* configure.ac
- Detect whether the system has _cgetws(), and in what version of the
  Microsoft C Runtime library, and link to that library


Modified: box/chris/win32/vc2005-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-11 14:53:32 UTC (rev 423)
+++ box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-11 22:12:06 UTC (rev 424)
@@ -89,6 +89,9 @@
   AC_SEARCH_LIBS([regcomp], [pcreposix])
 fi
 
+AC_SEARCH_LIBS([_cgetws], [msvcr71 msvcr80],
+  AC_DEFINE([HAVE_CGETWS], [1], [Define to 1 if we have a _cgetws function]))
+
 ### Checks for typedefs, structures, and compiler characteristics.
 
 AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t])


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 22:12:45 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 22:12:45 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r425 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060211221245.B6EA295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 22:12:38 +0000 (Sat, 11 Feb 2006)
New Revision: 425

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
Log:
* emu.cpp
- Only warn once if the system event log is full


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-11 22:12:06 UTC (rev 424)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-11 22:12:38 UTC (rev 425)
@@ -983,6 +983,7 @@
 }
 
 HANDLE gSyslogH = 0;
+static bool sHaveWarnedEventLogFull = FALSE;
 
 void syslog(int loglevel, const char *frmt, ...)
 {
@@ -1043,9 +1044,25 @@
 
 	{
 		DWORD err = GetLastError();
-		printf("Unable to send message to Event Log: "
-			"error %i:\r\n", (int)err);
+		if (err == ERROR_LOG_FILE_FULL)
+		{
+			if (!sHaveWarnedEventLogFull)
+			{
+				printf("Unable to send message to Event Log "
+					"(Event Log is full):\r\n");
+				sHaveWarnedEventLogFull = TRUE;
+			}
+		}
+		else
+		{
+			printf("Unable to send message to Event Log: "
+				"error %i:\r\n", (int)err);
+		}
 	}
+	else
+	{
+		sHaveWarnedEventLogFull = FALSE;
+	}
 
 	printf("%s\r\n", buffer);
 }


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 22:13:25 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 22:13:25 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r426 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060211221325.4F98A95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 22:13:22 +0000 (Sat, 11 Feb 2006)
New Revision: 426

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.h
- Make prototype of ConvertFromWideString available
- Define a prototype for _cgetws() on MinGW


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-11 22:12:38 UTC (rev 425)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-11 22:13:22 UTC (rev 426)
@@ -468,10 +468,8 @@
 // caller must free the returned buffer with delete[]
 char* ConvertUtf8ToConsole(const char* pString);
 char* ConvertConsoleToUtf8(const char* pString);
+char* ConvertFromWideString(const WCHAR* pString, unsigned int DestCodepage);
 
-// std::string ConvertUtf8ToConsoleString(const std::string& rUtf8String);
-// std::string ConvertConsoleToUtf8String(const std::string& rConsoleString);
-
 //
 // MessageId: MSG_ERR_EXIST
 // MessageText:
@@ -479,4 +477,8 @@
 //
 #define MSG_ERR_EXIST                         ((DWORD)0xC0000004L)
 
+#ifdef __MINGW32__
+	extern "C" { _CRTIMP wchar_t* __cdecl _cgetws (wchar_t *); }
+#endif
+
 #endif // !EMU_INCLUDE && WIN32


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 22:14:08 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 22:14:08 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r427 - box/chris/win32/vc2005-compile-fixes/lib/common
Message-ID: <20060211221408.5CF1995@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 22:14:07 +0000 (Sat, 11 Feb 2006)
New Revision: 427

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
Log:
* FdGetLine.cpp
- Use _cgetws (if present) or _cgets to read from the console on Win32


Modified: box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp	2006-02-11 22:13:22 UTC (rev 426)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp	2006-02-11 22:14:07 UTC (rev 427)
@@ -120,7 +120,51 @@
 		// Read more in?
 		if(!foundLineEnd && mBufferBegin >= mBytesInBuffer && !mPendingEOF)
 		{
+#ifdef WIN32
+			int bytes;
+
+			if (mFileHandle == _fileno(stdin))
+			{
+#ifdef HAVE_CGETWS
+				int size = sizeof(mBuffer) - 3;
+				if (size > 80) size = 80;
+				WCHAR tempbuf[83] = { size };
+				::_cgetws(tempbuf);
+				size = tempbuf[1];
+				tempbuf[size + 2] = '\n';
+				tempbuf[size + 3] = 0;
+				char* utf8buf = ConvertFromWideString
+				(
+					tempbuf + 2, GetConsoleCP()
+				);
+				strncpy(mBuffer, utf8buf, sizeof(mBuffer));
+				bytes = strlen(utf8buf);
+				delete [] utf8buf;
+#else // !HAVE_CGETWS
+				int size = sizeof(mBuffer) - 3;
+				if (size > 80) size = 80;
+				char tempbuf[83] = { (char)size };
+				::_cgets(tempbuf);
+				size = tempbuf[1];
+				tempbuf[size + 2] = '\n';
+				tempbuf[size + 3] = 0;
+				char* utf8buf = ConvertConsoleToUtf8
+				(
+					tempbuf + 2
+				);
+				strncpy(mBuffer, utf8buf, sizeof(mBuffer));
+				bytes = strlen(utf8buf);
+				delete [] utf8buf;
+#endif // HAVE_CGETWS
+			}
+			else
+			{
+				bytes = ::read(mFileHandle, mBuffer, 
+					sizeof(mBuffer));
+			}
+#else // !WIN32
 			int bytes = ::read(mFileHandle, mBuffer, sizeof(mBuffer));
+#endif // WIN32
 			
 			// Error?
 			if(bytes == -1)


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 22:14:39 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 22:14:39 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r428 - box/chris/win32/vc2005-compile-fixes
Message-ID: <20060211221439.1176E95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 22:14:36 +0000 (Sat, 11 Feb 2006)
New Revision: 428

Modified:
   box/chris/win32/vc2005-compile-fixes/win32.bat
Log:
* win32.bat
- Copy config.h.win32 to the correct location (BoxConfig.h)


Modified: box/chris/win32/vc2005-compile-fixes/win32.bat
===================================================================
--- box/chris/win32/vc2005-compile-fixes/win32.bat	2006-02-11 22:14:07 UTC (rev 427)
+++ box/chris/win32/vc2005-compile-fixes/win32.bat	2006-02-11 22:14:36 UTC (rev 428)
@@ -25,4 +25,4 @@
 cd .\lib\server & perl ./../../lib/common/makeexception.pl ServerException.txt & perl ./../../lib/common/makeexception.pl ConnectionException.txt
 cd ..\..\
 
-copy lib\win32\config.h.win32 lib\common\config.h
+copy lib\win32\config.h.win32 lib\common\BoxConfig.h


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 22:15:18 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 22:15:18 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r429 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060211221518.9EBEA95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 22:15:17 +0000 (Sat, 11 Feb 2006)
New Revision: 429

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp
Log:
* bbackupquery.cpp
- Added a "-u" switch on Windows, to try to switch the console to Unicode


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp	2006-02-11 22:14:36 UTC (rev 428)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp	2006-02-11 22:15:17 UTC (rev 429)
@@ -50,8 +50,13 @@
 
 void PrintUsageAndExit()
 {
-	printf("Usage: bbackupquery [-q] [-c config_file] [-l log_file] [commands]\nAs many commands as you require.\n"	\
-	"If commands are multiple words, remember to enclose the command in quotes.\n"	\
+	printf("Usage: bbackupquery [-q] [-w] "
+#ifdef WIN32
+	"[-u] "
+#endif
+	"\n\t[-c config_file] [-l log_file] [commands]\n"
+	"As many commands as you require.\n"
+	"If commands are multiple words, remember to enclose the command in quotes.\n"
 	"Remember to use quit command if you don't want to drop into interactive mode.\n");
 	exit(1);
 }
@@ -90,10 +95,17 @@
 	// Flags
 	bool quiet = false;
 	bool readWrite = false;
-	
+
+#ifdef WIN32
+	const char* validOpts = "qwuc:l:";
+	bool unicodeConsole = false;
+#else
+	const char* validOpts = "qwc:l:";
+#endif
+
 	// See if there's another entry on the command line
 	int c;
-	while((c = getopt(argc, (char * const *)argv, "qwc:l:")) != -1)
+	while((c = getopt(argc, (char * const *)argv, validOpts)) != -1)
 	{
 		switch(c)
 		{
@@ -120,6 +132,12 @@
 				printf("Can't open log file '%s'\n", optarg);
 			}
 			break;
+
+#ifdef WIN32
+		case 'u':
+			unicodeConsole = true;
+			break;
+#endif
 		
 		case '?':
 		default:
@@ -137,6 +155,36 @@
 		printf(banner);
 	}
 
+#ifdef WIN32
+	if (unicodeConsole)
+	{
+#ifdef HAVE_CGETWS
+		if (!SetConsoleCP(CP_UTF8))
+		{
+			fprintf(stderr, "Failed to set input codepage: "
+				"error %d\n", GetLastError());
+		}
+
+		if (!SetConsoleOutputCP(CP_UTF8))
+		{
+			fprintf(stderr, "Failed to set output codepage: "
+				"error %d\n", GetLastError());
+		}
+
+		// enable input of Unicode characters
+		if (_setmode(_fileno(stdin), _O_TEXT) == -1)
+		{
+			perror("Failed to set the console input to "
+				"binary mode");
+		}
+#else // !HAVE_CGETWS
+		fprintf(stderr, "This version of bbackupquery does not "
+			"work in unicode mode!\n");
+		exit(2);
+#endif // HAVE_CGETWS
+	}
+#endif // WIN32
+
 	// Read in the configuration file
 	if(!quiet) printf("Using configuration file %s\n", configFilename);
 	std::string errs;


From boxbackup-dev@fluffy.co.uk  Sat Feb 11 23:54:40 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 11 Feb 2006 23:54:40 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r430 - box/chris/win32/vc2005-compile-fixes/test/win32
Message-ID: <20060211235440.9D7DB95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-11 23:54:36 +0000 (Sat, 11 Feb 2006)
New Revision: 430

Added:
   box/chris/win32/vc2005-compile-fixes/test/win32/Makefile
   box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp
Log:
* win32/timezone.cpp, win32/Makefile
- Added a little test utility for timezone handling in Box


Added: box/chris/win32/vc2005-compile-fixes/test/win32/Makefile
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/win32/Makefile	2006-02-11 22:15:17 UTC (rev 429)
+++ box/chris/win32/vc2005-compile-fixes/test/win32/Makefile	2006-02-11 23:54:36 UTC (rev 430)
@@ -0,0 +1,2 @@
+timezone.exe: timezone.cpp Makefile
+	g++ -g -O0 -mno-cygwin -I../../lib/win32 -o timezone.exe timezone.cpp 

Added: box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp	2006-02-11 22:15:17 UTC (rev 429)
+++ box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp	2006-02-11 23:54:36 UTC (rev 430)
@@ -0,0 +1,74 @@
+#include <time.h>
+#include <windows.h>
+
+typedef int uid_t;
+typedef int gid_t;
+typedef int u_int32_t;
+
+#include "emu.h"
+
+int main(int argc, char** argv)
+{
+	int time_now = time(NULL);
+	printf("Time now is %d\n", time_now);
+
+	char testfile[80];
+	snprintf(testfile, sizeof(testfile), "test.%d", time_now);
+	printf("Test file is: %s\n", testfile);
+
+	_unlink(testfile);
+
+	/*
+	int fd = open(testfile, O_RDWR | O_CREAT | O_EXCL);
+	if (fd < 0)
+	{
+		perror("open");
+		exit(1);
+	}
+	close(fd);
+	*/
+
+	HANDLE fh = CreateFileA(testfile, FILE_READ_ATTRIBUTES,
+		FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, CREATE_ALWAYS, 
+		FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE, NULL);
+
+	if (!fh)
+	{
+		fprintf(stderr, "Failed to open file '%s': error %d\n",
+			testfile, GetLastError());
+		exit(1);
+	}
+
+	BY_HANDLE_FILE_INFORMATION fi;
+
+	if (!GetFileInformationByHandle(fh, &fi))
+	{
+		fprintf(stderr, "Failed to get file information for '%s': "
+			"error %d\n", testfile, GetLastError());
+		exit(1);
+	}
+
+	if (!CloseHandle(fh))
+	{
+		fprintf(stderr, "Failed to close file: error %d\n",
+			GetLastError());
+		exit(1);
+	}
+
+	time_t created_time = ConvertFileTimeToTime_t(&fi.ftCreationTime);
+	printf("File created time: %d\n", created_time);
+
+	printf("Difference is: %d\n", created_time - time_now);
+
+	/*
+	sleep(1);
+
+	if (_unlink(testfile) != 0)
+	{
+		perror("Failed to delete test file");
+		exit(1);
+	}
+	*/
+
+	exit(0);
+}


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 00:17:30 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 00:17:30 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r431 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060212001730.0257995@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 00:17:28 +0000 (Sun, 12 Feb 2006)
New Revision: 431

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Fixed some remaining issues with using the wrong path separator on Win32


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-11 23:54:36 UTC (rev 430)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-12 00:17:28 UTC (rev 431)
@@ -1121,7 +1121,7 @@
 		}
 				
 		// Then get it compared
-		Compare(std::string(DIRECTORY_SEPARATOR) + rLocation, 
+		Compare(std::string("/") + rLocation, 
 			loc.GetKeyValue("Path"), rParams);
 	}
 	catch(...)
@@ -1378,7 +1378,8 @@
 			if(local == localFiles.end())
 			{
 				// Not found -- report
-				printf("Local file '%s/%s' does not exist, "
+				printf("Local file '%s" DIRECTORY_SEPARATOR 
+					"%s' does not exist, "
 					"but store file '%s/%s' does.\n",
 					localName.c_str(), i->first.c_str(), 
 					storeName.c_str(), i->first.c_str());
@@ -1447,7 +1448,10 @@
 								true /* ignore attr mod time */,
 								fileOnServerStream->IsSymLink() /* ignore modification time if it's a symlink */))
 						{
-							printf("Local file '%s/%s' has different attributes to store file '%s/%s'.\n",
+							printf("Local file '%s"
+								DIRECTORY_SEPARATOR
+								"%s' has different attributes "
+								"to store file '%s/%s'.\n",
 								localName.c_str(), i->first.c_str(), storeName.c_str(), i->first.c_str());						
 							rParams.mDifferences ++;
 							if(modifiedAfterLastSync)
@@ -1512,7 +1516,10 @@
 					// Report if not equal.
 					if(!equal)
 					{
-						printf("Local file '%s/%s' has different contents to store file '%s/%s'.\n",
+						printf("Local file '%s"
+							DIRECTORY_SEPARATOR
+							"%s' has different contents "
+							"to store file '%s/%s'.\n",
 							localName.c_str(), i->first.c_str(), storeName.c_str(), i->first.c_str());
 						rParams.mDifferences ++;
 						if(modifiedAfterLastSync)
@@ -1553,8 +1560,9 @@
 			if(rParams.mpExcludeFiles == 0 || 
 				!(rParams.mpExcludeFiles->IsExcluded(localFileName)))
 			{
-				printf("Local file '%s/%s' exists, but "
-					"store file '%s/%s' does not exist.\n",
+				printf("Local file '%s" DIRECTORY_SEPARATOR
+					"%s' exists, but store file '%s/%s' "
+					"does not exist.\n",
 					localName.c_str(), (*i).c_str(), 
 					storeName.c_str(), (*i).c_str());
 				rParams.mDifferences ++;
@@ -1590,8 +1598,10 @@
 			if(local == localDirs.end())
 			{
 				// Not found -- report
-				printf("Local directory '%s/%s' does not exist, "
-					"but store directory '%s/%s' does.\n",
+				printf("Local directory '%s" 
+					DIRECTORY_SEPARATOR "%s' "
+					"does not exist, but store directory "
+					"'%s/%s' does.\n",
 					localName.c_str(), i->first.c_str(), 
 					storeName.c_str(), i->first.c_str());
 				rParams.mDifferences ++;


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 00:29:45 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 00:29:45 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r432 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060212002945.6376195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 00:29:42 +0000 (Sun, 12 Feb 2006)
New Revision: 432

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.h
- Zero out struct tm to avoid random drift in and out of daylight savings
  (and other possible evil effects of random data in unset fields)


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-12 00:17:28 UTC (rev 431)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-12 00:29:42 UTC (rev 432)
@@ -429,7 +429,8 @@
 	// Convert the last-write time to local time.
 	FileTimeToSystemTime(fileTime, &stUTC);
 	// SystemTimeToTzSpecificLocalTime(NULL, &stUTC, &stLocal);
-	
+
+	memset(&timeinfo, 0, sizeof(timeinfo));	
 	timeinfo.tm_sec = stUTC.wSecond;
 	timeinfo.tm_min = stUTC.wMinute;
 	timeinfo.tm_hour = stUTC.wHour;


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 00:43:28 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 00:43:28 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r433 - box/chris/win32/vc2005-compile-fixes/test/win32
Message-ID: <20060212004328.F10B095@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 00:43:27 +0000 (Sun, 12 Feb 2006)
New Revision: 433

Modified:
   box/chris/win32/vc2005-compile-fixes/test/win32/Makefile
   box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp
Log:
* win32/timezone.cpp
- Show times as ASCII test to make interpretation easier
- Abort with an error if the difference between system time and file
  creation time is too large

* win32/Makefile
- Added a "clean" target


Modified: box/chris/win32/vc2005-compile-fixes/test/win32/Makefile
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/win32/Makefile	2006-02-12 00:29:42 UTC (rev 432)
+++ box/chris/win32/vc2005-compile-fixes/test/win32/Makefile	2006-02-12 00:43:27 UTC (rev 433)
@@ -1,2 +1,5 @@
 timezone.exe: timezone.cpp Makefile
 	g++ -g -O0 -mno-cygwin -I../../lib/win32 -o timezone.exe timezone.cpp 
+
+clean:
+	rm timezone.exe

Modified: box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp	2006-02-12 00:29:42 UTC (rev 432)
+++ box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp	2006-02-12 00:43:27 UTC (rev 433)
@@ -9,9 +9,12 @@
 
 int main(int argc, char** argv)
 {
-	int time_now = time(NULL);
-	printf("Time now is %d\n", time_now);
+	time_t time_now = time(NULL);
+	char* time_str = strdup(asctime(gmtime(&time_now)));
+	time_str[24] = 0;
 
+	printf("Time now is %d (%s)\n", time_now, time_str);
+
 	char testfile[80];
 	snprintf(testfile, sizeof(testfile), "test.%d", time_now);
 	printf("Test file is: %s\n", testfile);
@@ -56,10 +59,20 @@
 	}
 
 	time_t created_time = ConvertFileTimeToTime_t(&fi.ftCreationTime);
-	printf("File created time: %d\n", created_time);
+	time_str = strdup(asctime(gmtime(&created_time)));
+	time_str[24] = 0;
 
+	printf("File created time: %d (%s)\n", created_time, time_str);
+
 	printf("Difference is: %d\n", created_time - time_now);
 
+	if (abs(created_time - time_now) > 30)
+	{
+		fprintf(stderr, "Error: time difference too big: "
+			"bug in emu.h?\n");
+		exit(1);
+	}
+
 	/*
 	sleep(1);
 


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 00:45:21 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 00:45:21 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r434 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060212004521.E7DDD95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 00:45:20 +0000 (Sun, 12 Feb 2006)
New Revision: 434

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.h
- Correct for the fact that mktime() expects input to be in local time, but
  time() and FileTimeToSystemTime() use UTC/GMT


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-12 00:43:27 UTC (rev 433)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-12 00:45:20 UTC (rev 434)
@@ -440,7 +440,7 @@
 	// timeinfo.tm_yday = ...;
 	timeinfo.tm_year = stUTC.wYear - 1900;
 
-	time_t retVal = mktime(&timeinfo);
+	time_t retVal = mktime(&timeinfo) - _timezone;
 	return retVal;
 }
 


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 01:07:18 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 01:07:18 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r435 - box/chris/win32/releases
Message-ID: <20060212010718.317AC95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 01:02:38 +0000 (Sun, 12 Feb 2006)
New Revision: 435

Added:
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r434-backup-client-mingw32.zip
Log:
* boxbackup-0.09_plus2_vc2005fix_r434-backup-client-mingw32.zip
- Added a new build, which should fix the following Win32 issues:
  ! Unable to cd into a remote directory with international chars in the name
    (reported by Gary)
  ! "bbackupctl reload" caused the backup daemon to lock up (reported by 
    Pascal Lalonde)
  ! Newly created files were not backed up for MinimumFileAge + 5 hours
    when running in a timezone 5 hours behind UTC (reported by Peter Jalajas)
  ! bbackupquery compare -a didn't work at all (reported by Peter Jalajas)
  ! Unable to force a sync during the error holdoff period after a sync
    was aborted due to an exception
- This is NOT a release candidate since there are still outstanding bugs,
  particularly with SSL keepalives and possibly backups of files inside 
  folders with international characters in their names (reported by Gary)


Added: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r434-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r434-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 03:16:59 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 03:16:59 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r436 - in box/trunk: . lib/raidfile
Message-ID: <20060212031659.63F2E95@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-12 03:16:57 +0000 (Sun, 12 Feb 2006)
New Revision: 436

Modified:
   box/trunk/configure.ac
   box/trunk/lib/raidfile/RaidFileWrite.cpp
Log:
This ppc problem is clearly a common big-endian platform issue.
Remove ppc hack and configure option. Replace dubious casts with clearer use of memcpy to make this work on all platforms all of the time.
Note that there isn't really a call to memcpy, the compiler inlines it as 2 int copies which is an insignificant overhead (even true with -O0).


Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2006-02-12 01:02:38 UTC (rev 435)
+++ box/trunk/configure.ac	2006-02-12 03:16:57 UTC (rev 436)
@@ -10,17 +10,6 @@
 AC_CANONICAL_SYSTEM
 test -s install-sh || rm install-sh
 
-
-### Temporary hacks
-AC_ARG_ENABLE(
-  [ppc-workaround],
-  [AC_HELP_STRING([--enable-ppc-workaround],
-                  [Enable a workaround for a compiler bug in GCC on PPC platforms (raidfile tests fail).])])
-if test "x$enable_ppc_workaround" = "xyes"; then
-  AC_DEFINE([HAVE_PPC_WORKAROUND], 1, [Define to 1 to workaround a GCC compiler bug on PPC])
-fi
-
-
 ### Checks for programs.
 
 AC_LANG([C++])

Modified: box/trunk/lib/raidfile/RaidFileWrite.cpp
===================================================================
--- box/trunk/lib/raidfile/RaidFileWrite.cpp	2006-02-12 01:02:38 UTC (rev 435)
+++ box/trunk/lib/raidfile/RaidFileWrite.cpp	2006-02-12 03:16:57 UTC (rev 436)
@@ -462,10 +462,8 @@
 						ASSERT(sizeof(RaidFileRead::FileSizeType) >= sizeof(off_t));
 						int sizePos = (blockSize/sizeof(unsigned int)) - 2;
 						RaidFileRead::FileSizeType sw = box_hton64(writeFileStat.st_size);
-#ifdef HAVE_PPC_WORKAROUND
-                                                static RaidFileRead::FileSizeType ppcWorkaround = sw;
-#endif
-						unsigned int *psize = (unsigned int *)(&sw);
+						unsigned int psize[2];
+						::memcpy(psize, &sw, sizeof(RaidFileRead::FileSizeType));
 						pparity[sizePos+0] = pstripe1[sizePos+0] ^ psize[0];
 						pparity[sizePos+1] = pstripe1[sizePos+1] ^ psize[1];
 					}


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 10:27:01 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 12 Feb 2006 10:27:01 +0000
Subject: [Box Backup-dev] COMMIT r431 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
In-Reply-To: <20060212001730.0257995@s0g0.pems.testserver.co.uk>
References: <20060212001730.0257995@s0g0.pems.testserver.co.uk>
Message-ID: <EC740FC7-72E0-4BFB-9CE8-45788A5B1DFE@fluffy.co.uk>

On 12 Feb 2006, at 00:17, subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-12 00:17:28 +0000 (Sun, 12 Feb 2006)
> New Revision: 431
>
> Modified:
>    box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/ 
> BackupQueries.cpp
> Log:
> * BackupQueries.cpp
> - Fixed some remaining issues with using the wrong path separator  
> on Win32
>
>
>  		// Then get it compared
> -		Compare(std::string(DIRECTORY_SEPARATOR) + rLocation,
> +		Compare(std::string("/") + rLocation,
>  			loc.GetKeyValue("Path"), rParams);
>

The others appear the other way round. What is the intention of this  
fix? (in general)

Ben




From boxbackup-dev@fluffy.co.uk  Sun Feb 12 10:28:39 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 12 Feb 2006 10:28:39 +0000
Subject: [Box Backup-dev] PPC workaround (was: COMMIT r436 - in box/trunk: . lib/raidfile)
In-Reply-To: <20060212031659.63F2E95@s0g0.pems.testserver.co.uk>
References: <20060212031659.63F2E95@s0g0.pems.testserver.co.uk>
Message-ID: <F010D694-FBC6-4120-BC3B-13625BCB6DA3@fluffy.co.uk>

On 12 Feb 2006, at 03:16, subversion@fluffy.co.uk wrote:

> Author: martin
> Date: 2006-02-12 03:16:57 +0000 (Sun, 12 Feb 2006)
> New Revision: 436
>
> Modified:
>    box/trunk/configure.ac
>    box/trunk/lib/raidfile/RaidFileWrite.cpp
> Log:
> This ppc problem is clearly a common big-endian platform issue.
> Remove ppc hack and configure option. Replace dubious casts with  
> clearer use of memcpy to make this work on all platforms all of the  
> time.


The ppc hack wasn't necessary on the Mac. gcc -v outputs

Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5247.obj~4/src/configure -- 
disable-checking -enable-werror --prefix=/usr --mandir=/share/man -- 
enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] 
[^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 -- 
build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 -- 
target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5247)

Which gcc are you using?

Should this be specific to a compiler version?


> Note that there isn't really a call to memcpy, the compiler inlines  
> it as 2 int copies which is an insignificant overhead (even true  
> with -O0).

You are very trusting of compilers.

Ben





From boxbackup-dev@fluffy.co.uk  Sun Feb 12 10:58:56 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Sun, 12 Feb 2006 10:58:56 +0000
Subject: [Box Backup-dev] Extended attributes on FreeBSD 5/6
Message-ID: <20060212105855.GB31646@netinertia.co.uk>

Hi all,

I just had a quick poke around FreeBSD to see how Robert Watson's
implemented ACLs, and it seems to use /usr/include/sys/acl.h instead of
xattr.h.

I guess xattr support for FreeBSD isn't going to make it for the 0.10
release now, but it'd be nice to have it in a future release.

I'd like to help with the implementation of this as much as possible,
but my C++ is very limited so the best I can offer is probably shell
access or a jail for testing.

James

From boxbackup-dev@fluffy.co.uk  Sun Feb 12 11:44:37 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 12 Feb 2006 11:44:37 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r431 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
In-Reply-To: <EC740FC7-72E0-4BFB-9CE8-45788A5B1DFE@fluffy.co.uk>
References: <20060212001730.0257995@s0g0.pems.testserver.co.uk>
 <EC740FC7-72E0-4BFB-9CE8-45788A5B1DFE@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602121142340.14656@top.qwarx.com>

Hi Ben,

>>  		// Then get it compared
>>  -		Compare(std::string(DIRECTORY_SEPARATOR) + rLocation,
>>  +		Compare(std::string("/") + rLocation,
>>      loc.GetKeyValue("Path"), rParams);
>
> The others appear the other way round. What is the intention of this 
> fix? (in general)

rLocation is a remote path, right? The separator on store paths should 
ALWAYS be '/', regardless of whatever lame separator our 2-bit platform 
happens to be using.

Without it, comparing locations on Windows fails, giving up when looking 
for the location root, becauseit can't find "\ics_data" (for example).

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 11:49:44 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 12 Feb 2006 11:49:44 +0000
Subject: [Box Backup-dev] COMMIT r431 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
In-Reply-To: <Pine.LNX.4.62.0602121142340.14656@top.qwarx.com>
References: <20060212001730.0257995@s0g0.pems.testserver.co.uk> <EC740FC7-72E0-4BFB-9CE8-45788A5B1DFE@fluffy.co.uk> <Pine.LNX.4.62.0602121142340.14656@top.qwarx.com>
Message-ID: <B1A114EC-B343-41D0-A962-B453F4A79A9E@fluffy.co.uk>

On 12 Feb 2006, at 11:44, Chris Wilson wrote:

> Hi Ben,
>
>>>  		// Then get it compared
>>>  -		Compare(std::string(DIRECTORY_SEPARATOR) + rLocation,
>>>  +		Compare(std::string("/") + rLocation,
>>>      loc.GetKeyValue("Path"), rParams);
>>
>> The others appear the other way round. What is the intention of  
>> this fix? (in general)
>
> rLocation is a remote path, right? The separator on store paths  
> should ALWAYS be '/', regardless of whatever lame separator our 2- 
> bit platform happens to be using.
>
> Without it, comparing locations on Windows fails, giving up when  
> looking for the location root, becauseit can't find  
> "\ics_data" (for example).

Sounds sensible. So you use / for remote paths, and \ for local paths  
(and for the OS API)? And / everywhere on POSIX?

Ben




From boxbackup-dev@fluffy.co.uk  Sun Feb 12 11:35:07 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sun, 12 Feb 2006 11:35:07 +0000
Subject: [Box Backup-dev] PPC workaround (was: COMMIT r436 - in
 box/trunk: . lib/raidfile)
In-Reply-To: <F010D694-FBC6-4120-BC3B-13625BCB6DA3@fluffy.co.uk>
References: <20060212031659.63F2E95@s0g0.pems.testserver.co.uk>
 <F010D694-FBC6-4120-BC3B-13625BCB6DA3@fluffy.co.uk>
Message-ID: <1139744108.5944.37.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-12 at 10:28 +0000, Ben Summers wrote:
> The ppc hack wasn't necessary on the Mac. gcc -v outputs
> Should this be specific to a compiler version?

Yes, I guessed you hadn't seen it. The problem is without the facility
to exhaustively test all versions on the compiler on each platform we've
no way of implementing blacklisting. On PPC I saw the same failure on
gcc 3.3.x and 4.0.1, although the workaround for the former didn't work
for the latter, which is even more scary.

The only other ways are user controlled (my initial preference) and
writing a proper autoconf check for it. Then implementing a special hack
for it (like I had before). This is all rather nasty.

This is the reason I took the decision to rewrite that section of code
in such a way that I could be sure the bug would never be triggered,
while also trying to improve code readability. The result uses no casts,
is simple code that the compiler should be very safe with, and to me
seems easier to follow.

> > Note that there isn't really a call to memcpy, the compiler inlines  
> > it as 2 int copies which is an insignificant overhead (even true  
> > with -O0).
> 
> You are very trusting of compilers.

I cannot guarantee that all of the time, but there's few compilers left
which can't make the simple optimisation of a fixed size memcpy. I
double checked in this case on gcc and it always optimises memcpy away.

Having said that, I don't think it is really essential anyway. The code
is inside a double nested loop, but only gets called in the final case.
If I've misunderstood it please say so, but I judged that section to be
time sensitive, but not time critical. Even with a real call to memcpy I
suspect the overhead would be barely measurable.

I'm happy to revert the previous version and rename the option to
--enable-bigendian-workaround if you prefer.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 12:03:46 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 12 Feb 2006 12:03:46 +0000
Subject: [Box Backup-dev] PPC workaround (was: COMMIT r436 - in box/trunk: . lib/raidfile)
In-Reply-To: <1139744108.5944.37.camel@avenin.ebourne.me.uk>
References: <20060212031659.63F2E95@s0g0.pems.testserver.co.uk> <F010D694-FBC6-4120-BC3B-13625BCB6DA3@fluffy.co.uk> <1139744108.5944.37.camel@avenin.ebourne.me.uk>
Message-ID: <B0A23D58-EA6C-42A5-8EE8-9DF48374D704@fluffy.co.uk>

On 12 Feb 2006, at 11:35, Martin Ebourne wrote:

> On Sun, 2006-02-12 at 10:28 +0000, Ben Summers wrote:
>> The ppc hack wasn't necessary on the Mac. gcc -v outputs
>> Should this be specific to a compiler version?
>
> Yes, I guessed you hadn't seen it. The problem is without the facility
> to exhaustively test all versions on the compiler on each platform  
> we've
> no way of implementing blacklisting. On PPC I saw the same failure on
> gcc 3.3.x and 4.0.1, although the workaround for the former didn't  
> work
> for the latter, which is even more scary.
>
> The only other ways are user controlled (my initial preference) and
> writing a proper autoconf check for it. Then implementing a special  
> hack
> for it (like I had before). This is all rather nasty.

And a huge amount of work for a compiler bug.

Is there an easy test case to report to the gcc developers?

>
> This is the reason I took the decision to rewrite that section of code
> in such a way that I could be sure the bug would never be triggered,
> while also trying to improve code readability. The result uses no  
> casts,
> is simple code that the compiler should be very safe with, and to me
> seems easier to follow.

Agreed.

>
>>> Note that there isn't really a call to memcpy, the compiler inlines
>>> it as 2 int copies which is an insignificant overhead (even true
>>> with -O0).
>>
>> You are very trusting of compilers.
>
> I cannot guarantee that all of the time, but there's few compilers  
> left
> which can't make the simple optimisation of a fixed size memcpy. I
> double checked in this case on gcc and it always optimises memcpy  
> away.
>
> Having said that, I don't think it is really essential anyway. The  
> code
> is inside a double nested loop, but only gets called in the final  
> case.
> If I've misunderstood it please say so, but I judged that section  
> to be
> time sensitive, but not time critical.

This is correct.


> Even with a real call to memcpy I
> suspect the overhead would be barely measurable.
>
> I'm happy to revert the previous version and rename the option to
> --enable-bigendian-workaround if you prefer.

I would add

   ASSERT(sizeof(psize) == sizeof(RaidFileRead::FileSizeType));

and a comment about why it's as it is. But I think something which  
definitely works on all platforms is preferable to the user having to  
enable something to make it work.

I'm probably being picky again. A terrible habit.

Ben






From boxbackup-dev@fluffy.co.uk  Sun Feb 12 12:13:06 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 12 Feb 2006 12:13:06 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r431 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
In-Reply-To: <B1A114EC-B343-41D0-A962-B453F4A79A9E@fluffy.co.uk>
References: <20060212001730.0257995@s0g0.pems.testserver.co.uk>
 <EC740FC7-72E0-4BFB-9CE8-45788A5B1DFE@fluffy.co.uk>
 <Pine.LNX.4.62.0602121142340.14656@top.qwarx.com>
 <B1A114EC-B343-41D0-A962-B453F4A79A9E@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602121212240.14656@top.qwarx.com>

Hi Ben,

> Sounds sensible. So you use / for remote paths, and \ for local paths 
> (and for the OS API)? And / everywhere on POSIX?

Yes, in effect. DIRECTORY_SEPARATOR is "/" on POSIX and "\" on Windows.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 12:13:56 2006
From: boxbackup-dev@fluffy.co.uk (Jonathan Morton)
Date: Sun, 12 Feb 2006 14:13:56 +0200
Subject: [Box Backup-dev] PPC workaround (was: COMMIT r436 - in box/trunk: . lib/raidfile)
In-Reply-To: <1139744108.5944.37.camel@avenin.ebourne.me.uk>
References: <20060212031659.63F2E95@s0g0.pems.testserver.co.uk> <F010D694-FBC6-4120-BC3B-13625BCB6DA3@fluffy.co.uk> <1139744108.5944.37.camel@avenin.ebourne.me.uk>
Message-ID: <2E3E967D-9453-4BFD-872E-8E90C1A1F807@chromatix.org.uk>

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-5-377962671
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

> This is the reason I took the decision to rewrite that section of code
> in such a way that I could be sure the bug would never be triggered,
> while also trying to improve code readability. The result uses no  
> casts,
> is simple code that the compiler should be very safe with, and to me
> seems easier to follow.

Regardless of whether the compiler can optimise a memcpy() away, I  
think the right way to correct a problem of this type is to use a  
union.  Casting via pointers is really a hackish way to do a union  
anyway, and not as good.  I'll fix it at my end, after checking that  
your fix actually works.

--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     chromi@chromatix.org.uk
website:  http://www.chromatix.uklinux.net/
tagline:  The key to knowledge is not to rely on people to teach you it.



--Apple-Mail-5-377962671
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iEYEARECAAYFAkPvJoQACgkQ6xAxI1ofIwqLUQCdFm9PYGx63ZGNpx+KcfVrjCnl
rCYAn2VbPZdIXG5KjMLjJ9rFbxI7IMP0
=gE0O
-----END PGP SIGNATURE-----

--Apple-Mail-5-377962671--

From boxbackup-dev@fluffy.co.uk  Sun Feb 12 13:12:30 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 13:12:30 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r437 - box/trunk/lib/raidfile
Message-ID: <20060212131230.5C67D95@s0g0.pems.testserver.co.uk>

Author: chromi
Date: 2006-02-12 13:12:28 +0000 (Sun, 12 Feb 2006)
New Revision: 437

Modified:
   box/trunk/lib/raidfile/RaidFileWrite.cpp
Log:
Change "PPC workaround" to use union instead of memcpy().  All tests now pass.



Modified: box/trunk/lib/raidfile/RaidFileWrite.cpp
===================================================================
--- box/trunk/lib/raidfile/RaidFileWrite.cpp	2006-02-12 03:16:57 UTC (rev 436)
+++ box/trunk/lib/raidfile/RaidFileWrite.cpp	2006-02-12 13:12:28 UTC (rev 437)
@@ -461,11 +461,11 @@
 						ASSERT(sizeof(RaidFileRead::FileSizeType) == (2*sizeof(unsigned int)));
 						ASSERT(sizeof(RaidFileRead::FileSizeType) >= sizeof(off_t));
 						int sizePos = (blockSize/sizeof(unsigned int)) - 2;
-						RaidFileRead::FileSizeType sw = box_hton64(writeFileStat.st_size);
-						unsigned int psize[2];
-						::memcpy(psize, &sw, sizeof(RaidFileRead::FileSizeType));
-						pparity[sizePos+0] = pstripe1[sizePos+0] ^ psize[0];
-						pparity[sizePos+1] = pstripe1[sizePos+1] ^ psize[1];
+						union { RaidFileRead::FileSizeType l; unsigned int i[2]; } sw;
+
+						sw.l = box_hton64(writeFileStat.st_size);
+						pparity[sizePos+0] = pstripe1[sizePos+0] ^ sw.i[0];
+						pparity[sizePos+1] = pstripe1[sizePos+1] ^ sw.i[1];
 					}
 					else
 					{


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 13:13:15 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 13:13:15 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r438 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060212131315.9735A95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 13:13:12 +0000 (Sun, 12 Feb 2006)
New Revision: 438

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.cpp, emu.h
- Added a new function, console_read, to replace _cgetws without requiring
  a newer version of the M$ runtime library


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-12 13:12:28 UTC (rev 437)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-12 13:13:12 UTC (rev 438)
@@ -1162,4 +1162,48 @@
 	return 0;
 }
 
+int console_read(char* pBuffer, size_t BufferSize)
+{
+	HANDLE hConsole = GetStdHandle(STD_INPUT_HANDLE);
+
+	if (hConsole == INVALID_HANDLE_VALUE)
+	{
+		::fprintf(stderr, "Failed to get a handle on standard input: "
+			"error %d\n", GetLastError());
+		return -1;
+	}
+
+	int WideSize = BufferSize / 5;
+	WCHAR* pWideBuffer = new WCHAR [WideSize];
+
+	if (!pWideBuffer)
+	{
+		::perror("Failed to allocate wide character buffer");
+		return -1;
+	}
+
+	DWORD numCharsRead = 0;
+
+	if (!ReadConsoleW(
+			hConsole,
+			pWideBuffer,
+			WideSize - 1,
+			&numCharsRead,
+			NULL // reserved
+		)) 
+	{
+		::fprintf(stderr, "Failed to read from console: error %d\n",
+			GetLastError());
+		return -1;
+	}
+
+	pWideBuffer[numCharsRead] = 0;
+
+	char* pUtf8 = ConvertFromWideString(pWideBuffer, GetConsoleCP());
+	strncpy(pBuffer, pUtf8, BufferSize);
+	delete [] pUtf8;
+
+	return strlen(pBuffer);
+}
+
 #endif // WIN32

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-12 13:12:28 UTC (rev 437)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-12 13:13:12 UTC (rev 438)
@@ -478,8 +478,7 @@
 //
 #define MSG_ERR_EXIST                         ((DWORD)0xC0000004L)
 
-#ifdef __MINGW32__
-	extern "C" { _CRTIMP wchar_t* __cdecl _cgetws (wchar_t *); }
-#endif
+// replacement for _cgetws which requires a relatively recent C runtime lib
+int console_read(char* pBuffer, size_t BufferSize);
 
 #endif // !EMU_INCLUDE && WIN32


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 13:13:44 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 13:13:44 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r439 - box/chris/win32/vc2005-compile-fixes/lib/common
Message-ID: <20060212131344.2F42795@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 13:13:43 +0000 (Sun, 12 Feb 2006)
New Revision: 439

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
Log:
* FdGetLine.cpp
- Use console_read on Windows instead of messing around with _cgetws


Modified: box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp	2006-02-12 13:13:12 UTC (rev 438)
+++ box/chris/win32/vc2005-compile-fixes/lib/common/FdGetLine.cpp	2006-02-12 13:13:43 UTC (rev 439)
@@ -125,37 +125,7 @@
 
 			if (mFileHandle == _fileno(stdin))
 			{
-#ifdef HAVE_CGETWS
-				int size = sizeof(mBuffer) - 3;
-				if (size > 80) size = 80;
-				WCHAR tempbuf[83] = { size };
-				::_cgetws(tempbuf);
-				size = tempbuf[1];
-				tempbuf[size + 2] = '\n';
-				tempbuf[size + 3] = 0;
-				char* utf8buf = ConvertFromWideString
-				(
-					tempbuf + 2, GetConsoleCP()
-				);
-				strncpy(mBuffer, utf8buf, sizeof(mBuffer));
-				bytes = strlen(utf8buf);
-				delete [] utf8buf;
-#else // !HAVE_CGETWS
-				int size = sizeof(mBuffer) - 3;
-				if (size > 80) size = 80;
-				char tempbuf[83] = { (char)size };
-				::_cgets(tempbuf);
-				size = tempbuf[1];
-				tempbuf[size + 2] = '\n';
-				tempbuf[size + 3] = 0;
-				char* utf8buf = ConvertConsoleToUtf8
-				(
-					tempbuf + 2
-				);
-				strncpy(mBuffer, utf8buf, sizeof(mBuffer));
-				bytes = strlen(utf8buf);
-				delete [] utf8buf;
-#endif // HAVE_CGETWS
+				bytes = console_read(mBuffer, sizeof(mBuffer));
 			}
 			else
 			{


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 13:14:25 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 13:14:25 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r440 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060212131425.E781C95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 13:14:24 +0000 (Sun, 12 Feb 2006)
New Revision: 440

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp
Log:
* bbackupquery.cpp
- Remove conditionality on _cgetws now that we use console_read, which
  always works in Unicode mode


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp	2006-02-12 13:13:43 UTC (rev 439)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/bbackupquery.cpp	2006-02-12 13:14:24 UTC (rev 440)
@@ -158,7 +158,6 @@
 #ifdef WIN32
 	if (unicodeConsole)
 	{
-#ifdef HAVE_CGETWS
 		if (!SetConsoleCP(CP_UTF8))
 		{
 			fprintf(stderr, "Failed to set input codepage: "
@@ -177,11 +176,6 @@
 			perror("Failed to set the console input to "
 				"binary mode");
 		}
-#else // !HAVE_CGETWS
-		fprintf(stderr, "This version of bbackupquery does not "
-			"work in unicode mode!\n");
-		exit(2);
-#endif // HAVE_CGETWS
 	}
 #endif // WIN32
 


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 13:42:33 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 13:42:33 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r441 - box/chris/win32/releases
Message-ID: <20060212134233.7539295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 13:37:36 +0000 (Sun, 12 Feb 2006)
New Revision: 441

Added:
   box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r440-backup-client-mingw32.zip
Log:
* boxbackup-0.09_plus2_vc2005fix_r440-backup-client-mingw32.zip
- Added a new build, removes dependency on msvcr80.dll


Added: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r440-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_vc2005fix_r440-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 13:46:28 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 13:46:28 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r442 - in box/chris/win32/vc2005-compile-fixes: . bin/bbstored infrastructure lib/raidfile
Message-ID: <20060212134628.48F9795@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 13:46:24 +0000 (Sun, 12 Feb 2006)
New Revision: 442

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbstored/backupprotocol.txt
   box/chris/win32/vc2005-compile-fixes/configure.ac
   box/chris/win32/vc2005-compile-fixes/infrastructure/BoxPlatform.pm.in
   box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
   box/chris/win32/vc2005-compile-fixes/lib/raidfile/RaidFileWrite.cpp
Log:
* infrastructure/makeparcels.pl
* infrastructure/BoxPlatform.pm.in
* configure.ac
* lib/raidfile/RaidFileWrite.cpp
* bin/bbstored/backupprotocol.txt
- Merged fixes from trunk, r365 to r440


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbstored/backupprotocol.txt
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbstored/backupprotocol.txt	2006-02-12 13:37:36 UTC (rev 441)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbstored/backupprotocol.txt	2006-02-12 13:46:24 UTC (rev 442)
@@ -3,7 +3,7 @@
 #
 
 Name 				Backup
-IdentString			Box-Backup:v=B
+IdentString			Box-Backup:v=C
 ServerContextClass	BackupContext	BackupContext.h
 
 ClientType		Filename	BackupStoreFilenameClear	BackupStoreFilenameClear.h

Modified: box/chris/win32/vc2005-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-12 13:37:36 UTC (rev 441)
+++ box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-12 13:46:24 UTC (rev 442)
@@ -186,7 +186,19 @@
   LIBS="-Wl,-Bstatic $LIBS -Wl,-Bdynamic"
 fi
 
+## Kludge to allow makeparcels.pl to use bindir. This is not a good long term
+## solution because it prevents use of "make exec_prefix=/some/dir"
+saved_prefix=$prefix
+saved_exec_prefix=$exec_prefix
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+bindir_expanded=`eval "echo $bindir"`
+bindir_expanded=`eval "echo $bindir_expanded"`
+prefix=$saved_prefix
+exec_prefix=$saved_exec_prefix
+AC_SUBST([bindir_expanded])
 
+
 ### Output files
 AC_CONFIG_FILES([infrastructure/BoxPlatform.pm])
 AC_OUTPUT

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/BoxPlatform.pm.in	2006-02-12 13:37:36 UTC (rev 441)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/BoxPlatform.pm.in	2006-02-12 13:46:24 UTC (rev 442)
@@ -13,9 +13,9 @@
 	chomp $build_cpu;
 	# Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1
 	# Box Backup tried on Win2000,XP only :)
-	
-    $build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
 
+	$build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
+
 	$make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make';
 	$bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' && $build_os ne "SunOS");
 
@@ -34,10 +34,10 @@
 	$product_name = <VERSION>;
 	chomp $product_name;
 	close VERSION;
-	
+
 	# where to put the files
-	$install_into_dir = '@bindir@';
-	
+	$install_into_dir = '@bindir_expanded@';
+
 	# if it's Darwin,
 	if($build_os eq 'Darwin')
 	{

Modified: box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-12 13:37:36 UTC (rev 441)
+++ box/chris/win32/vc2005-compile-fixes/infrastructure/makeparcels.pl	2006-02-12 13:46:24 UTC (rev 442)
@@ -4,13 +4,6 @@
 use lib 'infrastructure';
 use BoxPlatform;
 
-my $os_suffix = '';
-if($build_os eq 'OpenBSD')
-{
-	$os_suffix = `uname -r`;
-	$os_suffix =~ tr/0-9//cd;
-}
-
 my @parcels;
 my %parcel_contents;
 
@@ -183,7 +176,7 @@
 
 sub parcel_root
 {
-	$product_name.'-'.$product_version.'-'.$_[0].'-'.$target_os.$os_suffix
+	$product_name.'-'.$product_version.'-'.$_[0].'-'.$target_os
 }
 
 sub parcel_dir

Modified: box/chris/win32/vc2005-compile-fixes/lib/raidfile/RaidFileWrite.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/raidfile/RaidFileWrite.cpp	2006-02-12 13:37:36 UTC (rev 441)
+++ box/chris/win32/vc2005-compile-fixes/lib/raidfile/RaidFileWrite.cpp	2006-02-12 13:46:24 UTC (rev 442)
@@ -461,10 +461,11 @@
 						ASSERT(sizeof(RaidFileRead::FileSizeType) == (2*sizeof(unsigned int)));
 						ASSERT(sizeof(RaidFileRead::FileSizeType) >= sizeof(off_t));
 						int sizePos = (blockSize/sizeof(unsigned int)) - 2;
-						RaidFileRead::FileSizeType sw = box_hton64(writeFileStat.st_size);
-						unsigned int *psize = (unsigned int *)(&sw);
-						pparity[sizePos+0] = pstripe1[sizePos+0] ^ psize[0];
-						pparity[sizePos+1] = pstripe1[sizePos+1] ^ psize[1];
+						union { RaidFileRead::FileSizeType l; unsigned int i[2]; } sw;
+
+						sw.l = box_hton64(writeFileStat.st_size);
+						pparity[sizePos+0] = pstripe1[sizePos+0] ^ sw.i[0];
+						pparity[sizePos+1] = pstripe1[sizePos+1] ^ sw.i[1];
 					}
 					else
 					{


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 14:36:01 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 12 Feb 2006 14:36:01 +0000
Subject: [Box Backup-dev] win32 review
Message-ID: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk>


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



From boxbackup-dev@fluffy.co.uk  Sun Feb 12 14:40:32 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 14:40:32 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r443 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060212144032.6EB9795@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 14:40:28 +0000 (Sun, 12 Feb 2006)
New Revision: 443

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
Log:
* win32/emu.cpp, win32/WinNamedPipeStream.cpp
- Changed TRUE/FALSE to true/false as requested by Ben


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp	2006-02-12 13:46:24 UTC (rev 442)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp	2006-02-12 14:40:28 UTC (rev 443)
@@ -104,10 +104,10 @@
 		THROW_EXCEPTION(ServerException, SocketOpenError)
 	}
 	
-	mReadClosed  = FALSE;
-	mWriteClosed = FALSE;
-	mIsServer    = TRUE; // must flush and disconnect before closing
-	mIsConnected = TRUE;
+	mReadClosed  = false;
+	mWriteClosed = false;
+	mIsServer    = true; // must flush and disconnect before closing
+	mIsConnected = true;
 }
 
 // --------------------------------------------------------------------------
@@ -142,10 +142,10 @@
 		THROW_EXCEPTION(ServerException, SocketOpenError)
 	}
 
-	mReadClosed  = FALSE;
-	mWriteClosed = FALSE;
-	mIsServer    = FALSE; // just close the socket
-	mIsConnected = TRUE;
+	mReadClosed  = false;
+	mWriteClosed = false;
+	mIsServer    = false; // just close the socket
+	mIsConnected = true;
 }
 
 // --------------------------------------------------------------------------
@@ -183,7 +183,7 @@
 	// Closed for reading at EOF?
 	if (NumBytesRead == 0)
 	{
-		mReadClosed = TRUE;
+		mReadClosed = true;
 	}
 	
 	return NumBytesRead;
@@ -223,7 +223,7 @@
 
 		if (!Success)
 		{
-			mWriteClosed = TRUE;	// assume can't write again
+			mWriteClosed = true;	// assume can't write again
 			THROW_EXCEPTION(ConnectionException, 
 				Conn_SocketWriteError)
 		}
@@ -246,7 +246,7 @@
 	{
 		fprintf(stderr, "Inconsistent connected state\n");
 		::syslog(LOG_ERR, "Inconsistent connected state");
-		mIsConnected = FALSE;
+		mIsConnected = false;
 	}
 
 	if (mSocketHandle == NULL) 
@@ -274,7 +274,7 @@
 	bool result = CloseHandle(mSocketHandle);
 
 	mSocketHandle = NULL;
-	mIsConnected = FALSE;
+	mIsConnected = false;
 
 	if (!result) 
 	{

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-12 13:46:24 UTC (rev 442)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-12 14:40:28 UTC (rev 443)
@@ -983,7 +983,7 @@
 }
 
 HANDLE gSyslogH = 0;
-static bool sHaveWarnedEventLogFull = FALSE;
+static bool sHaveWarnedEventLogFull = false;
 
 void syslog(int loglevel, const char *frmt, ...)
 {
@@ -1061,7 +1061,7 @@
 	}
 	else
 	{
-		sHaveWarnedEventLogFull = FALSE;
+		sHaveWarnedEventLogFull = false;
 	}
 
 	printf("%s\r\n", buffer);


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 14:41:32 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 14:41:32 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r444 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060212144132.A841295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 14:41:31 +0000 (Sun, 12 Feb 2006)
New Revision: 444

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
Log:
* BackupClientContext.cpp
- Removed double logging of keepalives


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-12 14:40:28 UTC (rev 443)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-12 14:41:31 UTC (rev 444)
@@ -607,12 +607,6 @@
 		return;
 	}
 
-	if (mExtendedLogging)
-	{
-		::syslog(LOG_INFO, "DoKeepAlive() sending keep-alive "
-			"packet now");
-	}
-
 	mpConnection->QueryGetIsAlive();
 }
 


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 15:04:40 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 15:04:40 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r445 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060212150440.AD07195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 15:04:37 +0000 (Sun, 12 Feb 2006)
New Revision: 445

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Use const_iterator on all platforms except MSVC, which doesn't like calling
  erase() with a const_iterator as a parameter


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-12 14:41:31 UTC (rev 444)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-12 15:04:37 UTC (rev 445)
@@ -1369,12 +1369,18 @@
 				storeDirs.insert(std::pair<std::string, BackupStoreDirectory::Entry *>(name.GetClearFilename(), storeDirEn));
 			}
 		}
+
+#ifdef _MSC_VER
+		typedef std::set<std::string>::iterator string_set_iter_t;
+#else
+		typedef std::set<std::string>::const_iterator string_set_iter_t;
+#endif
 		
 		// Now compare files.
 		for(std::set<std::pair<std::string, BackupStoreDirectory::Entry *> >::const_iterator i = storeFiles.begin(); i != storeFiles.end(); ++i)
 		{
 			// Does the file exist locally?
-			std::set<std::string>::iterator local(localFiles.find(i->first));
+			string_set_iter_t local(localFiles.find(i->first));
 			if(local == localFiles.end())
 			{
 				// Not found -- report
@@ -1552,7 +1558,7 @@
 		}
 		
 		// Report any files which exist on the locally, but not on the store
-		for(std::set<std::string>::iterator i = localFiles.begin(); i != localFiles.end(); ++i)
+		for(string_set_iter_t i = localFiles.begin(); i != localFiles.end(); ++i)
 		{
 			std::string localFileName(rLocalDir + 
 				DIRECTORY_SEPARATOR + *i);
@@ -1594,7 +1600,7 @@
 		for(std::set<std::pair<std::string, BackupStoreDirectory::Entry *> >::const_iterator i = storeDirs.begin(); i != storeDirs.end(); ++i)
 		{
 			// Does the directory exist locally?
-			std::set<std::string>::iterator local(localDirs.find(i->first));
+			string_set_iter_t local(localDirs.find(i->first));
 			if(local == localDirs.end())
 			{
 				// Not found -- report


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 15:07:31 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 15:07:31 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r446 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060212150731.EDAC895@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 15:07:25 +0000 (Sun, 12 Feb 2006)
New Revision: 446

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp
Log:
* WinNamedPipeStream.cpp
- Always call Close() on destruct, as long as we have a socket handle to close


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp	2006-02-12 15:04:37 UTC (rev 445)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/WinNamedPipeStream.cpp	2006-02-12 15:07:25 UTC (rev 446)
@@ -53,7 +53,7 @@
 // --------------------------------------------------------------------------
 WinNamedPipeStream::~WinNamedPipeStream()
 {
-	if (mSocketHandle != NULL && IsConnected())
+	if (mSocketHandle != NULL)
 	{
 		Close();
 	}


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 16:02:45 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 16:02:45 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r447 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060212160245.9A25A95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 16:02:42 +0000 (Sun, 12 Feb 2006)
New Revision: 447

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* emu.cpp, emu.h
- Changed ConvertConsoleToUtf8 (and vice versa) to take a std::string ref
  argument, and return a bool


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-12 15:07:25 UTC (rev 446)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-12 16:02:42 UTC (rev 447)
@@ -362,23 +362,32 @@
 // Function
 //		Name:    ConvertUtf8ToConsole
 //		Purpose: Converts a string from UTF-8 to the console 
-//			 code page. Returns a buffer which MUST be freed 
-//			 by the caller with delete[].
-//			 In case of fire, logs the error and returns NULL.
+//			 code page. On success, replaces contents of rDest 
+//			 and returns true. In case of fire, logs the error 
+//			 and returns false.
 //		Created: 4th February 2006
 //
 // --------------------------------------------------------------------------
-char* ConvertUtf8ToConsole(const char* pString)
+bool ConvertUtf8ToConsole(const char* pString, std::string& rDest)
 {
-	WCHAR* pMulti = ConvertToWideString(pString, CP_UTF8);
-	if (pMulti == NULL)
+	WCHAR* pWide = ConvertToWideString(pString, CP_UTF8);
+	if (pWide == NULL)
 	{
-		return NULL;
+		return false;
 	}
 
-	char* pConsole = ConvertFromWideString(pMulti, GetConsoleOutputCP());
-	delete [] pMulti;
-	return pConsole;
+	char* pConsole = ConvertFromWideString(pWide, GetConsoleOutputCP());
+	delete [] pWide;
+
+	if (!pConsole)
+	{
+		return false;
+	}
+
+	rDest = pConsole;
+	delete [] pConsole;
+
+	return true;
 }
 
 // --------------------------------------------------------------------------
@@ -386,23 +395,32 @@
 // Function
 //		Name:    ConvertConsoleToUtf8
 //		Purpose: Converts a string from the console code page
-//			 to UTF-8. Returns a buffer which MUST be freed 
-//			 by the caller with delete[].
-//			 In case of fire, logs the error and returns NULL.
+//			 to UTF-8. On success, replaces contents of rDest
+//			 and returns true. In case of fire, logs the error 
+//			 and returns false.
 //		Created: 4th February 2006
 //
 // --------------------------------------------------------------------------
-char* ConvertConsoleToUtf8(const char* pString)
+bool ConvertConsoleToUtf8(const char* pString, std::string& rDest)
 {
-	WCHAR* pMulti = ConvertToWideString(pString, GetConsoleCP());
-	if (pMulti == NULL)
+	WCHAR* pWide = ConvertToWideString(pString, GetConsoleCP());
+	if (pWide == NULL)
 	{
-		return NULL;
+		return false;
 	}
 
-	char* pConsole = ConvertFromWideString(pMulti, CP_UTF8);
-	delete [] pMulti;
-	return pConsole;
+	char* pConsole = ConvertFromWideString(pWide, CP_UTF8);
+	delete [] pWide;
+
+	if (!pConsole)
+	{
+		return false;
+	}
+
+	rDest = pConsole;
+	delete [] pConsole;
+
+	return true;
 }
 
 

Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-12 15:07:25 UTC (rev 446)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2006-02-12 16:02:42 UTC (rev 447)
@@ -194,7 +194,7 @@
 extern int optind;
 extern char nextchar;
 
-inline int getopt(int count, char * const * args, char * tolookfor)
+inline int getopt(int count, char * const * args, const char * tolookfor)
 {
 	if (optind >= count) return -1;
 
@@ -466,10 +466,8 @@
 int poll(struct pollfd *ufds, unsigned long nfds, int timeout);
 bool EnableBackupRights( void );
 
-// caller must free the returned buffer with delete[]
-char* ConvertUtf8ToConsole(const char* pString);
-char* ConvertConsoleToUtf8(const char* pString);
-char* ConvertFromWideString(const WCHAR* pString, unsigned int DestCodepage);
+bool ConvertUtf8ToConsole(const char* pString, std::string& rDest);
+bool ConvertConsoleToUtf8(const char* pString, std::string& rDest);
 
 //
 // MessageId: MSG_ERR_EXIST


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 16:03:33 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 16:03:33 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r448 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060212160333.7B7F295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 16:03:28 +0000 (Sun, 12 Feb 2006)
New Revision: 448

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- std:string ConvertUtf8


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-12 16:02:42 UTC (rev 447)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-12 16:03:28 UTC (rev 448)
@@ -333,10 +333,9 @@
 	if(args.size() > 0)
 	{
 #ifdef WIN32
-		char* buffer = ConvertConsoleToUtf8(args[0].c_str());
-		if(!buffer) return;
-		std::string storeDirEncoded(buffer);
-		delete [] buffer;
+		std::string storeDirEncoded;
+		if(!ConvertConsoleToUtf8(args[0].c_str(), storeDirEncoded))
+			return;
 #else
 		const std::string& storeDirEncoded(rStoreDir);
 #endif
@@ -467,11 +466,10 @@
 		if(!FirstLevel)
 		{
 #ifdef WIN32
-			char* buffer = ConvertUtf8ToConsole(
-				rListRoot.c_str());
-			if(!buffer) return;
-			printf("%s/", buffer);
-			delete [] buffer;
+			std::string listRootDecoded;
+			if(!ConvertUtf8ToConsole(rListRoot.c_str(), 
+				listRootDecoded)) return;
+			printf("%s/", listRootDecoded.c_str());
 #else
 			printf("%s/", rListRoot.c_str());
 #endif
@@ -479,11 +477,11 @@
 		
 #ifdef WIN32
 		{
-			char* buffer = ConvertUtf8ToConsole(
-				clear.GetClearFilename().c_str());
-			if(!buffer) return;
-			printf("%s", buffer);
-			delete [] buffer;
+			std::string fileName;
+			if(!ConvertUtf8ToConsole(
+				clear.GetClearFilename().c_str(), fileName))
+				return;
+			printf("%s", fileName.c_str());
 		}
 #else
 		printf("%s", clear.GetClearFilename().c_str());
@@ -662,11 +660,10 @@
 	{
 		r += "/";
 #ifdef WIN32
-		char* buffer = ConvertUtf8ToConsole(
-			mDirStack[l].first.c_str());
-		if(!buffer) return "unknown";
-		r += buffer;
-		delete [] buffer;
+		std::string dirName;
+		if(!ConvertUtf8ToConsole(mDirStack[l].first.c_str(), dirName))
+			return "error";
+		r += dirName;
 #else
 		r += mDirStack[l].first;
 #endif
@@ -693,10 +690,8 @@
 	}
 
 #ifdef WIN32
-	char* buffer = ConvertConsoleToUtf8(args[0].c_str());
-	if(!buffer) return;
-	std::string dirName(buffer);
-	delete [] buffer;
+	std::string dirName;
+	if(!ConvertConsoleToUtf8(args[0].c_str(), dirName)) return;
 #else
 	std::string& dirName(args[0]);
 #endif
@@ -734,10 +729,9 @@
 	
 	// Try changing directory
 #ifdef WIN32
-	char* buffer = ConvertConsoleToUtf8(args[0].c_str());
-	if(!buffer) return;
-	int result = ::chdir(buffer);
-	delete [] buffer;
+	std::string dirName;
+	if(!ConvertConsoleToUtf8(args[0].c_str(), dirName)) return;
+	int result = ::chdir(dirName.c_str());
 #else
 	int result = ::chdir(args[0].c_str());
 #endif
@@ -757,10 +751,8 @@
 	}
 
 #ifdef WIN32
-	buffer = ConvertUtf8ToConsole(wd);
-	if(!buffer) return;
-	printf("Local current directory is now '%s'\n", buffer);
-	delete [] buffer;
+	if(!ConvertUtf8ToConsole(wd, dirName)) return;
+	printf("Local current directory is now '%s'\n", dirName.c_str());
 #else
 	printf("Local current directory is now '%s'\n", wd);
 #endif
@@ -892,10 +884,10 @@
 			// Specified by name, find the object in the directory to get the ID
 			BackupStoreDirectory::Iterator i(dir);
 #ifdef WIN32
-			char* buffer = ConvertConsoleToUtf8(args[0].c_str());
-			if(!buffer) return;
-			BackupStoreFilenameClear fn(buffer);
-			delete [] buffer;
+			std::string fileName;
+			if(!ConvertConsoleToUtf8(args[0].c_str(), fileName))
+				return;
+			BackupStoreFilenameClear fn(fileName);
 #else
 			BackupStoreFilenameClear fn(args[0]);
 #endif
@@ -1147,10 +1139,8 @@
 void BackupQueries::Compare(const std::string &rStoreDir, const std::string &rLocalDir, BackupQueries::CompareParams &rParams)
 {
 #ifdef WIN32
-	char* buffer = ConvertConsoleToUtf8(rStoreDir.c_str());
-	if(!buffer) return;
-	std::string storeDirEncoded(buffer);
-	delete [] buffer;
+	std::string storeDirEncoded;
+	if(!ConvertConsoleToUtf8(rStoreDir.c_str(), storeDirEncoded)) return;
 #else
 	const std::string& storeDirEncoded(rStoreDir);
 #endif
@@ -1169,10 +1159,8 @@
 	}
 
 #ifdef WIN32
-	buffer = ConvertConsoleToUtf8(rLocalDir.c_str());
-	if(!buffer) return;
-	std::string localDirEncoded(buffer);
-	delete [] buffer;
+	std::string localDirEncoded;
+	if(!ConvertConsoleToUtf8(rLocalDir.c_str(), localDirEncoded)) return;
 #else
 	std::string localDirEncoded(rLocalDir);
 #endif
@@ -1196,21 +1184,11 @@
 #ifdef WIN32
 	// By this point, rStoreDir and rLocalDir should be in UTF-8 encoding
 
-	char* localNamePtr = ConvertUtf8ToConsole(rLocalDir.c_str());
-	char* storeNamePtr = ConvertUtf8ToConsole(rStoreDir.c_str());
+	std::string localName;
+	std::string storeName;
 
-	if (!localNamePtr || !storeNamePtr)
-	{
-		if (localNamePtr) delete [] localNamePtr;
-		if (storeNamePtr) delete [] storeNamePtr;
-		return;
-	}
-
-	std::string localName(localNamePtr);
-	std::string storeName(storeNamePtr);
-
-	delete [] localNamePtr;
-	delete [] storeNamePtr;
+	if(!ConvertUtf8ToConsole(rLocalDir.c_str(), localName)) return;
+	if(!ConvertUtf8ToConsole(rStoreDir.c_str(), storeName)) return;
 #else
 	const std::string& localName(rLocalDir);
 	const std::string& storeName(rStoreDir);
@@ -1687,10 +1665,9 @@
 	else
 	{
 #ifdef WIN32
-		char* buffer = ConvertConsoleToUtf8(args[0].c_str());
-		if(!buffer) return;
-		std::string storeDirEncoded(buffer);
-		delete [] buffer;
+		std::string storeDirEncoded;
+		if(!ConvertConsoleToUtf8(args[0].c_str(), storeDirEncoded))
+			return;
 #else
 		const std::string& storeDirEncoded(args[0]);
 #endif
@@ -1714,10 +1691,8 @@
 	}
 	
 #ifdef WIN32
-	char* buffer = ConvertConsoleToUtf8(args[1].c_str());
-	if(!buffer) return;
-	std::string localName(buffer);
-	delete [] buffer;
+	std::string localName;
+	if(!ConvertConsoleToUtf8(args[1].c_str(), localName)) return;
 #else
 	std::string localName(args[1]);
 #endif
@@ -1866,10 +1841,8 @@
 	}
 
 #ifdef WIN32
-	char* buffer = ConvertConsoleToUtf8(args[0].c_str());
-	if(!buffer) return;
-	std::string storeDirEncoded(buffer);
-	delete [] buffer;
+	std::string storeDirEncoded;
+	if(!ConvertConsoleToUtf8(args[0].c_str(), storeDirEncoded)) return;
 #else
 	const std::string& storeDirEncoded(rStoreDir);
 #endif


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 16:04:13 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 16:04:13 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r449 - box/chris/win32/vc2005-compile-fixes
Message-ID: <20060212160413.B42E995@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 16:04:10 +0000 (Sun, 12 Feb 2006)
New Revision: 449

Modified:
   box/chris/win32/vc2005-compile-fixes/configure.ac
Log:
* configure.ac
- No need to link against msvcr*.dll any more


Modified: box/chris/win32/vc2005-compile-fixes/configure.ac
===================================================================
--- box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-12 16:03:28 UTC (rev 448)
+++ box/chris/win32/vc2005-compile-fixes/configure.ac	2006-02-12 16:04:10 UTC (rev 449)
@@ -89,9 +89,6 @@
   AC_SEARCH_LIBS([regcomp], [pcreposix])
 fi
 
-AC_SEARCH_LIBS([_cgetws], [msvcr71 msvcr80],
-  AC_DEFINE([HAVE_CGETWS], [1], [Define to 1 if we have a _cgetws function]))
-
 ### Checks for typedefs, structures, and compiler characteristics.
 
 AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t])


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 16:04:58 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 16:04:58 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r450 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060212160458.3FB8A95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 16:04:57 +0000 (Sun, 12 Feb 2006)
New Revision: 450

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- Undid changes to formatting of if() statements


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-12 16:04:10 UTC (rev 449)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-12 16:04:57 UTC (rev 450)
@@ -94,9 +94,8 @@
 //		Created: 18/2/04
 //
 // --------------------------------------------------------------------------
-unsigned int WINAPI HelperThread( LPVOID lpParam ) 
+unsigned int WINAPI HelperThread(LPVOID lpParam) 
 { 
-	// printf( "Parameter = %lu.\n", *(DWORD*)lpParam ); 
 	((BackupDaemon *)lpParam)->RunHelperThread();
 
 	return 0;
@@ -307,7 +306,7 @@
 				bool disconnect = false;
 
 				// Command to process!
-				if (command == "quit" || command == "")
+				if(command == "quit" || command == "")
 				{
 					// Close the socket.
 					disconnect = true;
@@ -320,20 +319,20 @@
 					this->mSyncIsForcedOut = false;
 					sendOK = true;
 				}
-				else if (command == "force-sync")
+				else if(command == "force-sync")
 				{
 					// Sync now (forced -- overrides any SyncAllowScript)
 					this->mDoSyncFlagOut = true;
 					this->mSyncIsForcedOut = true;
 					sendOK = true;
 				}
-				else if (command == "reload")
+				else if(command == "reload")
 				{
 					// Reload the configuration
 					SetReloadConfigWanted();
 					sendOK = true;
 				}
-				else if (command == "terminate")
+				else if(command == "terminate")
 				{
 					// Terminate the daemon cleanly
 					SetTerminateWanted();
@@ -389,7 +388,7 @@
 	{
 		Run2();
 	}
-	catch (...)
+	catch(...)
 	{
 		FiniTimer();
 		throw;


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 16:06:28 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 12 Feb 2006 16:06:28 +0000 (GMT)
Subject: [Box Backup-dev] win32 review
In-Reply-To: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk>
References: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602121443180.14656@top.qwarx.com>

Hi Ben,

> 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.

Changed as requested, but I thought that TRUE and true were the same?

> 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.

Can I leave it in then? Or can we syslog on all platforms? (would seem to 
make sense to me).

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

Sorry, I didn't like it either, but on Windows with the console in unicode 
mode, read() returns zero (i.e. doesn't work) if the user enters any 
unicode character.

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

OK, removed the extra logging.

> 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?

OK, changed ConvertConsoleToUtf8 (and vice versa) to take a std::string 
ref as a parameter, and return a bool.

> 	-- why have we moved from storing a line in a std::string to using 
> printf() (and without the :: prefix?)

I was originally using wprintf for the filename, until I found that it 
didn't work properly. I can probably revert most of that now, if you like. 
It seemed like a lot of trouble to add everything to a string, if all you 
were going to do was print it out at the end.

Almost none of the printfs in BackupQueries have ::. Do you want me to add 
them?

Also, almost none of the error messages are sent to stderr, perhaps that 
should be fixed?

> 	-- please #define const_iterator iterator on Win32 only, rather than 
> removing this type check on all platforms

Done. MSVC doesn't like to call erase() with a const argument.

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

I don't think it's a good idea, since the default console font can't 
handle unicode, but can handle the user's native codepage. The 
non-unicode option will work better for most people.

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

I thought about this, but I came up against a problem. I include these 
files in the client parcel, but their location changes from SVN checkouts 
to release tarballs. That means I can't rely on their location in the 
parcels.txt, which makes things very complicated.

Why do we have this strange distribution system where the location of the 
contrib directory changes? Can it be fixed? Otherwise, can I put contrib 
stuff somewhere other than under distribution/boxbackup?

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

Sorry, I'd forgotten about those, I've changed them back.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 17:21:42 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 12 Feb 2006 17:21:42 +0000
Subject: [Box Backup-dev] win32 review
In-Reply-To: <Pine.LNX.4.62.0602121443180.14656@top.qwarx.com>
References: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk> <Pine.LNX.4.62.0602121443180.14656@top.qwarx.com>
Message-ID: <B66B94F7-1F0A-4F55-B870-6C1C13B7EA50@fluffy.co.uk>

On 12 Feb 2006, at 16:06, Chris Wilson wrote:

> Hi Ben,
>
>> 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.
>
> Changed as requested, but I thought that TRUE and true were the same?

bool can only take true and false as a value, but BOOL is an int (on  
MS platforms anyway) which means that TRUE and FALSE are only two  
possible values.

>
>> 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.
>
> Can I leave it in then? Or can we syslog on all platforms? (would  
> seem to make sense to me).

Leave it in for now. Let it get revisited when logging is sorted out.

>
>> lib/common/FdGetLine.cpp
>> 	-- eeek! But whatever, shouldn't catch anyone unawares, but  
>> still, eek!
>
> Sorry, I didn't like it either, but on Windows with the console in  
> unicode mode, read() returns zero (i.e. doesn't work) if the user  
> enters any unicode character.

OK.

>
>> bin/bbackupd/BackupClientContext.cpp
>> 	-- if Protocol doesn't log it, it wasn't sent.
>
> OK, removed the extra logging.

But I wonder if it's actually working then. Was the problem only  
reported under Win32?


>
>> 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?
>
> OK, changed ConvertConsoleToUtf8 (and vice versa) to take a  
> std::string ref as a parameter, and return a bool.

Thanks.

>
>> 	-- why have we moved from storing a line in a std::string to  
>> using printf() (and without the :: prefix?)
>
> I was originally using wprintf for the filename, until I found that  
> it didn't work properly. I can probably revert most of that now, if  
> you like. It seemed like a lot of trouble to add everything to a  
> string, if all you were going to do was print it out at the end.

I do see your point. However, it means that it'll only print things  
out a line at a time, which may make things nicer for stuff reading  
the data through a pipe. Although it's not a huge thing, I suppose.

>
> Almost none of the printfs in BackupQueries have ::. Do you want me  
> to add them?

I'm sure I would have put them in if I were writing it. They're new  
according to the diff.

>
> Also, almost none of the error messages are sent to stderr, perhaps  
> that should be fixed?

Maybe.

>
>> 	-- please #define const_iterator iterator on Win32 only, rather  
>> than removing this type check on all platforms
>
> Done. MSVC doesn't like to call erase() with a const argument.
>
>> bin/bbackupquery/bbackupquery.cpp
>> 	-- I would have done unicode by default, with a flag to switch it  
>> off
>
> I don't think it's a good idea, since the default console font  
> can't handle unicode, but can handle the user's native codepage.  
> The non-unicode option will work better for most people.

Oh, I see. Isn't Windows fun?

>
>> distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
>> 	-- add your new directories, and check you have everything in the  
>> archive created by
>> 		infrastructure/makedistribution.pl boxbackup
>
> I thought about this, but I came up against a problem. I include  
> these files in the client parcel, but their location changes from  
> SVN checkouts to release tarballs. That means I can't rely on their  
> location in the parcels.txt, which makes things very complicated.

Well if they're needed, they shouldn't be in contrib, I suppose.

>
> Why do we have this strange distribution system where the location  
> of the contrib directory changes? Can it be fixed? Otherwise, can I  
> put contrib stuff somewhere other than under distribution/boxbackup?

I make multiple distributions from a single tree. It would get very  
messy if things were done differently.

>
>> Usual mumblings about style. eg "if(command == "quit" || command  
>> == "")" CHANGED to "if (command == "quit" || command == "")", it's  
>> not even new code!
>
> Sorry, I'd forgotten about those, I've changed them back.

:-)

Ben


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 19:30:14 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 12 Feb 2006 19:30:14 +0000 (GMT)
Subject: [Box Backup-dev] win32 review
In-Reply-To: <B66B94F7-1F0A-4F55-B870-6C1C13B7EA50@fluffy.co.uk>
References: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk>
 <Pine.LNX.4.62.0602121443180.14656@top.qwarx.com>
 <B66B94F7-1F0A-4F55-B870-6C1C13B7EA50@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602121925290.14656@top.qwarx.com>

Hi Ben,

> bool can only take true and false as a value, but BOOL is an int (on MS 
> platforms anyway) which means that TRUE and FALSE are only two possible 
> values.

Ok, I didn't know that. I will use true and false from now on.

> But I wonder if it's actually working then. Was the problem only 
> reported under Win32?

Definitely not on Win32 (just tested it, no keepalives sent). I'll debug 
and fix it, whether it's win32 only or cross-platform.

> I do see your point. However, it means that it'll only print things out 
> a line at a time, which may make things nicer for stuff reading the data 
> through a pipe. Although it's not a huge thing, I suppose.

If stdout is line buffered, which it normally would be when it's 
redirected to a pipe on Unix, surely it won't make any difference?

> I'm sure I would have put them in if I were writing it. They're new 
> according to the diff.

Yes, some are, but there are many existing printfs that don't have ::. 
I'll add it to these new ones at least.

>>  Also, almost none of the error messages are sent to stderr, perhaps 
>>  that should be fixed?
>
> Maybe.

OK, will leave them alone for now, maybe we should revisit this for the 
next release.

>>  I don't think it's a good idea, since the default console font can't 
>>  handle unicode, but can handle the user's native codepage. The 
>>  non-unicode option will work better for most people.
>
> Oh, I see. Isn't Windows fun?

Yes, I love the fact that I've spent more or less four full days fighting 
with code pages and Unicode support for the console.

>>  I thought about this, but I came up against a problem. I include these 
>>  files in the client parcel, but their location changes from SVN 
>>  checkouts to release tarballs. That means I can't rely on their 
>>  location in the parcels.txt, which makes things very complicated.
>
> Well if they're needed, they shouldn't be in contrib, I suppose.

They're not strictly needed, I suppose I could leave them out of the 
parcel if you prefer. But at least it's nice to have a sample 
bbackupd.conf in the parcel to work from.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 20:15:44 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 20:15:44 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r451 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
Message-ID: <20060212201544.1205C95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 20:15:37 +0000 (Sun, 12 Feb 2006)
New Revision: 451

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Unix compile fixes


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-12 16:04:57 UTC (rev 450)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp	2006-02-12 20:15:37 UTC (rev 451)
@@ -337,7 +337,7 @@
 		if(!ConvertConsoleToUtf8(args[0].c_str(), storeDirEncoded))
 			return;
 #else
-		const std::string& storeDirEncoded(rStoreDir);
+		const std::string& storeDirEncoded(args[0]);
 #endif
 	
 		// Attempt to find the directory
@@ -693,7 +693,7 @@
 	std::string dirName;
 	if(!ConvertConsoleToUtf8(args[0].c_str(), dirName)) return;
 #else
-	std::string& dirName(args[0]);
+	const std::string& dirName(args[0]);
 #endif
 	
 	std::vector<std::pair<std::string, int64_t> > newStack;
@@ -1844,7 +1844,7 @@
 	std::string storeDirEncoded;
 	if(!ConvertConsoleToUtf8(args[0].c_str(), storeDirEncoded)) return;
 #else
-	const std::string& storeDirEncoded(rStoreDir);
+	const std::string& storeDirEncoded(args[0]);
 #endif
 	
 	// Get directory ID


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 20:33:50 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 20:33:50 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r452 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060212203350.1030595@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 20:33:39 +0000 (Sun, 12 Feb 2006)
New Revision: 452

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.h
Log:
* BackupClientContext.cpp
* BackupClientContext.h
- Removed the second set of diff time variables that was causing confusion


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-12 20:15:37 UTC (rev 451)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.cpp	2006-02-12 20:33:39 UTC (rev 452)
@@ -57,9 +57,7 @@
 	  mpExcludeFiles(0),
 	  mpExcludeDirs(0),
 	  mbIsManaged(false),
-	  mTimeMgmtEpoch(0),
-	  mMaximumDiffTime(600),
-	  mKeepAliveTime(0)
+	  mTimeMgmtEpoch(0)
 {
 }
 
@@ -626,10 +624,10 @@
 
 int BackupClientContext::GetMaximumDiffingTime() 
 {
-	return mMaximumDiffTime;
+	return sMaximumDiffTime;
 }
 
 int BackupClientContext::GetKeepaliveTime() 
 {
-	return mKeepAliveTime;
+	return sKeepAliveTime;
 }

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.h	2006-02-12 20:15:37 UTC (rev 451)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupClientContext.h	2006-02-12 20:33:39 UTC (rev 452)
@@ -208,11 +208,6 @@
 	bool mbIsManaged;
 	// unix time when diff was started
 	time_t mTimeMgmtEpoch;
-	// maximum time to spend diffing, in seconds
-	int mMaximumDiffTime;
-	// maximum time of SSL inactivity (keep-alive interval), in seconds
-	int mKeepAliveTime;
-
 };
 
 


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 20:36:08 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 20:36:08 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r453 - box/chris/win32/vc2005-compile-fixes/lib/backupclient
Message-ID: <20060212203608.36C4795@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 20:36:00 +0000 (Sun, 12 Feb 2006)
New Revision: 453

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp
Log:
* BackupStoreFileDiff.cpp
- Move the diff timer expired check to the start of the loop, so it will be
  executed every time round, not bypassed by the break on line 686


Modified: box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-12 20:33:39 UTC (rev 452)
+++ box/chris/win32/vc2005-compile-fixes/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-12 20:36:00 UTC (rev 453)
@@ -577,6 +577,31 @@
 			int rollOverInitialBytes = 0;
 			while(true)
 			{
+				if(sDiffTimerExpired)
+				{
+					ASSERT(TimeMgmtEpoch > 0);
+					ASSERT(pDiffTimer != NULL);
+					
+					time_t tTotalRunIntvl = time(NULL) - TimeMgmtEpoch;
+					
+					if(MaximumDiffingTime > 0 && 
+						tTotalRunIntvl >= MaximumDiffingTime)
+					{
+						TRACE0("MaximumDiffingTime reached - "
+							"suspending file diff\n");
+						abortSearch = true;
+						break;
+					}
+					else if(KeepAliveTime > 0)
+					{
+						TRACE0("KeepAliveTime reached - "
+							"initiating keep-alive\n");
+						pDiffTimer->DoKeepAlive();
+					}
+
+					sDiffTimerExpired = false;
+				}
+
 				// Load in another block of data, and record how big it is
 				int bytesInEndings = rFile.Read(endings, Sizes[s]);
 				int tmp;
@@ -661,38 +686,12 @@
 							break;
 						}
 
-						bool DiffTimedOut = false;
-						
-						if(sDiffTimerExpired)
-						{
-							ASSERT(TimeMgmtEpoch > 0);
-							ASSERT(pDiffTimer != NULL);
-							
-							time_t tTotalRunIntvl = time(NULL) - TimeMgmtEpoch;
-							
-							if(MaximumDiffingTime > 0 && 
-								tTotalRunIntvl >= MaximumDiffingTime)
-							{
-								TRACE0("MaximumDiffingTime reached - "
-									"suspending file diff\n");
-								DiffTimedOut = true;
-							}
-							else if(KeepAliveTime > 0)
-							{
-								TRACE0("KeepAliveTime reached - "
-									"initiating keep-alive\n");
-								pDiffTimer->DoKeepAlive();
-							}
-
-							sDiffTimerExpired = false;
-						}
-
 						int64_t NumBlocksFound = static_cast<int64_t>(
 							rFoundBlocks.size());
 						int64_t MaxBlocksFound = NumBlocks * 
 							BACKUP_FILE_DIFF_MAX_BLOCK_FIND_MULTIPLE;
 						
-						if(NumBlocksFound > MaxBlocksFound || DiffTimedOut)
+						if(NumBlocksFound > MaxBlocksFound)
 						{
 							abortSearch = true;
 							break;


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 20:50:35 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 12 Feb 2006 20:50:35 +0000 (GMT)
Subject: [Box Backup-dev] win32 review
In-Reply-To: <Pine.LNX.4.62.0602121925290.14656@top.qwarx.com>
References: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk>
 <Pine.LNX.4.62.0602121443180.14656@top.qwarx.com>
 <B66B94F7-1F0A-4F55-B870-6C1C13B7EA50@fluffy.co.uk>
 <Pine.LNX.4.62.0602121925290.14656@top.qwarx.com>
Message-ID: <Pine.LNX.4.62.0602122049550.14656@top.qwarx.com>

Hi Ben,

>>  But I wonder if it's actually working then. Was the problem only 
>>  reported under Win32?
>
> Definitely not on Win32 (just tested it, no keepalives sent). I'll debug 
> and fix it, whether it's win32 only or cross-platform.

It was broken on all platforms. The latest patches in vc2005-compile-fixes 
should fix it.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 22:39:18 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 22:39:18 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r454 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060212223918.55ED195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 22:39:14 +0000 (Sun, 12 Feb 2006)
New Revision: 454

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.h
Log:
* BackupDaemon.cpp, BackupDaemon.h
- Only delete the serialised state when we're about to start a backup,
  since otherwise it's still valid and should be maintained


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-12 20:36:00 UTC (rev 453)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-12 22:39:14 UTC (rev 454)
@@ -504,8 +504,8 @@
 		BackupClientContext::ClientStoreMarker_NotKnown;
 	// haven't contacted the store yet
 
- 	DeserializeStoreObjectInfo(clientStoreMarker, lastSyncTime, 
-		nextSyncTime);
+ 	bool deserialised = DeserializeStoreObjectInfo(clientStoreMarker, 
+		lastSyncTime, nextSyncTime);
  
 	// --------------------------------------------------------------------------------------------
 	
@@ -607,6 +607,17 @@
 				// but this should be OK, because the changes only upload should upload no data.
 				syncPeriodEndExtended += SecondsToBoxTime((time_t)(356*24*3600));
 			}
+
+			// Delete the serialised store object file,
+			// so that we don't try to reload it after a
+			// partially completed backup
+			if(!DeleteStoreObjectInfo())
+			{
+				::syslog(LOG_ERR, "Failed to delete the "
+					"StoreObjectInfoFile, backup cannot "
+					"continue safely.");
+				continue;
+			}
 			
 			// Do sync
 			bool errorOccurred = false;
@@ -2228,7 +2239,7 @@
 //		Created: 2005/04/11
 //
 // --------------------------------------------------------------------------
-void BackupDaemon::DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime)
+bool BackupDaemon::DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime)
 {
 	//
 	//
@@ -2240,7 +2251,7 @@
 	//
 	if(!GetConfiguration().KeyExists("StoreObjectInfoFile"))
 	{
-		return;
+		return false;
 	}
 
 	std::string StoreObjectInfoFile = 
@@ -2248,7 +2259,7 @@
 
 	if (StoreObjectInfoFile.size() <= 0)
 	{
-		return;
+		return false;
 	}
 
 	try
@@ -2268,7 +2279,7 @@
 				"is not a valid or compatible serialised "
 				"archive. Will re-cache from store.", 
 				StoreObjectInfoFile.c_str());
-			return;
+			return false;
 		}
 
 		//
@@ -2283,7 +2294,7 @@
 				"is not a valid or compatible serialised "
 				"archive. Will re-cache from store.", 
 				StoreObjectInfoFile.c_str());
-			return;
+			return false;
 		}
 
 		//
@@ -2296,11 +2307,11 @@
 		if (iVersion != STOREOBJECTINFO_VERSION)
 		{
 			::syslog(LOG_WARNING, "Store object info file '%s' "
-				"version [%d] unsupported. "
+				"version %d unsupported. "
 				"Will re-cache from store.", 
 				StoreObjectInfoFile.c_str(), 
 				iVersion);
-			return;
+			return false;
 		}
 
 		//
@@ -2315,7 +2326,7 @@
 			::syslog(LOG_WARNING, "Store object info file '%s' "
 				"out of date. Will re-cache from store", 
 				StoreObjectInfoFile.c_str());
-			return;
+			return false;
 		}
 
 		//
@@ -2363,12 +2374,7 @@
 			"version [%d]", StoreObjectInfoFile.c_str(), 
 			iVersion);
 
-		if (::unlink(StoreObjectInfoFile.c_str()) != 0)
-		{
-			::syslog(LOG_ERR, "Failed to delete the old "
-				"store object info file '%s': %s",
-				StoreObjectInfoFile.c_str(), strerror(errno));
-		}
+		return true;
 	}
 	catch (...)
 	{
@@ -2384,4 +2390,38 @@
 			"Will re-cache from store.", 
 			StoreObjectInfoFile.c_str());
 	}
+
+	return false;
 }
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupDaemon::DeleteStoreObjectInfo()
+//		Purpose: Deletes the serialised state file, to prevent us
+//			 from using it again if a backup is interrupted.
+//
+//		Created: 2006/02/12
+//
+// --------------------------------------------------------------------------
+
+bool BackupDaemon::DeleteStoreObjectInfo() const
+{
+	if(!GetConfiguration().KeyExists("StoreObjectInfoFile"))
+	{
+		return false;
+	}
+
+	std::string StoreObjectInfoFile = 
+		GetConfiguration().GetKeyValue("StoreObjectInfoFile");
+
+	if (::unlink(StoreObjectInfoFile.c_str()) != 0)
+	{
+		::syslog(LOG_ERR, "Failed to delete the old "
+			"store object info file '%s': %s",
+			StoreObjectInfoFile.c_str(), strerror(errno));
+		return false;
+	}
+
+	return true;
+}

Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.h	2006-02-12 20:36:00 UTC (rev 453)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.h	2006-02-12 22:39:14 UTC (rev 454)
@@ -45,10 +45,11 @@
 	BackupDaemon();
 	~BackupDaemon();
 
+private:
 	// methods below do partial (specialized) serialization of client state only
 	void SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time_t theLastSyncTime, box_time_t theNextSyncTime) const;
-	void DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
-private:
+	bool DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
+	bool DeleteStoreObjectInfo() const;
 	BackupDaemon(const BackupDaemon &);
 public:
 


From boxbackup-dev@fluffy.co.uk  Sun Feb 12 22:56:30 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 12 Feb 2006 22:56:30 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r455 - box/chris/win32/vc2005-compile-fixes/bin/bbackupd
Message-ID: <20060212225630.9D86295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-12 22:56:26 +0000 (Sun, 12 Feb 2006)
New Revision: 455

Modified:
   box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- Only try to delete the store info file if we successfully deserialised it


Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-12 22:39:14 UTC (rev 454)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupd/BackupDaemon.cpp	2006-02-12 22:56:26 UTC (rev 455)
@@ -611,7 +611,7 @@
 			// Delete the serialised store object file,
 			// so that we don't try to reload it after a
 			// partially completed backup
-			if(!DeleteStoreObjectInfo())
+			if(deserialised && !DeleteStoreObjectInfo())
 			{
 				::syslog(LOG_ERR, "Failed to delete the "
 					"StoreObjectInfoFile, backup cannot "


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 00:14:44 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 12 Feb 2006 16:14:44 -0800 (PST)
Subject: [Box Backup-dev] win32 review
In-Reply-To: <Pine.LNX.4.62.0602122049550.14656@top.qwarx.com>
Message-ID: <20060213001444.57252.qmail@web36710.mail.mud.yahoo.com>

Chris,

> It was broken on all platforms. The latest patches in vc2005-compile-fixes 
> should fix it.

Is that included in the distrobution that you have already uploaded?

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Mon Feb 13 00:23:32 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 13 Feb 2006 00:23:32 +0000 (GMT)
Subject: [Box Backup-dev] win32 review
In-Reply-To: <20060213001444.57252.qmail@web36710.mail.mud.yahoo.com>
References: <20060213001444.57252.qmail@web36710.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602130023070.14656@top.qwarx.com>

Hi Gary,

>> It was broken on all platforms. The latest patches in vc2005-compile-fixes
>> should fix it.
>
> Is that included in the distrobution that you have already uploaded?

No, I haven't built a new distribution yet.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 00:47:40 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 13 Feb 2006 00:47:40 +0000
Subject: [Box Backup-dev] COMMIT r437 - box/trunk/lib/raidfile
In-Reply-To: <20060212131230.5C67D95@s0g0.pems.testserver.co.uk>
References: <20060212131230.5C67D95@s0g0.pems.testserver.co.uk>
Message-ID: <1139791661.5944.40.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-12 at 13:12 +0000, subversion@fluffy.co.uk wrote:
> Author: chromi
> Date: 2006-02-12 13:12:28 +0000 (Sun, 12 Feb 2006)
> New Revision: 437
> 
> Modified:
>    box/trunk/lib/raidfile/RaidFileWrite.cpp
> Log:
> Change "PPC workaround" to use union instead of memcpy().  All tests now pass.

That is absolutely the right fix. I should obviously have been sleeping
not hacking. :) Thanks for pointing this out.

[Ben suggested an extra assert, but a few lines up in the code there is
essentially the same assert anyway, so I don't think this is necessary.]

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 01:19:47 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 13 Feb 2006 01:19:47 +0000
Subject: [Box Backup-dev] win32 review
In-Reply-To: <B66B94F7-1F0A-4F55-B870-6C1C13B7EA50@fluffy.co.uk>
References: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk>
 <Pine.LNX.4.62.0602121443180.14656@top.qwarx.com>
 <B66B94F7-1F0A-4F55-B870-6C1C13B7EA50@fluffy.co.uk>
Message-ID: <1139793588.5944.65.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-12 at 17:21 +0000, Ben Summers wrote:
> On 12 Feb 2006, at 16:06, Chris Wilson wrote:
> > Changed as requested, but I thought that TRUE and true were the same?
> 
> bool can only take true and false as a value, but BOOL is an int (on  
> MS platforms anyway) which means that TRUE and FALSE are only two  
> possible values.

In addition it is important for overloading. If there are both a bool
and an int overload for a function then because TRUE is 1 and FALSE is 0
they will call the int overload, not the bool one. In addition TRUE and
FALSE are normally #defines, which are generally not nice and best
avoided in code.

> > Why do we have this strange distribution system where the location  
> > of the contrib directory changes? Can it be fixed? Otherwise, can I  
> > put contrib stuff somewhere other than under distribution/boxbackup?
> 
> I make multiple distributions from a single tree. It would get very  
> messy if things were done differently.

Is this still true now that box is in its own svn? Could it be special
cased in the release script code? I must admit it seems a little odd,
and it would be nice for svn to match the tar releases where possible.
eg. It would make building packages from tars of svn the same as from
official tars without any special cases.

Cheers,

Martin.



From boxbackup-dev@fluffy.co.uk  Mon Feb 13 01:27:46 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 13 Feb 2006 01:27:46 +0000
Subject: [Box Backup-dev] Extended attributes on FreeBSD 5/6
In-Reply-To: <20060212105855.GB31646@netinertia.co.uk>
References: <20060212105855.GB31646@netinertia.co.uk>
Message-ID: <1139794066.5944.73.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-12 at 10:58 +0000, James O'Gorman wrote:
> I just had a quick poke around FreeBSD to see how Robert Watson's
> implemented ACLs, and it seems to use /usr/include/sys/acl.h instead of
> xattr.h.
> 
> I guess xattr support for FreeBSD isn't going to make it for the 0.10
> release now, but it'd be nice to have it in a future release.

I'm not sure how much detail you know about acl and xattrs, but they are
quite different things.

It just so happens that on Linux acls were designed using xattrs as
their underlying storage mechanism, so by handling xattrs we get acls
for free. I don't believe this is true of all platforms. Currently box
knows nothing about acls.

What sort of functions are in acl.h? Does it look like they're really
xattr functions (listattr etc) in a different file, or is it a different
API? If the former then we can try and fix something up, otherwise it's
a whole new feature. Abstracting out the attributes support to make it
into a generic interface with implementations for each type would make
the code more flexible and easier I think, maybe such a thing could come
out in the wash in such a change.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 01:12:23 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 13 Feb 2006 01:12:23 +0000
Subject: [Box Backup-dev] COMMIT r445 -
 box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
In-Reply-To: <20060212150440.AD07195@s0g0.pems.testserver.co.uk>
References: <20060212150440.AD07195@s0g0.pems.testserver.co.uk>
Message-ID: <1139793143.5944.58.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-12 at 15:04 +0000, subversion@fluffy.co.uk wrote:
> Author: chris
> Date: 2006-02-12 15:04:37 +0000 (Sun, 12 Feb 2006)
> New Revision: 445
> 
> Modified:
>    box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
> Log:
> * BackupQueries.cpp
> - Use const_iterator on all platforms except MSVC, which doesn't like calling
>   erase() with a const_iterator as a parameter

Well it doesn't happen very often, but I believe MSVC is right here and
g++ is wrong. Specifically, it appears to be a bug in libstdc++:
set::iterator is actually typedef'd to the underlying container's
const_iterator. Thus it will happily take const_iterator to erase,
despite it being declared as only taking iterator. There's a note in the
libstdc++ header file (look in bits/stl_set.h) about the type being
wrong, so it's obviously a known issue they've got problems with.

The correct fix here is to use the correct non-const iterator for these
two variables called 'local'. It also won't lose any const safety
because these vars are only ever used for calling erase() anyway.

> +#ifdef _MSC_VER
> +		typedef std::set<std::string>::iterator string_set_iter_t;

I personally advocate using typedefs for all container uses thus making
it much easier to access the iterators and not end up with crazy types
throughout the code, and make it much easier to make changes later
(define everything in one place only), so I like the way you were headed
here.

I would typedef the set like so (named after use not underlying type):

typedef std::set<std::string> FilenameSet;

Then it's FilenameSet::iterator, which is a whole lot tidier. I think
it's a shame they didn't manage to make types work like statics in the
standard. ie. so you could do somelistvar.iterator just like you can do
someobjectvar.staticmethod() without actually knowing the type. I think
they didn't because it caused major problems with the parsers and
templates, but it would have massively improved stl usability.

> -		for(std::set<std::string>::iterator i = localFiles.begin(); i != localFiles.end(); ++i)
> +		for(string_set_iter_t i = localFiles.begin(); i != localFiles.end(); ++i)

I've no idea why you're changing the type of this one when it isn't even
used for calling erase(). Only the two iterators called 'local' appear
to be affected.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 09:25:41 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 13 Feb 2006 09:25:41 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r445 -	box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
In-Reply-To: <1139793143.5944.58.camel@avenin.ebourne.me.uk>
References: <20060212150440.AD07195@s0g0.pems.testserver.co.uk>
 <1139793143.5944.58.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602130924510.14656@top.qwarx.com>

Hi Martin,

>> -		for(std::set<std::string>::iterator i = 
>>   localFiles.begin(); i != localFiles.end(); ++i)
>> +		for(string_set_iter_t i = localFiles.begin(); i != 
>>   localFiles.end(); ++i)
>
> I've no idea why you're changing the type of this one when it isn't even
> used for calling erase(). Only the two iterators called 'local' appear
> to be affected.

Well spotted, that would be a bug :-) (although it compiles fine, since 
localFiles is not modified).

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 09:37:53 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 13 Feb 2006 09:37:53 +0000
Subject: [Box Backup-dev] Fwd: Bandwidth usage patch
References: <43EE2808.8070003@overnet.qc.ca>
Message-ID: <0CD1BE57-A509-49A0-9B0F-D7C6F9BCE0FD@fluffy.co.uk>

--Apple-Mail-1-454999898
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


Pascal has sent me the patch below. While it's not a completely  
correct solution (as it ignored SSL overhead), shall we add it in to  
the next release?

Ben



Begin forwarded message:

> From: Pascal Lalonde <plalonde@overnet.qc.ca>
> Date: 11 February 2006 18:08:08 GMT
> To: Ben Summers <ben@fluffy.co.uk>
> Subject: Bandwidth usage patch
>
> Hi Ben,
>
> I created a small patch to make the server log the transferred size
> after each connection. If the code meets your standards, I was hoping
> you could include this. The calculations seem to be pretty accurate,
> almost matching the ones found in the client's logs.
>
> Knowing the total transferred size lets me know who eats all my
> bandwidth as well as which clients are not uploading as they should  
> due
> to configuration errors.
>
> I wrote a small script to sum up the transfer sizes and report the
> total. Since my boxbackup logs rotate monthly, I can get the monthly
> bandwidth usage. I'm sending it too (I'm no perl expert though!).
>
> I've been running my patch for a little while now with no problems.  
> The
> runtest.PL reports all tests as PASSED for OpenBSD 3.8 and Debian 3.1.
>
> By the way, I haven't had any trouble with 0.09-plus2.
> Keep up the good work.
>
> Pascal
> Index: lib/server/SocketStream.cpp
> ===================================================================
> --- lib/server/SocketStream.cpp	(revision 412)
> +++ lib/server/SocketStream.cpp	(working copy)
> @@ -35,7 +35,9 @@
>  SocketStream::SocketStream()
>  	: mSocketHandle(-1),
>  	  mReadClosed(false),
> -	  mWriteClosed(false)
> +	  mWriteClosed(false),
> +	  mBytesRead(0),
> +	  mBytesWritten(0)
>  {
>  }
>
> @@ -50,7 +52,9 @@
>  SocketStream::SocketStream(int socket)
>  	: mSocketHandle(socket),
>  	  mReadClosed(false),
> -	  mWriteClosed(false)
> +	  mWriteClosed(false),
> +	  mBytesRead(0),
> +	  mBytesWritten(0)
>  {
>  	if(socket < 0)
>  	{
> @@ -69,7 +73,9 @@
>  SocketStream::SocketStream(const SocketStream &rToCopy)
>  	: mSocketHandle(::dup(rToCopy.mSocketHandle)),
>  	  mReadClosed(rToCopy.mReadClosed),
> -	  mWriteClosed(rToCopy.mWriteClosed)
> +	  mWriteClosed(rToCopy.mWriteClosed),
> +	  mBytesRead(rToCopy.mBytesRead),
> +	  mBytesWritten(rToCopy.mBytesWritten)
>
>  {
>  	if(rToCopy.mSocketHandle < 0)
> @@ -111,6 +117,7 @@
>  	if(mSocketHandle != -1) {THROW_EXCEPTION(ServerException,  
> SocketAlreadyOpen)}
>
>  	mSocketHandle = socket;
> +	ResetCounters();
>  }
>
>
> @@ -151,6 +158,7 @@
>  		mSocketHandle = -1;
>  		THROW_EXCEPTION(ConnectionException, Conn_SocketConnectError)
>  	}
> +	ResetCounters();
>  }
>
>  //  
> ---------------------------------------------------------------------- 
> ----
> @@ -222,6 +230,7 @@
>  		mReadClosed = true;
>  	}
>  	
> +	mBytesRead += r;
>  	return r;
>  }
>
> @@ -263,6 +272,8 @@
>  		bytesLeft -= sent;
>  		// Move buffer pointer
>  		buffer += sent;
> +
> +		mBytesWritten += sent;
>  		
>  		// Need to wait until it can send again?
>  		if(bytesLeft > 0)
> Index: lib/server/SocketStream.h
> ===================================================================
> --- lib/server/SocketStream.h	(revision 412)
> +++ lib/server/SocketStream.h	(working copy)
> @@ -56,6 +56,15 @@
>  	tOSSocketHandle mSocketHandle;
>  	bool mReadClosed;
>  	bool mWriteClosed;
> +
> +protected:
> +	off_t mBytesRead;
> +	off_t mBytesWritten;
> +
> +public:
> +	off_t GetBytesRead() const {return mBytesRead;}
> +	off_t GetBytesWritten() const {return mBytesWritten;}
> +	void ResetCounters() {mBytesRead = mBytesWritten = 0;}
>  };
>
>  #endif // SOCKETSTREAM__H
> Index: lib/server/SocketStreamTLS.cpp
> ===================================================================
> --- lib/server/SocketStreamTLS.cpp	(revision 412)
> +++ lib/server/SocketStreamTLS.cpp	(working copy)
> @@ -40,6 +40,7 @@
>  SocketStreamTLS::SocketStreamTLS()
>  	: mpSSL(0), mpBIO(0)
>  {
> +	ResetCounters();
>  }
>
>  //  
> ---------------------------------------------------------------------- 
> ----
> @@ -101,6 +102,7 @@
>  {
>  	SocketStream::Open(Type, Name, Port);
>  	Handshake(rContext);
> +	ResetCounters();
>  }
>
>
> @@ -295,6 +297,7 @@
>  		{
>  		case SSL_ERROR_NONE:
>  			// No error, return number of bytes read
> +			mBytesRead += r;
>  			return r;
>  			break;
>
> @@ -358,6 +361,7 @@
>  		{
>  		case SSL_ERROR_NONE:
>  			// No error, data sent, return success
> +			mBytesWritten += r;
>  			return;
>  			break;
>
> Index: bin/bbstored/BackupStoreDaemon.cpp
> ===================================================================
> --- bin/bbstored/BackupStoreDaemon.cpp	(revision 412)
> +++ bin/bbstored/BackupStoreDaemon.cpp	(working copy)
> @@ -278,7 +278,25 @@
>  	BackupProtocolServer server(rStream);
>  	server.SetLogToSysLog(mExtendedLogging);
>  	server.SetTimeout(BACKUP_STORE_TIMEOUT);
> -	server.DoServer(context);
> +	try
> +	{
> +		server.DoServer(context);
> +		LogConnectionStats(clientCommonName.c_str(), rStream);
> +	}
> +	catch(...)
> +	{
> +		LogConnectionStats(clientCommonName.c_str(), rStream);
> +		throw;
> +	}
>  	context.CleanUp();
>  }
>
> +void BackupStoreDaemon::LogConnectionStats(const char *commonName,
> +		const SocketStreamTLS &s)
> +{
> +	// Log the amount of data transferred
> +	::syslog(LOG_INFO, "Connection statistics for %s: "
> +			"IN=%lld OUT=%lld TOTAL=%lld\n", commonName,
> +			s.GetBytesRead(), s.GetBytesWritten(),
> +			s.GetBytesRead() + s.GetBytesWritten());
> +}
> Index: bin/bbstored/BackupStoreDaemon.h
> ===================================================================
> --- bin/bbstored/BackupStoreDaemon.h	(revision 412)
> +++ bin/bbstored/BackupStoreDaemon.h	(working copy)
> @@ -61,6 +61,8 @@
>  	void HousekeepingProcess();
>  	bool CheckForInterProcessMsg(int AccountNum = 0, int  
> MaximumWaitTime = 0);
>
> +	void LogConnectionStats(const char *commonName, const  
> SocketStreamTLS &s);
> +
>  private:
>  	BackupStoreAccountDatabase *mpAccountDatabase;
>  	BackupStoreAccounts *mpAccounts;
--Apple-Mail-1-454999898
Content-Transfer-Encoding: 7bit
Content-Type: application/x-perl;
	x-unix-mode=0666;
	name="boxusage.pl"
Content-Disposition: attachment;
	filename=boxusage.pl

#!/usr/bin/perl

use bigint;

$accfile = "/etc/box/bbstored/accounts.txt";

if (!open(ACCFILE, $accfile)) {
	&error("Could not open accounts file");
}

while ($line = <ACCFILE>) {
	$line =~ /(\d*):.*/;
	push(@accounts, $1);
}
close(ACCFILE);

foreach $account (@accounts) {
	$total{$account} = 0;
}

$now = localtime();
print("BoxBackup bandwidth usage on ", $now, ":\n");
while ($line = <>) {
	if ($line =~ /Connection statistics for BACKUP-([0-9A-Fa-f]*): IN=([0-9]*) OUT=([0-9]*) TOTAL=([0-9]*)/) {
		$total{$1} = $total{$1} + $4;
	}
}

foreach $account (@accounts) {
	print("BACKUP-", $account, ":\t", $total{$account}, " (Megs: ", $total{$account} / 1024 / 1024, ")\n");
}

exit(0);

--Apple-Mail-1-454999898
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed



--Apple-Mail-1-454999898--

From boxbackup-dev@fluffy.co.uk  Mon Feb 13 10:26:23 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 13 Feb 2006 10:26:23 +0000
Subject: [Box Backup-dev] Fwd: Bandwidth usage patch
In-Reply-To: <0CD1BE57-A509-49A0-9B0F-D7C6F9BCE0FD@fluffy.co.uk>
References: <43EE2808.8070003@overnet.qc.ca>
 <0CD1BE57-A509-49A0-9B0F-D7C6F9BCE0FD@fluffy.co.uk>
Message-ID: <1139826383.5944.89.camel@avenin.ebourne.me.uk>

On Mon, 2006-02-13 at 09:37 +0000, Ben Summers wrote:
> Pascal has sent me the patch below. While it's not a completely  
> correct solution (as it ignored SSL overhead), shall we add it in to  
> the next release?

Here are my contradictory thoughts on the matter:

- We should be in feature freeze or we'll never get 0.10 out. We don't
want to end up like Emacs which hasn't had a release in several years.
They've been "preparing the release" for 18 months and in "feature
freeze" for a year. Hmm.

- But this patch is quite contained and looks very safe. It's worthwhile
extra functionality and we don't seem to be in a state to release
imminently (we will certainly need another release candidate) so I'd put
it in 0.10.

> > +	try
> > +	{
> > +		server.DoServer(context);
> > +		LogConnectionStats(clientCommonName.c_str(), rStream);
> > +	}
> > +	catch(...)
> > +	{
> > +		LogConnectionStats(clientCommonName.c_str(), rStream);
> > +		throw;
> > +	}

This bit is wrong. If LogConnectionStats throws an exception the last
thing you want to do is call it again in the catch block. Should look
like so:

> > +	  try
> > +	{
> > +		server.DoServer(context);
> > +	}
> > +	catch(...)
> > +	{
> > +		LogConnectionStats(clientCommonName.c_str(), rStream);
> > +		throw;
> > +	}
> > +     LogConnectionStats(clientCommonName.c_str(), rStream);

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 10:55:15 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 13 Feb 2006 10:55:15 +0000
Subject: [Box Backup-dev] Fwd: Bandwidth usage patch
In-Reply-To: <1139826383.5944.89.camel@avenin.ebourne.me.uk>
References: <43EE2808.8070003@overnet.qc.ca> <0CD1BE57-A509-49A0-9B0F-D7C6F9BCE0FD@fluffy.co.uk> <1139826383.5944.89.camel@avenin.ebourne.me.uk>
Message-ID: <A3E285D8-1EDF-4E9E-9857-412B1BAB1B84@fluffy.co.uk>

I think I agree, let's just stick it in for now. (with the fix)

I'll add it after I've merged the Win32 stuff -- have you taken a  
peek at it recently?

Ben



On 13 Feb 2006, at 10:26, Martin Ebourne wrote:

>
> On Mon, 2006-02-13 at 09:37 +0000, Ben Summers wrote:
>> Pascal has sent me the patch below. While it's not a completely
>> correct solution (as it ignored SSL overhead), shall we add it in to
>> the next release?
>
> Here are my contradictory thoughts on the matter:
>
> - We should be in feature freeze or we'll never get 0.10 out. We don't
> want to end up like Emacs which hasn't had a release in several years.
> They've been "preparing the release" for 18 months and in "feature
> freeze" for a year. Hmm.
>
> - But this patch is quite contained and looks very safe. It's  
> worthwhile
> extra functionality and we don't seem to be in a state to release
> imminently (we will certainly need another release candidate) so  
> I'd put
> it in 0.10.
>
>>> +	try
>>> +	{
>>> +		server.DoServer(context);
>>> +		LogConnectionStats(clientCommonName.c_str(), rStream);
>>> +	}
>>> +	catch(...)
>>> +	{
>>> +		LogConnectionStats(clientCommonName.c_str(), rStream);
>>> +		throw;
>>> +	}
>
> This bit is wrong. If LogConnectionStats throws an exception the last
> thing you want to do is call it again in the catch block. Should look
> like so:
>
>>> +	  try
>>> +	{
>>> +		server.DoServer(context);
>>> +	}
>>> +	catch(...)
>>> +	{
>>> +		LogConnectionStats(clientCommonName.c_str(), rStream);
>>> +		throw;
>>> +	}
>>> +     LogConnectionStats(clientCommonName.c_str(), rStream);
>
> Cheers,
>
> Martin.
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 10:59:45 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 13 Feb 2006 10:59:45 +0000
Subject: [Box Backup-dev] win32 review
In-Reply-To: <1139793588.5944.65.camel@avenin.ebourne.me.uk>
References: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk> <Pine.LNX.4.62.0602121443180.14656@top.qwarx.com> <B66B94F7-1F0A-4F55-B870-6C1C13B7EA50@fluffy.co.uk> <1139793588.5944.65.camel@avenin.ebourne.me.uk>
Message-ID: <3CB7BF19-7FA2-4EFC-A357-C5CFEF9D0013@fluffy.co.uk>

On 13 Feb 2006, at 01:19, Martin Ebourne wrote:

> On Sun, 2006-02-12 at 17:21 +0000, Ben Summers wrote:
>> On 12 Feb 2006, at 16:06, Chris Wilson wrote:
>
>>> Why do we have this strange distribution system where the location
>>> of the contrib directory changes? Can it be fixed? Otherwise, can I
>>> put contrib stuff somewhere other than under distribution/boxbackup?
>>
>> I make multiple distributions from a single tree. It would get very
>> messy if things were done differently.
>
> Is this still true now that box is in its own svn?

Well, no. But it would be nice to me to be able to pull back the  
changes to other stuff I've done, and if we want to promote it as  
"yet another UNIX framework" then it's essential.


> Could it be special
> cased in the release script code? I must admit it seems a little odd,
> and it would be nice for svn to match the tar releases where possible.
> eg. It would make building packages from tars of svn the same as from
> official tars without any special cases.

The release script also adds the license to files. And you can't just  
tar up a SVN checkout because of the doubling of size. So you've got  
to use a script at some point to make it consistent.

Ben





From boxbackup-dev@fluffy.co.uk  Mon Feb 13 11:33:48 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Mon, 13 Feb 2006 11:33:48 +0000
Subject: [Box Backup-dev] Extended attributes on FreeBSD 5/6
In-Reply-To: <1139794066.5944.73.camel@avenin.ebourne.me.uk>
References: <20060212105855.GB31646@netinertia.co.uk> <1139794066.5944.73.camel@avenin.ebourne.me.uk>
Message-ID: <20060213113348.GD31646@netinertia.co.uk>

Hi Martin,

On Mon, Feb 13, 2006 at 01:27:46AM +0000, Martin Ebourne wrote:
> I'm not sure how much detail you know about acl and xattrs, but they are
> quite different things.

To be honest, I don't know much about them at all. I do use ACLs in
FreeBSD as I do need to assign more than one group to a dir in several
cases on my production machines. I'm almost one of those dangerous
people who has a little knowledge but not quite enough ;-)

> It just so happens that on Linux acls were designed using xattrs as
> their underlying storage mechanism, so by handling xattrs we get acls
> for free. I don't believe this is true of all platforms. Currently box
> knows nothing about acls.

Right, got it. Is ACL support in the pipeline, or is that way in the
future (or a complete nono)? While it's not necessary obviously it would
be nice if we could have it.

> What sort of functions are in acl.h? Does it look like they're really
> xattr functions (listattr etc) in a different file, or is it a different
> API? If the former then we can try and fix something up, otherwise it's
> a whole new feature. Abstracting out the attributes support to make it
> into a generic interface with implementations for each type would make
> the code more flexible and easier I think, maybe such a thing could come
> out in the wash in such a change.

I had another look and as well as sys/acl.h there's a sys/extattr.h.

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/ has these files.

James

From boxbackup-dev@fluffy.co.uk  Mon Feb 13 11:51:48 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 13 Feb 2006 11:51:48 +0000
Subject: [Box Backup-dev] Win32 Merge, OK?
Message-ID: <7D939A5C-F5DB-44E9-BE8F-541A0CB64080@fluffy.co.uk>

Any objections to me merging this:

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

and then Pascal's bandwidth patch (with adjustment?)

Maybe it's not quite perfect, but I want to get another release  
candidate out there.

Ben




From boxbackup-dev@fluffy.co.uk  Mon Feb 13 13:30:30 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 13 Feb 2006 13:30:30 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r456 - in box/trunk: . bin/bbackupctl bin/bbackupd bin/bbackupquery distribution/boxbackup docs/backup infrastructure infrastructure/msvc infrastructure/msvc/2003 infrastructure/msvc/2005 lib/backupclient lib/common lib/server lib/win32 test/win32
Message-ID: <20060213133030.1975095@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-13 13:30:21 +0000 (Mon, 13 Feb 2006)
New Revision: 456

Added:
   box/trunk/infrastructure/msvc/
   box/trunk/infrastructure/msvc/2003/
   box/trunk/infrastructure/msvc/2003/bbackupctl.vcproj
   box/trunk/infrastructure/msvc/2003/bbackupd.vcproj
   box/trunk/infrastructure/msvc/2003/boxbackup.sln
   box/trunk/infrastructure/msvc/2003/boxbackup.suo
   box/trunk/infrastructure/msvc/2003/boxquery.vcproj
   box/trunk/infrastructure/msvc/2003/common.vcproj
   box/trunk/infrastructure/msvc/2003/win32test.vcproj
   box/trunk/infrastructure/msvc/2005/
   box/trunk/infrastructure/msvc/2005/bbackupctl.vcproj
   box/trunk/infrastructure/msvc/2005/bbackupd.vcproj
   box/trunk/infrastructure/msvc/2005/boxbackup.sln
   box/trunk/infrastructure/msvc/2005/boxbackup.suo
   box/trunk/infrastructure/msvc/2005/boxquery.vcproj
   box/trunk/infrastructure/msvc/2005/common.vcproj
   box/trunk/infrastructure/msvc/2005/win32test.vcproj
   box/trunk/lib/win32/config.h.win32
   box/trunk/test/win32/Makefile
   box/trunk/test/win32/timezone.cpp
Removed:
   box/trunk/bbackupctl.vcproj
   box/trunk/bbackupd.vcproj
   box/trunk/boxbackup.sln
   box/trunk/boxbackup.suo
   box/trunk/boxquery.vcproj
   box/trunk/common.vcproj
   box/trunk/infrastructure/msvc/2003/
   box/trunk/infrastructure/msvc/2003/bbackupctl.vcproj
   box/trunk/infrastructure/msvc/2003/bbackupd.vcproj
   box/trunk/infrastructure/msvc/2003/boxbackup.sln
   box/trunk/infrastructure/msvc/2003/boxbackup.suo
   box/trunk/infrastructure/msvc/2003/boxquery.vcproj
   box/trunk/infrastructure/msvc/2003/common.vcproj
   box/trunk/infrastructure/msvc/2003/win32test.vcproj
   box/trunk/infrastructure/msvc/2005/
   box/trunk/infrastructure/msvc/2005/bbackupctl.vcproj
   box/trunk/infrastructure/msvc/2005/bbackupd.vcproj
   box/trunk/infrastructure/msvc/2005/boxbackup.sln
   box/trunk/infrastructure/msvc/2005/boxbackup.suo
   box/trunk/infrastructure/msvc/2005/boxquery.vcproj
   box/trunk/infrastructure/msvc/2005/common.vcproj
   box/trunk/infrastructure/msvc/2005/win32test.vcproj
   box/trunk/win32test.vcproj
Modified:
   box/trunk/bin/bbackupctl/bbackupctl.cpp
   box/trunk/bin/bbackupd/BackupClientContext.cpp
   box/trunk/bin/bbackupd/BackupClientContext.h
   box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
   box/trunk/bin/bbackupd/BackupDaemon.cpp
   box/trunk/bin/bbackupd/BackupDaemon.h
   box/trunk/bin/bbackupd/Win32ServiceFunctions.cpp
   box/trunk/bin/bbackupd/bbackupd.cpp
   box/trunk/bin/bbackupquery/BackupQueries.cpp
   box/trunk/bin/bbackupquery/bbackupquery.cpp
   box/trunk/configure.ac
   box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
   box/trunk/docs/backup/win32_build_on_cygwin_using_mingw.txt
   box/trunk/infrastructure/makeparcels.pl
   box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
   box/trunk/lib/backupclient/BackupClientRestore.cpp
   box/trunk/lib/backupclient/BackupStoreFile.cpp
   box/trunk/lib/backupclient/BackupStoreFileDiff.cpp
   box/trunk/lib/backupclient/BackupStoreFilenameClear.cpp
   box/trunk/lib/backupclient/BackupStoreObjectDump.cpp
   box/trunk/lib/common/BoxPlatform.h
   box/trunk/lib/common/DebugMemLeakFinder.cpp
   box/trunk/lib/common/EventWatchFilesystemObject.cpp
   box/trunk/lib/common/ExcludeList.cpp
   box/trunk/lib/common/FdGetLine.cpp
   box/trunk/lib/common/FileStream.h
   box/trunk/lib/common/Guards.h
   box/trunk/lib/common/NamedLock.cpp
   box/trunk/lib/common/Test.h
   box/trunk/lib/common/UnixUser.cpp
   box/trunk/lib/common/WaitForEvent.cpp
   box/trunk/lib/server/Daemon.cpp
   box/trunk/lib/server/LocalProcessStream.cpp
   box/trunk/lib/server/Socket.cpp
   box/trunk/lib/server/SocketListen.h
   box/trunk/lib/server/SocketStream.cpp
   box/trunk/lib/win32/WinNamedPipeStream.cpp
   box/trunk/lib/win32/emu.cpp
   box/trunk/lib/win32/emu.h
   box/trunk/parcels.txt
   box/trunk/test/win32/testlibwin32.cpp
   box/trunk/win32.bat
Log:
Merge chris/win32/vc2005-compile-fixes @ r455, add infrastructure/msvc to distribution

Deleted: box/trunk/bbackupctl.vcproj
===================================================================
--- box/trunk/bbackupctl.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bbackupctl.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="bbackupctl"
-	ProjectGUID="{9FD51412-E945-4457-A17A-CA3C505CF431}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\zlib\lib\zdll.lib $(ProjectDir)..\openssl\lib\libeay32.lib $(ProjectDir)..\openssl\lib\ssleay32.lib $(ProjectDir)Debug\common.lib $(ProjectDir)..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
-				OutputFile="$(OutDir)/bbackupctl.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/bbackupctl.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\zlib\lib\zdll.lib $(ProjectDir)..\openssl\lib\libeay32.lib $(ProjectDir)..\openssl\lib\ssleay32.lib $(ProjectDir)Release\common.lib"
-				OutputFile="$(OutDir)/bbackupctl.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="bbackupctl"
-					Filter="">
-					<File
-						RelativePath=".\bin\bbackupctl\bbackupctl.cpp">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Deleted: box/trunk/bbackupd.vcproj
===================================================================
--- box/trunk/bbackupd.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bbackupd.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="bbackupd"
-	ProjectGUID="{22D325FB-9131-4BD6-B390-968F0491D687}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)..\db-4.2.52.NC\build_win32&quot;;&quot;$(SolutionDir)..\boost_1_31_0&quot;;&quot;$(SolutionDir)..\openssl\include&quot;;&quot;$(SolutionDir)..\zlib\include&quot;;&quot;$(SolutionDir)lib\backupclient&quot;;&quot;$(SolutionDir)lib\server&quot;;&quot;$(SolutionDir)lib\crypto&quot;;&quot;$(SolutionDir)lib\compress&quot;;&quot;$(SolutionDir)lib\win32&quot;;&quot;$(SolutionDir)lib\common\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\zlib\lib\zdll.lib $(ProjectDir)..\openssl\lib\libeay32.lib $(ProjectDir)..\openssl\lib\ssleay32.lib $(ProjectDir)Debug\common.lib $(ProjectDir)lib\win32\Debug\boost_regex.lib $(ProjectDir)..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
-				OutputFile="$(OutDir)/bbackupd.exe"
-				LinkIncremental="2"
-				IgnoreAllDefaultLibraries="FALSE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/bbackupd.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;;&quot;$(SolutionDir)..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\zlib\lib\zdll.lib $(ProjectDir)..\openssl\lib\libeay32.lib $(ProjectDir)..\openssl\lib\ssleay32.lib $(ProjectDir)Release\common.lib $(ProjectDir)lib\win32\Release\boost_regex.lib"
-				OutputFile="$(OutDir)/bbackupd.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="bbackupd"
-					Filter="">
-					<File
-						RelativePath=".\bin\bbackupd\BackupClientContext.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\BackupClientDeleteList.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\BackupClientDirectoryRecord.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\BackupClientInodeToIDMap.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\BackupDaemon.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\bbackupd.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\bbwinservice.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\ServiceBackupDaemon.cpp">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="bbackupd"
-					Filter="">
-					<File
-						RelativePath=".\bin\bbackupd\BackupClientContext.h">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\BackupClientDeleteList.h">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\BackupClientDirectoryRecord.h">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\BackupClientInodeToIDMap.h">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\BackupDaemon.h">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\bbwinservice.h">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupd\ServiceBackupDaemon.h">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-		<File
-			RelativePath=".\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Modified: box/trunk/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/trunk/bin/bbackupctl/bbackupctl.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupctl/bbackupctl.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -10,8 +10,11 @@
 #include "Box.h"
 
 #include <stdio.h>
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include "MainHelper.h"
 #include "BoxPortsAndFiles.h"
 #include "BackupDaemonConfigVerify.h"
@@ -212,7 +215,7 @@
 		// No? Just send the command given plus a quit command.
 		std::string cmd(argv[0]);
 		cmd += "\nquit\n";
-		connection.Write(cmd.c_str(), cmd.size());		
+		connection.Write(cmd.c_str(), cmd.size());
 	}
 	
 	// Read the response

Modified: box/trunk/bin/bbackupd/BackupClientContext.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupClientContext.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupd/BackupClientContext.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -57,9 +57,7 @@
 	  mpExcludeFiles(0),
 	  mpExcludeDirs(0),
 	  mbIsManaged(false),
-	  mTimeMgmtEpoch(0),
-	  mMaximumDiffTime(600),
-	  mKeepAliveTime(0)
+	  mTimeMgmtEpoch(0)
 {
 }
 
@@ -511,6 +509,9 @@
 
 #ifdef PLATFORM_CYGWIN
 	::signal(SIGALRM, TimerSigHandler);
+#elif defined WIN32
+	// no support for SIGVTALRM
+	SetTimerHandler(TimerSigHandler);
 #else
 	::signal(SIGVTALRM, TimerSigHandler);
 #endif // PLATFORM_CYGWIN
@@ -599,7 +600,10 @@
 void BackupClientContext::DoKeepAlive()
 {
 	if (!mpConnection)
+	{
+		::syslog(LOG_ERR, "DoKeepAlive() called with no connection!");
 		return;
+	}
 
 	mpConnection->QueryGetIsAlive();
 }
@@ -620,10 +624,10 @@
 
 int BackupClientContext::GetMaximumDiffingTime() 
 {
-	return mMaximumDiffTime;
+	return sMaximumDiffTime;
 }
 
 int BackupClientContext::GetKeepaliveTime() 
 {
-	return mKeepAliveTime;
+	return sKeepAliveTime;
 }

Modified: box/trunk/bin/bbackupd/BackupClientContext.h
===================================================================
--- box/trunk/bin/bbackupd/BackupClientContext.h	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupd/BackupClientContext.h	2006-02-13 13:30:21 UTC (rev 456)
@@ -208,11 +208,6 @@
 	bool mbIsManaged;
 	// unix time when diff was started
 	time_t mTimeMgmtEpoch;
-	// maximum time to spend diffing, in seconds
-	int mMaximumDiffTime;
-	// maximum time of SSL inactivity (keep-alive interval), in seconds
-	int mKeepAliveTime;
-
 };
 
 

Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,7 +9,10 @@
 
 #include "Box.h"
 
-#include <dirent.h>
+#ifdef HAVE_DIRENT_H
+	#include <dirent.h>
+#endif
+
 #include <errno.h>
 #include <string.h>
 

Modified: box/trunk/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupd/BackupDaemon.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -11,8 +11,10 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
 #ifdef HAVE_SIGNAL_H
 	#include <signal.h>
 #endif
@@ -35,6 +37,9 @@
 	#include <cstdio>
 	#include <sys/mnttab.h>
 #endif
+#ifdef HAVE_PROCESS_H
+	#include <process.h>
+#endif
 
 #include "Configuration.h"
 #include "IOStream.h"
@@ -78,9 +83,28 @@
 // This prevents repetative cycles of load on the server
 #define		SYNC_PERIOD_RANDOM_EXTRA_TIME_SHIFT_BY	6
 
+#ifdef WIN32
 // --------------------------------------------------------------------------
 //
 // Function
+//		Name:    HelperThread()
+//		Purpose: Background thread function, called by Windows,
+//			calls the BackupDaemon's RunHelperThread method
+//			to listen for and act on control communications
+//		Created: 18/2/04
+//
+// --------------------------------------------------------------------------
+unsigned int WINAPI HelperThread(LPVOID lpParam) 
+{ 
+	((BackupDaemon *)lpParam)->RunHelperThread();
+
+	return 0;
+}
+#endif
+
+// --------------------------------------------------------------------------
+//
+// Function
 //		Name:    BackupDaemon::BackupDaemon()
 //		Purpose: constructor
 //		Created: 2003/10/08
@@ -99,6 +123,20 @@
 	{
 		mNotificationsSent[l] = false;
 	}
+
+#ifdef WIN32
+	// Create a thread to handle the named pipe
+	HANDLE hThread;
+	unsigned int dwThreadId;
+
+	hThread = (HANDLE) _beginthreadex( 
+        	NULL,                        // default security attributes 
+        	0,                           // use default stack size  
+        	HelperThread,                // thread function 
+        	this,                        // argument to thread function 
+        	0,                           // use default creation flags 
+        	&dwThreadId);                // returns the thread identifier 
+#endif
 }
 
 // --------------------------------------------------------------------------
@@ -185,11 +223,12 @@
 	if(GetConfiguration().KeyExists("CommandSocket"))
 	{
 		printf(
-				"============================================================================================\n" \
-				"SECURITY WARNING: This platform cannot check the credentials of connections to the\n" \
-				"command socket. This is a potential DoS security problem.\n" \
-				"Remove the CommandSocket directive from the bbackupd.conf file if bbackupctl is not used.\n" \
-				"============================================================================================\n"
+				"==============================================================================\n"
+				"SECURITY WARNING: This platform cannot check the credentials of connections to\n"
+				"the command socket. This is a potential DoS security problem.\n"
+				"Remove the CommandSocket directive from the bbackupd.conf file if bbackupctl\n"
+				"is not used.\n"
+				"==============================================================================\n"
 			);
 	}
 }
@@ -221,30 +260,13 @@
 }
 
 #ifdef WIN32
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    HelperThread()
-//		Purpose: Background thread function, called by Windows,
-//			calls the BackupDaemon's RunHelperThread method
-//			to listen for and act on control communications
-//		Created: 18/2/04
-//
-// --------------------------------------------------------------------------
-unsigned int WINAPI HelperThread( LPVOID lpParam ) 
-{ 
-	printf( "Parameter = %lu.\n", *(DWORD*)lpParam ); 
-	((BackupDaemon *)lpParam)->RunHelperThread();
-
-	return 0;
-}
-
 void BackupDaemon::RunHelperThread(void)
 {
 	mpCommandSocketInfo = new CommandSocketInfo;
 	this->mReceivedCommandConn = false;
 
-	while ( !IsTerminateWanted() )
+	// loop until the parent process exits
+	while (TRUE)
 	{
 		try
 		{
@@ -359,24 +381,21 @@
 void BackupDaemon::Run()
 {
 #ifdef WIN32
-
-	// Create a thread to handle the named pipe
-	HANDLE hThread;
-	unsigned int dwThreadId;
-
-	hThread = (HANDLE) _beginthreadex( 
-        	NULL,                        // default security attributes 
-        	0,                           // use default stack size  
-        	HelperThread,                // thread function 
-        	this,                        // argument to thread function 
-        	0,                           // use default creation flags 
-        	&dwThreadId);                // returns the thread identifier 
-
 	// init our own timer for file diff timeouts
 	InitTimer();
 
+	try
+	{
+		Run2();
+	}
+	catch(...)
+	{
+		FiniTimer();
+		throw;
+	}
+
+	FiniTimer();
 #else // ! WIN32
-
 	// Ignore SIGPIPE (so that if a command connection is broken, the daemon doesn't terminate)
 	::signal(SIGPIPE, SIG_IGN);
 
@@ -390,8 +409,6 @@
 		::unlink(socketName);
 		mpCommandSocketInfo->mListeningSocket.Listen(Socket::TypeUNIX, socketName);
 	}
-	
-#endif // WIN32
 
 	// Handle things nicely on exceptions
 	try
@@ -402,23 +419,28 @@
 	{
 		if(mpCommandSocketInfo != 0)
 		{
-			delete mpCommandSocketInfo;
+			try 
+			{
+				delete mpCommandSocketInfo;
+			}
+			catch(...)
+			{
+				::syslog(LOG_WARNING,
+					"Error closing command socket "
+					"after exception, ignored.");
+			}
 			mpCommandSocketInfo = 0;
 		}
 
 		throw;
 	}
-	
+
 	// Clean up
 	if(mpCommandSocketInfo != 0)
 	{
 		delete mpCommandSocketInfo;
 		mpCommandSocketInfo = 0;
 	}
-
-#ifdef WIN32
-	// clean up windows specific stuff.
-	FiniTimer();
 #endif
 }
 
@@ -482,8 +504,8 @@
 		BackupClientContext::ClientStoreMarker_NotKnown;
 	// haven't contacted the store yet
 
- 	DeserializeStoreObjectInfo(clientStoreMarker, lastSyncTime, 
-		nextSyncTime);
+ 	bool deserialised = DeserializeStoreObjectInfo(clientStoreMarker, 
+		lastSyncTime, nextSyncTime);
  
 	// --------------------------------------------------------------------------------------------
 	
@@ -585,6 +607,17 @@
 				// but this should be OK, because the changes only upload should upload no data.
 				syncPeriodEndExtended += SecondsToBoxTime((time_t)(356*24*3600));
 			}
+
+			// Delete the serialised store object file,
+			// so that we don't try to reload it after a
+			// partially completed backup
+			if(deserialised && !DeleteStoreObjectInfo())
+			{
+				::syslog(LOG_ERR, "Failed to delete the "
+					"StoreObjectInfoFile, backup cannot "
+					"continue safely.");
+				continue;
+			}
 			
 			// Do sync
 			bool errorOccurred = false;
@@ -751,7 +784,12 @@
 						"to retry...", 
 						errorString, errorCode, 
 						errorSubCode);
-					::sleep(100);
+					::sleep(10);
+					nextSyncTime = currentSyncStartTime + 
+						SecondsToBoxTime(90) +
+						Random::RandomInt(
+							updateStoreInterval >> 
+							SYNC_PERIOD_RANDOM_EXTRA_TIME_SHIFT_BY);
 				}
 			}
 
@@ -863,7 +901,7 @@
 #ifdef WIN32
 	// Really could use some interprocess protection, mutex etc
 	// any side effect should be too bad???? :)
-	DWORD timeout = BoxTimeToMilliSeconds(RequiredDelay);
+	DWORD timeout = (DWORD)BoxTimeToMilliSeconds(RequiredDelay);
 
 	while ( this->mReceivedCommandConn == false )
 	{
@@ -1065,25 +1103,23 @@
 // --------------------------------------------------------------------------
 void BackupDaemon::CloseCommandConnection()
 {
+#ifndef WIN32
 	try
 	{
 		TRACE0("Closing command connection\n");
 		
-#ifdef WIN32
-		mpCommandSocketInfo->mListeningSocket.Close();
-#else
 		if(mpCommandSocketInfo->mpGetLine)
 		{
 			delete mpCommandSocketInfo->mpGetLine;
 			mpCommandSocketInfo->mpGetLine = 0;
 		}
 		mpCommandSocketInfo->mpConnectedSocket.reset();
-#endif
 	}
 	catch(...)
 	{
 		// Ignore any errors
 	}
+#endif
 }
 
 
@@ -1100,7 +1136,11 @@
 {
 	// The bbackupctl program can't rely on a state change, because it may never
 	// change if the server doesn't need to be contacted.
-	
+
+#ifdef __MINGW32__
+#warning race condition: what happens if socket is closed?
+#endif
+
 	if (mpCommandSocketInfo != NULL &&
 #ifdef WIN32
 	    mpCommandSocketInfo->mListeningSocket.IsConnected()
@@ -1114,7 +1154,7 @@
 		{
 #ifdef WIN32
 			mpCommandSocketInfo->mListeningSocket.Write(message, 
-				strlen(message));
+				(int)strlen(message));
 #else
 			mpCommandSocketInfo->mpConnectedSocket->Write(message,
 				strlen(message));
@@ -1711,7 +1751,10 @@
 	char newStateSize = sprintf(newState, "state %d\n", State);
 
 #ifdef WIN32
-	#warning FIX ME: race condition
+	#ifndef _MSC_VER
+		#warning FIX ME: race condition
+	#endif
+
 	// what happens if the socket is closed by the other thread before
 	// we can write to it? Null pointer deref at best.
 	if (mpCommandSocketInfo && 
@@ -2196,7 +2239,7 @@
 //		Created: 2005/04/11
 //
 // --------------------------------------------------------------------------
-void BackupDaemon::DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime)
+bool BackupDaemon::DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime)
 {
 	//
 	//
@@ -2208,7 +2251,7 @@
 	//
 	if(!GetConfiguration().KeyExists("StoreObjectInfoFile"))
 	{
-		return;
+		return false;
 	}
 
 	std::string StoreObjectInfoFile = 
@@ -2216,7 +2259,7 @@
 
 	if (StoreObjectInfoFile.size() <= 0)
 	{
-		return;
+		return false;
 	}
 
 	try
@@ -2236,7 +2279,7 @@
 				"is not a valid or compatible serialised "
 				"archive. Will re-cache from store.", 
 				StoreObjectInfoFile.c_str());
-			return;
+			return false;
 		}
 
 		//
@@ -2251,7 +2294,7 @@
 				"is not a valid or compatible serialised "
 				"archive. Will re-cache from store.", 
 				StoreObjectInfoFile.c_str());
-			return;
+			return false;
 		}
 
 		//
@@ -2264,11 +2307,11 @@
 		if (iVersion != STOREOBJECTINFO_VERSION)
 		{
 			::syslog(LOG_WARNING, "Store object info file '%s' "
-				"version [%d] unsupported. "
+				"version %d unsupported. "
 				"Will re-cache from store.", 
 				StoreObjectInfoFile.c_str(), 
 				iVersion);
-			return;
+			return false;
 		}
 
 		//
@@ -2283,7 +2326,7 @@
 			::syslog(LOG_WARNING, "Store object info file '%s' "
 				"out of date. Will re-cache from store", 
 				StoreObjectInfoFile.c_str());
-			return;
+			return false;
 		}
 
 		//
@@ -2331,12 +2374,7 @@
 			"version [%d]", StoreObjectInfoFile.c_str(), 
 			iVersion);
 
-		if (::unlink(StoreObjectInfoFile.c_str()) != 0)
-		{
-			::syslog(LOG_ERR, "Failed to delete the old "
-				"store object info file '%s': %s",
-				StoreObjectInfoFile.c_str(), strerror(errno));
-		}
+		return true;
 	}
 	catch (...)
 	{
@@ -2352,4 +2390,38 @@
 			"Will re-cache from store.", 
 			StoreObjectInfoFile.c_str());
 	}
+
+	return false;
 }
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    BackupDaemon::DeleteStoreObjectInfo()
+//		Purpose: Deletes the serialised state file, to prevent us
+//			 from using it again if a backup is interrupted.
+//
+//		Created: 2006/02/12
+//
+// --------------------------------------------------------------------------
+
+bool BackupDaemon::DeleteStoreObjectInfo() const
+{
+	if(!GetConfiguration().KeyExists("StoreObjectInfoFile"))
+	{
+		return false;
+	}
+
+	std::string StoreObjectInfoFile = 
+		GetConfiguration().GetKeyValue("StoreObjectInfoFile");
+
+	if (::unlink(StoreObjectInfoFile.c_str()) != 0)
+	{
+		::syslog(LOG_ERR, "Failed to delete the old "
+			"store object info file '%s': %s",
+			StoreObjectInfoFile.c_str(), strerror(errno));
+		return false;
+	}
+
+	return true;
+}

Modified: box/trunk/bin/bbackupd/BackupDaemon.h
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.h	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupd/BackupDaemon.h	2006-02-13 13:30:21 UTC (rev 456)
@@ -45,10 +45,11 @@
 	BackupDaemon();
 	~BackupDaemon();
 
+private:
 	// methods below do partial (specialized) serialization of client state only
 	void SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time_t theLastSyncTime, box_time_t theNextSyncTime) const;
-	void DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
-private:
+	bool DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
+	bool DeleteStoreObjectInfo() const;
 	BackupDaemon(const BackupDaemon &);
 public:
 

Modified: box/trunk/bin/bbackupd/Win32ServiceFunctions.cpp
===================================================================
--- box/trunk/bin/bbackupd/Win32ServiceFunctions.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupd/Win32ServiceFunctions.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -14,10 +14,12 @@
 
 #include "Box.h"
 
-//#include <stdio.h>
-//#include <stdlib.h>
-#include <unistd.h>
-//#include <windows.h>
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+#ifdef HAVE_PROCESS_H
+	#include <process.h>
+#endif
 
 extern void TerminateService(void);
 extern unsigned int WINAPI RunService(LPVOID lpParameter);
@@ -31,18 +33,23 @@
 
 #define SERVICE_NAME "boxbackup"
 
+void ShowMessage(char *s)
+{
+	MessageBox(0, s, "Box Backup Message", 
+		MB_OK | MB_SETFOREGROUND | MB_DEFAULT_DESKTOP_ONLY);
+}
+
 void ErrorHandler(char *s, DWORD err)
 {
 	char buf[256];
 	memset(buf, 0, sizeof(buf));
-	snprintf(buf, sizeof(buf)-1, "%s (%d)", s, err);
+	_snprintf(buf, sizeof(buf)-1, "%s (%d)", s, err);
 	::syslog(LOG_ERR, "%s", buf);
 	MessageBox(0, buf, "Error", 
 		MB_OK | MB_SETFOREGROUND | MB_DEFAULT_DESKTOP_ONLY);
 	ExitProcess(err);
 }
 
-
 void WINAPI ServiceControlHandler( DWORD controlCode )
 {
 	switch ( controlCode )
@@ -88,7 +95,7 @@
 
 VOID ServiceMain(DWORD argc, LPTSTR *argv) 
 {
-   // initialise service status
+    // initialise service status
     gServiceStatus.dwServiceType = SERVICE_WIN32;
     gServiceStatus.dwCurrentState = SERVICE_STOPPED;
     gServiceStatus.dwControlsAccepted = 0;
@@ -178,14 +185,19 @@
 
 	scm = OpenSCManager(0,0,SC_MANAGER_CREATE_SERVICE);
 
-	if (!scm) return;
+	if (!scm) 
+	{
+		syslog(LOG_ERR, "Failed to open service control manager: "
+			"error %d", GetLastError());
+		return;
+	}
 
 	char cmd[MAX_PATH];
 	GetModuleFileName(NULL, cmd, sizeof(cmd)-1);
 	cmd[sizeof(cmd)-1] = 0;
 
 	char cmd_args[MAX_PATH];
-	snprintf(cmd_args, sizeof(cmd_args)-1, "%s --service", cmd);
+	_snprintf(cmd_args, sizeof(cmd_args)-1, "%s --service", cmd);
 	cmd_args[sizeof(cmd_args)-1] = 0;
 
 	newService = CreateService(
@@ -194,12 +206,31 @@
 		"Box Backup", 
 		SERVICE_ALL_ACCESS, 
 		SERVICE_WIN32_OWN_PROCESS, 
-		SERVICE_DEMAND_START, 
+		SERVICE_AUTO_START, 
 		SERVICE_ERROR_NORMAL, 
 		cmd_args, 
 		0,0,0,0,0);
 
-	if (newService) CloseServiceHandle(newService);
+	if (!newService) 
+	{
+		::syslog(LOG_ERR, "Failed to create Box Backup service: "
+			"error %d", GetLastError());
+		return;
+	}
+
+	::syslog(LOG_INFO, "Created Box Backup service");
+	
+	SERVICE_DESCRIPTION desc;
+	desc.lpDescription = "Backs up your data files over the Internet";
+	
+	if (!ChangeServiceConfig2(newService, SERVICE_CONFIG_DESCRIPTION,
+		&desc))
+	{
+		::syslog(LOG_WARNING, "Failed to set description for "
+			"Box Backup service: error %d", GetLastError());
+	}
+
+	CloseServiceHandle(newService);
 	CloseServiceHandle(scm);
 }
 
@@ -210,23 +241,31 @@
 
 	scm = OpenSCManager(0,0,SC_MANAGER_CREATE_SERVICE);
 
-	if (!scm) return;
+	if (!scm) 
+	{
+		syslog(LOG_ERR, "Failed to open service control manager: "
+			"error %d", GetLastError());
+		return;
+	}
 
 	service = OpenService(scm, SERVICE_NAME, SERVICE_ALL_ACCESS|DELETE);
 	ControlService(service, SERVICE_CONTROL_STOP, &status);
 
 	if (!service)
 	{
-		printf("Failed to open service manager");
+		syslog(LOG_ERR, "Failed to open Box Backup service: "
+			"error %d", GetLastError());
 		return;
 	}
+
 	if (DeleteService(service))
 	{
-		printf("Service removed");
+		syslog(LOG_INFO, "Box Backup service deleted");
 	}
 	else
 	{
-		printf("Failed to remove service");
+		syslog(LOG_ERR, "Failed to remove Box Backup service: "
+			"error %d", GetLastError());
 	}
 
 	CloseServiceHandle(service);

Modified: box/trunk/bin/bbackupd/bbackupd.cpp
===================================================================
--- box/trunk/bin/bbackupd/bbackupd.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupd/bbackupd.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -48,13 +48,19 @@
 		InstallService();
 		return 0;
 	}
-		
+
+	bool runAsWin32Service = false;
+	if (argc == 2 && ::strcmp(argv[1], "--service") == 0)
+	{
+		runAsWin32Service = true;
+	}
+	
 	// Under win32 we must initialise the Winsock library
 	// before using sockets
 		
 	WSADATA info;
 
-	if (WSAStartup(MAKELONG(1, 1), &info) == SOCKET_ERROR) 
+	if (WSAStartup(0x0101, &info) == SOCKET_ERROR) 
 	{
 		// box backup will not run without sockets
 		::syslog(LOG_ERR, "Failed to initialise Windows Sockets");
@@ -65,7 +71,7 @@
 
 	int ExitCode = 0;
 
-	if (argc == 2 && ::strcmp(argv[1], "--service") == 0)
+	if (runAsWin32Service)
 	{
 		syslog(LOG_INFO,"Starting Box Backup Service");
 		OurService();

Modified: box/trunk/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/trunk/bin/bbackupquery/BackupQueries.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupquery/BackupQueries.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,16 +9,22 @@
 
 #include "Box.h"
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <string.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <limits.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <dirent.h>
 
+#ifdef HAVE_DIRENT_H
+	#include <dirent.h>
+#endif
+
 #include <set>
 
 #include "BackupQueries.h"
@@ -246,8 +252,9 @@
 	case COMMAND_pwd:
 		{
 			// Simple implementation, so do it here
-			std::string dir(GetCurrentDirectoryName());
-			printf("%s (%08llx)\n", dir.c_str(), GetCurrentDirectoryID());
+			printf("%s (%08llx)\n", 
+				GetCurrentDirectoryName().c_str(), 
+				(long long)GetCurrentDirectoryID());
 		}
 		break;
 
@@ -325,11 +332,23 @@
 	// Got a directory in the arguments?
 	if(args.size() > 0)
 	{
+#ifdef WIN32
+		std::string storeDirEncoded;
+		if(!ConvertConsoleToUtf8(args[0].c_str(), storeDirEncoded))
+			return;
+#else
+		const std::string& storeDirEncoded(args[0]);
+#endif
+	
 		// Attempt to find the directory
-		rootDir = FindDirectoryObjectID(args[0], opts[LIST_OPTION_ALLOWOLD], opts[LIST_OPTION_ALLOWDELETED]);
+		rootDir = FindDirectoryObjectID(storeDirEncoded, 
+			opts[LIST_OPTION_ALLOWOLD], 
+			opts[LIST_OPTION_ALLOWDELETED]);
+
 		if(rootDir == 0)
 		{
-			printf("Directory %s not found on store\n", args[0].c_str());
+			printf("Directory '%s' not found on store\n",
+				args[0].c_str());
 			return;
 		}
 	}
@@ -373,19 +392,16 @@
 	{
 		// Display this entry
 		BackupStoreFilenameClear clear(en->GetName());
-		std::string line;
 		
 		// Object ID?
 		if(!opts[LIST_OPTION_NOOBJECTID])
 		{
 			// add object ID to line
-			char oid[32];
-#ifdef WIN32
-			sprintf(oid, "%08I64x ", en->GetObjectID());
+#ifdef _MSC_VER
+			printf("%08I64x ", (int64_t)en->GetObjectID());
 #else
-			sprintf(oid, "%08llx ", en->GetObjectID());
+			printf("%08llx ", (long long)en->GetObjectID());
 #endif
-			line += oid;
 		}
 		
 		// Flags?
@@ -412,58 +428,72 @@
 			// terminate
 			*(f++) = ' ';
 			*(f++) = '\0';
-			line += displayflags;
+			printf(displayflags);
+			
 			if(en_flags != 0)
 			{
-				line += "[ERROR: Entry has additional flags set] ";
+				printf("[ERROR: Entry has additional flags set] ");
 			}
 		}
 		
 		if(opts[LIST_OPTION_TIMES])
 		{
 			// Show times...
-			line += BoxTimeToISO8601String(en->GetModificationTime());
-			line += ' ';
+			std::string time = BoxTimeToISO8601String(
+				en->GetModificationTime());
+			printf("%s ", time.c_str());
 		}
 		
 		if(opts[LIST_OPTION_DISPLAY_HASH])
 		{
-			char hash[64];
-#ifdef WIN32
-			::sprintf(hash, "%016I64x ", en->GetAttributesHash());
+#ifdef _MSC_VER
+			printf("%016I64x ", (int64_t)en->GetAttributesHash());
 #else
-			::sprintf(hash, "%016llx ", en->GetAttributesHash());
+			printf("%016llx ", (long long)en->GetAttributesHash());
 #endif
-			line += hash;
 		}
 		
 		if(opts[LIST_OPTION_SIZEINBLOCKS])
 		{
-			char num[32];
-#ifdef WIN32
-			sprintf(num, "%05I64d ", en->GetSizeInBlocks());
+#ifdef _MSC_VER
+			printf("%05I64d ", (int64_t)en->GetSizeInBlocks());
 #else
-			sprintf(num, "%05lld ", en->GetSizeInBlocks());
+			printf("%05lld ", (long long)en->GetSizeInBlocks());
 #endif
-			line += num;
 		}
 		
 		// add name
 		if(!FirstLevel)
 		{
-			line += rListRoot;
-			line += '/';
+#ifdef WIN32
+			std::string listRootDecoded;
+			if(!ConvertUtf8ToConsole(rListRoot.c_str(), 
+				listRootDecoded)) return;
+			printf("%s/", listRootDecoded.c_str());
+#else
+			printf("%s/", rListRoot.c_str());
+#endif
 		}
-		line += clear.GetClearFilename().c_str();
 		
+#ifdef WIN32
+		{
+			std::string fileName;
+			if(!ConvertUtf8ToConsole(
+				clear.GetClearFilename().c_str(), fileName))
+				return;
+			printf("%s", fileName.c_str());
+		}
+#else
+		printf("%s", clear.GetClearFilename().c_str());
+#endif
+		
 		if(!en->GetName().IsEncrypted())
 		{
-			line += "[FILENAME NOT ENCRYPTED]";
+			printf("[FILENAME NOT ENCRYPTED]");
 		}
+
+		printf("\n");
 		
-		// print line
-		printf("%s\n", line.c_str());
-		
 		// Directory?
 		if((en->GetFlags() & BackupStoreDirectory::Entry::Flags_Dir) != 0)
 		{
@@ -495,7 +525,7 @@
 {
 	// Split up string into elements
 	std::vector<std::string> dirElements;
-	SplitString(rDirName, DIRECTORY_SEPARATOR_ASCHAR, dirElements);
+	SplitString(rDirName, '/', dirElements);
 
 	// Start from current stack, or root, whichever is required
 	std::vector<std::pair<std::string, int64_t> > stack;
@@ -629,7 +659,14 @@
 	for(unsigned int l = 0; l < mDirStack.size(); ++l)
 	{
 		r += "/";
+#ifdef WIN32
+		std::string dirName;
+		if(!ConvertUtf8ToConsole(mDirStack[l].first.c_str(), dirName))
+			return "error";
+		r += dirName;
+#else
 		r += mDirStack[l].first;
+#endif
 	}
 	
 	return r;
@@ -651,9 +688,17 @@
 		printf("Incorrect usage.\ncd [-o] [-d] <directory>\n");
 		return;
 	}
+
+#ifdef WIN32
+	std::string dirName;
+	if(!ConvertConsoleToUtf8(args[0].c_str(), dirName)) return;
+#else
+	const std::string& dirName(args[0]);
+#endif
 	
 	std::vector<std::pair<std::string, int64_t> > newStack;
-	int64_t id = FindDirectoryObjectID(args[0], opts['o'], opts['d'], &newStack);
+	int64_t id = FindDirectoryObjectID(dirName, opts['o'], opts['d'], 
+		&newStack);
 	
 	if(id == 0)
 	{
@@ -683,7 +728,14 @@
 	}
 	
 	// Try changing directory
-	if(::chdir(args[0].c_str()) != 0)
+#ifdef WIN32
+	std::string dirName;
+	if(!ConvertConsoleToUtf8(args[0].c_str(), dirName)) return;
+	int result = ::chdir(dirName.c_str());
+#else
+	int result = ::chdir(args[0].c_str());
+#endif
+	if(result != 0)
 	{
 		printf((errno == ENOENT || errno == ENOTDIR)?"Directory '%s' does not exist\n":"Error changing dir to '%s'\n",
 			args[0].c_str());
@@ -697,8 +749,13 @@
 		printf("Error getting current directory\n");
 		return;
 	}
-	
+
+#ifdef WIN32
+	if(!ConvertUtf8ToConsole(wd, dirName)) return;
+	printf("Local current directory is now '%s'\n", dirName.c_str());
+#else
 	printf("Local current directory is now '%s'\n", wd);
+#endif
 }
 
 
@@ -826,7 +883,14 @@
 		{				
 			// Specified by name, find the object in the directory to get the ID
 			BackupStoreDirectory::Iterator i(dir);
+#ifdef WIN32
+			std::string fileName;
+			if(!ConvertConsoleToUtf8(args[0].c_str(), fileName))
+				return;
+			BackupStoreFilenameClear fn(fileName);
+#else
 			BackupStoreFilenameClear fn(args[0]);
+#endif
 			BackupStoreDirectory::Entry *en = i.FindMatchingClearName(fn);
 			
 			if(en == 0)
@@ -868,7 +932,7 @@
 	}
 	catch(...)
 	{
-		::unlink(args[1].c_str());
+		::unlink(localName.c_str());
 		printf("Error occured fetching file.\n");
 	}
 }
@@ -962,7 +1026,7 @@
 		}
 		else
 		{
-			printf("Warning: couldn't determine the time of the last syncronisation -- checks not performed.\n");
+			printf("Warning: couldn't determine the time of the last synchronisation -- checks not performed.\n");
 		}
 	}
 
@@ -1049,7 +1113,7 @@
 		}
 				
 		// Then get it compared
-		Compare(std::string(DIRECTORY_SEPARATOR) + rLocation, 
+		Compare(std::string("/") + rLocation, 
 			loc.GetKeyValue("Path"), rParams);
 	}
 	catch(...)
@@ -1074,32 +1138,62 @@
 // --------------------------------------------------------------------------
 void BackupQueries::Compare(const std::string &rStoreDir, const std::string &rLocalDir, BackupQueries::CompareParams &rParams)
 {
+#ifdef WIN32
+	std::string storeDirEncoded;
+	if(!ConvertConsoleToUtf8(rStoreDir.c_str(), storeDirEncoded)) return;
+#else
+	const std::string& storeDirEncoded(rStoreDir);
+#endif
+	
 	// Get the directory ID of the directory -- only use current data
-	int64_t dirID = FindDirectoryObjectID(rStoreDir);
+	int64_t dirID = FindDirectoryObjectID(storeDirEncoded);
 	
 	// Found?
 	if(dirID == 0)
 	{
-		printf("Local directory '%s' exists, but server directory '%s' does not exist\n", rLocalDir.c_str(), rStoreDir.c_str());		
+		printf("Local directory '%s' exists, but "
+			"server directory '%s' does not exist\n", 
+			rLocalDir.c_str(), rStoreDir.c_str());		
 		rParams.mDifferences ++;
 		return;
 	}
+
+#ifdef WIN32
+	std::string localDirEncoded;
+	if(!ConvertConsoleToUtf8(rLocalDir.c_str(), localDirEncoded)) return;
+#else
+	std::string localDirEncoded(rLocalDir);
+#endif
 	
 	// Go!
-	Compare(dirID, rStoreDir, rLocalDir, rParams);
+	Compare(dirID, storeDirEncoded, localDirEncoded, rParams);
 }
 
 
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    BackupQueries::Compare(int64_t, const std::string &, BackupQueries::CompareParams &)
+//		Name:    BackupQueries::Compare(int64_t, const std::string &,
+//			 const std::string &, BackupQueries::CompareParams &)
 //		Purpose: Compare a store directory against a local directory
 //		Created: 2003/10/13
 //
 // --------------------------------------------------------------------------
 void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir, const std::string &rLocalDir, BackupQueries::CompareParams &rParams)
 {
+#ifdef WIN32
+	// By this point, rStoreDir and rLocalDir should be in UTF-8 encoding
+
+	std::string localName;
+	std::string storeName;
+
+	if(!ConvertUtf8ToConsole(rLocalDir.c_str(), localName)) return;
+	if(!ConvertUtf8ToConsole(rStoreDir.c_str(), storeName)) return;
+#else
+	const std::string& localName(rLocalDir);
+	const std::string& storeName(rStoreDir);
+#endif
+
 	// Get info on the local directory
 	struct stat st;
 	if(::lstat(rLocalDir.c_str(), &st) != 0)
@@ -1107,16 +1201,21 @@
 		// What kind of error?
 		if(errno == ENOTDIR)
 		{
-			printf("Local object '%s' is a file, server object '%s' is a directory\n", rLocalDir.c_str(), rStoreDir.c_str());
+			printf("Local object '%s' is a file, "
+				"server object '%s' is a directory\n", 
+				localName.c_str(), storeName.c_str());
 			rParams.mDifferences ++;
 		}
 		else if(errno == ENOENT)
 		{
-			printf("Local directory '%s' does not exist (compared to server directory '%s')\n", rLocalDir.c_str(), rStoreDir.c_str());
+			printf("Local directory '%s' does not exist "
+				"(compared to server directory '%s')\n",
+				localName.c_str(), storeName.c_str());
 		}
 		else
 		{
-			printf("ERROR: stat on local dir '%s'\n", rLocalDir.c_str());
+			printf("ERROR: stat on local dir '%s'\n", 
+				localName.c_str());
 		}
 		return;
 	}
@@ -1136,7 +1235,8 @@
 	// Test out the attributes
 	if(!dir.HasAttributes())
 	{
-		printf("Store directory '%s' doesn't have attributes.\n", rStoreDir.c_str());
+		printf("Store directory '%s' doesn't have attributes.\n", 
+			storeName.c_str());
 	}
 	else
 	{
@@ -1146,12 +1246,14 @@
 
 		// Get attributes of local directory
 		BackupClientFileAttributes localAttr;
-		localAttr.ReadAttributes(rLocalDir.c_str(), true /* directories have zero mod times */);
+		localAttr.ReadAttributes(rLocalDir.c_str(), 
+			true /* directories have zero mod times */);
 
 		if(!(attr.Compare(localAttr, true, true /* ignore modification times */)))
 		{
-			printf("Local directory '%s' has different attributes to store directory '%s'.\n",
-				rLocalDir.c_str(), rStoreDir.c_str());
+			printf("Local directory '%s' has different attributes "
+				"to store directory '%s'.\n",
+				localName.c_str(), storeName.c_str());
 			rParams.mDifferences ++;
 		}
 	}
@@ -1160,7 +1262,7 @@
 	DIR *dirhandle = ::opendir(rLocalDir.c_str());
 	if(dirhandle == 0)
 	{
-		printf("ERROR: opendir on local dir '%s'\n", rLocalDir.c_str());
+		printf("ERROR: opendir on local dir '%s'\n", localName.c_str());
 		return;
 	}
 	try
@@ -1217,7 +1319,8 @@
 		// Close directory
 		if(::closedir(dirhandle) != 0)
 		{
-			printf("ERROR: closedir on local dir '%s'\n", rLocalDir.c_str());
+			printf("ERROR: closedir on local dir '%s'\n", 
+				localName.c_str());
 		}
 		dirhandle = 0;
 	
@@ -1244,17 +1347,26 @@
 				storeDirs.insert(std::pair<std::string, BackupStoreDirectory::Entry *>(name.GetClearFilename(), storeDirEn));
 			}
 		}
+
+#ifdef _MSC_VER
+		typedef std::set<std::string>::iterator string_set_iter_t;
+#else
+		typedef std::set<std::string>::const_iterator string_set_iter_t;
+#endif
 		
 		// Now compare files.
 		for(std::set<std::pair<std::string, BackupStoreDirectory::Entry *> >::const_iterator i = storeFiles.begin(); i != storeFiles.end(); ++i)
 		{
 			// Does the file exist locally?
-			std::set<std::string>::const_iterator local(localFiles.find(i->first));
+			string_set_iter_t local(localFiles.find(i->first));
 			if(local == localFiles.end())
 			{
 				// Not found -- report
-				printf("Local file '%s/%s' does not exist, but store file '%s/%s' does.\n",
-					rLocalDir.c_str(), i->first.c_str(), rStoreDir.c_str(), i->first.c_str());
+				printf("Local file '%s" DIRECTORY_SEPARATOR 
+					"%s' does not exist, "
+					"but store file '%s/%s' does.\n",
+					localName.c_str(), i->first.c_str(), 
+					storeName.c_str(), i->first.c_str());
 				rParams.mDifferences ++;
 			}
 			else
@@ -1320,8 +1432,11 @@
 								true /* ignore attr mod time */,
 								fileOnServerStream->IsSymLink() /* ignore modification time if it's a symlink */))
 						{
-							printf("Local file '%s/%s' has different attributes to store file '%s/%s'.\n",
-								rLocalDir.c_str(), i->first.c_str(), rStoreDir.c_str(), i->first.c_str());						
+							printf("Local file '%s"
+								DIRECTORY_SEPARATOR
+								"%s' has different attributes "
+								"to store file '%s/%s'.\n",
+								localName.c_str(), i->first.c_str(), storeName.c_str(), i->first.c_str());						
 							rParams.mDifferences ++;
 							if(modifiedAfterLastSync)
 							{
@@ -1385,8 +1500,11 @@
 					// Report if not equal.
 					if(!equal)
 					{
-						printf("Local file '%s/%s' has different contents to store file '%s/%s'.\n",
-							rLocalDir.c_str(), i->first.c_str(), rStoreDir.c_str(), i->first.c_str());
+						printf("Local file '%s"
+							DIRECTORY_SEPARATOR
+							"%s' has different contents "
+							"to store file '%s/%s'.\n",
+							localName.c_str(), i->first.c_str(), storeName.c_str(), i->first.c_str());
 						rParams.mDifferences ++;
 						if(modifiedAfterLastSync)
 						{
@@ -1404,11 +1522,12 @@
 					printf("ERROR: (%d/%d) during file fetch and comparsion for '%s/%s'\n",
 						e.GetType(),
 						e.GetSubType(),
-						rStoreDir.c_str(), i->first.c_str());
+						storeName.c_str(), 
+						i->first.c_str());
 				}
 				catch(...)
 				{
-					printf("ERROR: (unknown) during file fetch and comparsion for '%s/%s'\n", rStoreDir.c_str(), i->first.c_str());
+					printf("ERROR: (unknown) during file fetch and comparsion for '%s/%s'\n", storeName.c_str(), i->first.c_str());
 				}
 
 				// Remove from set so that we know it's been compared
@@ -1417,20 +1536,25 @@
 		}
 		
 		// Report any files which exist on the locally, but not on the store
-		for(std::set<std::string>::const_iterator i = localFiles.begin(); i != localFiles.end(); ++i)
+		for(string_set_iter_t i = localFiles.begin(); i != localFiles.end(); ++i)
 		{
-			std::string localName(rLocalDir + DIRECTORY_SEPARATOR + *i);
+			std::string localFileName(rLocalDir + 
+				DIRECTORY_SEPARATOR + *i);
 			// Should this be ignored (ie is excluded)?
-			if(rParams.mpExcludeFiles == 0 || !(rParams.mpExcludeFiles->IsExcluded(localName)))
+			if(rParams.mpExcludeFiles == 0 || 
+				!(rParams.mpExcludeFiles->IsExcluded(localFileName)))
 			{
-				printf("Local file '%s/%s' exists, but store file '%s/%s' does not exist.\n",
-					rLocalDir.c_str(), (*i).c_str(), rStoreDir.c_str(), (*i).c_str());
+				printf("Local file '%s" DIRECTORY_SEPARATOR
+					"%s' exists, but store file '%s/%s' "
+					"does not exist.\n",
+					localName.c_str(), (*i).c_str(), 
+					storeName.c_str(), (*i).c_str());
 				rParams.mDifferences ++;
 				
 				// Check the file modification time
 				{
 					struct stat st;
-					if(::stat(localName.c_str(), &st) == 0)
+					if(::stat(localFileName.c_str(), &st) == 0)
 					{
 						if(FileModificationTime(st) > rParams.mLatestFileUploadTime)
 						{
@@ -1454,12 +1578,16 @@
 		for(std::set<std::pair<std::string, BackupStoreDirectory::Entry *> >::const_iterator i = storeDirs.begin(); i != storeDirs.end(); ++i)
 		{
 			// Does the directory exist locally?
-			std::set<std::string>::const_iterator local(localDirs.find(i->first));
+			string_set_iter_t local(localDirs.find(i->first));
 			if(local == localDirs.end())
 			{
 				// Not found -- report
-				printf("Local directory '%s/%s' does not exist, but store directory '%s/%s' does.\n",
-					rLocalDir.c_str(), i->first.c_str(), rStoreDir.c_str(), i->first.c_str());
+				printf("Local directory '%s" 
+					DIRECTORY_SEPARATOR "%s' "
+					"does not exist, but store directory "
+					"'%s/%s' does.\n",
+					localName.c_str(), i->first.c_str(), 
+					storeName.c_str(), i->first.c_str());
 				rParams.mDifferences ++;
 			}
 			else
@@ -1479,8 +1607,10 @@
 			// Should this be ignored (ie is excluded)?
 			if(rParams.mpExcludeDirs == 0 || !(rParams.mpExcludeDirs->IsExcluded(localName)))
 			{
-				printf("Local directory '%s/%s' exists, but store directory '%s/%s' does not exist.\n",
-					rLocalDir.c_str(), (*i).c_str(), rStoreDir.c_str(), (*i).c_str());
+				printf("Local directory '%s/%s' exists, but "
+					"store directory '%s/%s' does not exist.\n",
+					localName.c_str(), (*i).c_str(), 
+					storeName.c_str(), (*i).c_str());
 				rParams.mDifferences ++;
 			}
 			else
@@ -1534,14 +1664,24 @@
 	}
 	else
 	{
+#ifdef WIN32
+		std::string storeDirEncoded;
+		if(!ConvertConsoleToUtf8(args[0].c_str(), storeDirEncoded))
+			return;
+#else
+		const std::string& storeDirEncoded(args[0]);
+#endif
+	
 		// Look up directory ID
-		dirID = FindDirectoryObjectID(args[0], false /* no old versions */, restoreDeleted /* find deleted dirs */);
+		dirID = FindDirectoryObjectID(storeDirEncoded, 
+			false /* no old versions */, 
+			restoreDeleted /* find deleted dirs */);
 	}
 	
 	// Allowable?
 	if(dirID == 0)
 	{
-		printf("Directory %s not found on server\n", args[0].c_str());
+		printf("Directory '%s' not found on server\n", args[0].c_str());
 		return;
 	}
 	if(dirID == BackupProtocolClientListDirectory::RootDirectory)
@@ -1550,9 +1690,18 @@
 		return;
 	}
 	
+#ifdef WIN32
+	std::string localName;
+	if(!ConvertConsoleToUtf8(args[1].c_str(), localName)) return;
+#else
+	std::string localName(args[1]);
+#endif
+
 	// Go and restore...
-	switch(BackupClientRestore(mrConnection, dirID, args[1].c_str(), true /* print progress dots */, restoreDeleted, 
-		false /* don't undelete after restore! */, opts['r'] /* resume? */))
+	switch(BackupClientRestore(mrConnection, dirID, localName.c_str(), 
+		true /* print progress dots */, restoreDeleted, 
+		false /* don't undelete after restore! */, 
+		opts['r'] /* resume? */))
 	{
 	case Restore_Complete:
 		printf("Restore complete\n");
@@ -1691,26 +1840,29 @@
 		return;
 	}
 
+#ifdef WIN32
+	std::string storeDirEncoded;
+	if(!ConvertConsoleToUtf8(args[0].c_str(), storeDirEncoded)) return;
+#else
+	const std::string& storeDirEncoded(args[0]);
+#endif
+	
 	// Get directory ID
-	int64_t dirID = FindDirectoryObjectID(args[0], false /* no old versions */, true /* find deleted dirs */);
+	int64_t dirID = FindDirectoryObjectID(storeDirEncoded, 
+		false /* no old versions */, true /* find deleted dirs */);
 	
 	// Allowable?
 	if(dirID == 0)
 	{
-		printf("Directory %s not found on server\n", args[0].c_str());
+		printf("Directory '%s' not found on server\n", args[0].c_str());
 		return;
 	}
 	if(dirID == BackupProtocolClientListDirectory::RootDirectory)
 	{
-		printf("Cannot restore the root directory -- restore locations individually.\n");
+		printf("Cannot undelete the root directory.\n");
 		return;
 	}
 
 	// Undelete
 	mrConnection.QueryUndeleteDirectory(dirID);
 }
-
-
-
-
-

Modified: box/trunk/bin/bbackupquery/bbackupquery.cpp
===================================================================
--- box/trunk/bin/bbackupquery/bbackupquery.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/bin/bbackupquery/bbackupquery.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,7 +9,9 @@
 
 #include "Box.h"
 
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
 #include <stdio.h>
 #include <sys/types.h>
 #ifdef HAVE_LIBREADLINE
@@ -48,8 +50,13 @@
 
 void PrintUsageAndExit()
 {
-	printf("Usage: bbackupquery [-q] [-c config_file] [-l log_file] [commands]\nAs many commands as you require.\n"	\
-	"If commands are multiple words, remember to enclose the command in quotes.\n"	\
+	printf("Usage: bbackupquery [-q] [-w] "
+#ifdef WIN32
+	"[-u] "
+#endif
+	"\n\t[-c config_file] [-l log_file] [commands]\n"
+	"As many commands as you require.\n"
+	"If commands are multiple words, remember to enclose the command in quotes.\n"
 	"Remember to use quit command if you don't want to drop into interactive mode.\n");
 	exit(1);
 }
@@ -64,7 +71,7 @@
 	// Under Win32 we must initialise the Winsock library
 	// before using it.
 	
-	if (WSAStartup(MAKELONG(1, 1), &info) == SOCKET_ERROR) 
+	if (WSAStartup(0x0101, &info) == SOCKET_ERROR) 
 	{
 		// throw error?    perhaps give it its own id in the furture
 		THROW_EXCEPTION(BackupStoreException, Internal)
@@ -88,10 +95,17 @@
 	// Flags
 	bool quiet = false;
 	bool readWrite = false;
-	
+
+#ifdef WIN32
+	const char* validOpts = "qwuc:l:";
+	bool unicodeConsole = false;
+#else
+	const char* validOpts = "qwc:l:";
+#endif
+
 	// See if there's another entry on the command line
 	int c;
-	while((c = getopt(argc, (char * const *)argv, "qwc:l:")) != -1)
+	while((c = getopt(argc, (char * const *)argv, validOpts)) != -1)
 	{
 		switch(c)
 		{
@@ -118,6 +132,12 @@
 				printf("Can't open log file '%s'\n", optarg);
 			}
 			break;
+
+#ifdef WIN32
+		case 'u':
+			unicodeConsole = true;
+			break;
+#endif
 		
 		case '?':
 		default:
@@ -135,6 +155,30 @@
 		printf(banner);
 	}
 
+#ifdef WIN32
+	if (unicodeConsole)
+	{
+		if (!SetConsoleCP(CP_UTF8))
+		{
+			fprintf(stderr, "Failed to set input codepage: "
+				"error %d\n", GetLastError());
+		}
+
+		if (!SetConsoleOutputCP(CP_UTF8))
+		{
+			fprintf(stderr, "Failed to set output codepage: "
+				"error %d\n", GetLastError());
+		}
+
+		// enable input of Unicode characters
+		if (_setmode(_fileno(stdin), _O_TEXT) == -1)
+		{
+			perror("Failed to set the console input to "
+				"binary mode");
+		}
+	}
+#endif // WIN32
+
 	// Read in the configuration file
 	if(!quiet) printf("Using configuration file %s\n", configFilename);
 	std::string errs;

Deleted: box/trunk/boxbackup.sln
===================================================================
--- box/trunk/boxbackup.sln	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/boxbackup.sln	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,67 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boxquery", "boxquery.vcproj", "{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{98598F62-FEA7-4134-AA29-0AD2315A214F} = {98598F62-FEA7-4134-AA29-0AD2315A214F}
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcproj", "{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupd", "bbackupd.vcproj", "{22D325FB-9131-4BD6-B390-968F0491D687}"
-	ProjectSection(ProjectDependencies) = postProject
-		{98598F62-FEA7-4134-AA29-0AD2315A214F} = {98598F62-FEA7-4134-AA29-0AD2315A214F}
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32test", "win32test.vcproj", "{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupctl", "bbackupctl.vcproj", "{9FD51412-E945-4457-A17A-CA3C505CF431}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_regex", "lib\win32\boost_regex.vcproj", "{98598F62-FEA7-4134-AA29-0AD2315A214F}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug.ActiveCfg = Debug|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug.Build.0 = Debug|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release.ActiveCfg = Release|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release.Build.0 = Release|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug.ActiveCfg = Debug|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug.Build.0 = Debug|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release.ActiveCfg = Release|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release.Build.0 = Release|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Debug.ActiveCfg = Debug|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Debug.Build.0 = Debug|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Release.ActiveCfg = Release|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Release.Build.0 = Release|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug.ActiveCfg = Debug|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug.Build.0 = Debug|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release.ActiveCfg = Release|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release.Build.0 = Release|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Debug.ActiveCfg = Debug|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Debug.Build.0 = Debug|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Release.ActiveCfg = Release|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Release.Build.0 = Release|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Debug.ActiveCfg = Debug|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Debug.Build.0 = Debug|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Release.ActiveCfg = Release|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Release.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal

Deleted: box/trunk/boxbackup.suo
===================================================================
(Binary files differ)

Deleted: box/trunk/boxquery.vcproj
===================================================================
--- box/trunk/boxquery.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/boxquery.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="boxquery"
-	ProjectGUID="{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
-	RootNamespace="boxquery"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;;&quot;$(SolutionDir)..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\zlib\lib\zdll.lib $(ProjectDir)..\openssl\lib\libeay32.lib $(ProjectDir)..\openssl\lib\ssleay32.lib $(ProjectDir)Debug\common.lib $(ProjectDir)lib\win32\Debug\boost_regex.lib"
-				OutputFile="$(OutDir)/bbackupquery.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/boxquery.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;;&quot;$(SolutionDir)..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\zlib\lib\zdll.lib $(ProjectDir)Release\common.lib $(ProjectDir)..\openssl\lib\libeay32.lib $(ProjectDir)..\openssl\lib\ssleay32.lib $(ProjectDir)lib\win32\Release\boost_regex.lib"
-				OutputFile="$(OutDir)/bbackupquery.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="FALSE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="backupquery"
-					Filter="">
-					<File
-						RelativePath=".\bin\bbackupquery\autogen_Documentation.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupquery\BackupQueries.cpp">
-					</File>
-					<File
-						RelativePath=".\bin\bbackupquery\bbackupquery.cpp">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="backupquery"
-					Filter="">
-					<File
-						RelativePath=".\bin\bbackupquery\BackupQueries.h">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-		<File
-			RelativePath=".\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Deleted: box/trunk/common.vcproj
===================================================================
--- box/trunk/common.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/common.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,638 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="common"
-	ProjectGUID="{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="4"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;;&quot;$(SolutionDir)..\boost_1_31_0\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(OutDir)/common.lib"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="4"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;;&quot;$(SolutionDir)..\boost_1_31_0\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;NDEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(OutDir)/common.lib"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<Filter
-				Name="lib"
-				Filter="">
-				<Filter
-					Name="compress"
-					Filter="">
-					<File
-						RelativePath=".\lib\compress\autogen_CompressException.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\compress\CompressStream.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="common"
-					Filter="">
-					<File
-						RelativePath=".\lib\common\autogen_CommonException.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\autogen_ConversionException.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxException.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxTime.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxTimeToText.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\CollectInBufferStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\Configuration.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\ConversionString.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\DebugAssertFailed.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\DebugMemLeakFinder.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\DebugPrintf.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\EventWatchFilesystemObject.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\ExcludeList.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\FdGetLine.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\FileStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\IOStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\IOStreamGetLine.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\LinuxWorkaround.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\MemBlockStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\PartialReadStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\ReadGatherStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\StreamableMemBlock.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\UnixUser.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\Utils.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\common\WaitForEvent.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="backupclient"
-					Filter="">
-					<File
-						RelativePath=".\lib\backupclient\autogen_BackupProtocolClient.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\autogen_BackupStoreException.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupClientCryptoKeys.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupClientFileAttributes.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupClientMakeExcludeList.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupClientRestore.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupDaemonConfigVerify.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreDirectory.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFile.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileCmbDiff.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileCmbIdx.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileCombine.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileCryptVar.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileDiff.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileEncodeStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFilename.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFilenameClear.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileRevDiff.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreObjectDump.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="crypto"
-					Filter="">
-					<File
-						RelativePath=".\lib\crypto\autogen_CipherException.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherAES.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherBlowfish.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherContext.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherDescription.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\MD5Digest.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\Random.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\RollingChecksum.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="win32"
-					Filter="">
-					<File
-						RelativePath=".\lib\win32\emu.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="server"
-					Filter="">
-					<File
-						RelativePath=".\lib\server\autogen_ConnectionException.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\autogen_ServerException.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\Daemon.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\LocalProcessStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\Protocol.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\ProtocolObject.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\ProtocolUncertainStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\Socket.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\SocketStream.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\SocketStreamTLS.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\SSLLib.cpp">
-					</File>
-					<File
-						RelativePath=".\lib\server\TLSContext.cpp">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<Filter
-				Name="lib"
-				Filter="">
-				<Filter
-					Name="compress"
-					Filter="">
-					<File
-						RelativePath=".\lib\compress\autogen_CompressException.h">
-					</File>
-					<File
-						RelativePath=".\lib\compress\Compress.h">
-					</File>
-					<File
-						RelativePath=".\lib\compress\CompressException.h">
-					</File>
-					<File
-						RelativePath=".\lib\compress\CompressStream.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="common"
-					Filter="">
-					<File
-						RelativePath=".\lib\common\autogen_CommonException.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\autogen_ConversionException.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\BannerText.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\BeginStructPackForWire.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\Box.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxException.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxPlatform.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxPortsAndFiles.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxTime.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxTimeToText.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\BoxTimeToUnix.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\CollectInBufferStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\CommonException.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\Configuration.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\Conversion.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\EndStructPackForWire.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\EventWatchFilesystemObject.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\ExcludeList.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\FdGetLine.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\FileModificationTime.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\FileStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\Guards.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\IOStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\IOStreamGetLine.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\LinuxWorkaround.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\LocalProcessStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\MainHelper.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\MemBlockStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\MemLeakFinder.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\MemLeakFindOff.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\MemLeakFindOn.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\NamedLock.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\PartialReadStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\ReadGatherStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\StreamableMemBlock.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\TemporaryDirectory.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\Test.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\UnixUser.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\Utils.h">
-					</File>
-					<File
-						RelativePath=".\lib\common\WaitForEvent.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="backupclient"
-					Filter="">
-					<File
-						RelativePath=".\lib\backupclient\autogen_BackupProtocolClient.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\autogen_BackupStoreException.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupClientCryptoKeys.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupClientFileAttributes.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupClientMakeExcludeList.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupClientRestore.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupDaemonConfigVerify.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreConstants.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreDirectory.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreException.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFile.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileCryptVar.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileEncodeStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFilename.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFilenameClear.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreFileWire.h">
-					</File>
-					<File
-						RelativePath=".\lib\backupclient\BackupStoreObjectMagic.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="crypto"
-					Filter="">
-					<File
-						RelativePath=".\lib\crypto\autogen_CipherException.h">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherAES.h">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherBlowfish.h">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherContext.h">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherDescription.h">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\CipherException.h">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\MD5Digest.h">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\Random.h">
-					</File>
-					<File
-						RelativePath=".\lib\crypto\RollingChecksum.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="win32"
-					Filter="">
-					<File
-						RelativePath=".\lib\win32\emu.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="server"
-					Filter="">
-					<File
-						RelativePath=".\lib\server\autogen_ConnectionException.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\autogen_ServerException.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\Daemon.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\Protocol.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\ProtocolObject.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\ProtocolUncertainStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\ProtocolWire.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\ServerException.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\ServerStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\ServerTLS.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\Socket.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\SocketListen.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\SocketStream.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\SocketStreamTLS.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\SSLLib.h">
-					</File>
-					<File
-						RelativePath=".\lib\server\TLSContext.h">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/configure.ac	2006-02-13 13:30:21 UTC (rev 456)
@@ -73,13 +73,21 @@
 
 ### Checks for header files.
 
-AC_HEADER_DIRENT
+if test "$target_os" != "mingw32"; then
+  AC_HEADER_DIRENT
+fi
+
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([execinfo.h regex.h signal.h syslog.h time.h])
+AC_CHECK_HEADERS([execinfo.h process.h pwd.h regex.h signal.h])
+AC_CHECK_HEADERS([syslog.h time.h])
 AC_CHECK_HEADERS([netinet/in.h])
-AC_CHECK_HEADERS([sys/param.h sys/types.h sys/wait.h sys/xattr.h sys/time.h])
+AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])
+AC_CHECK_HEADERS([sys/xattr.h])
 
+if test "$ac_cv_header_regex_h" = "yes"; then
+  AC_SEARCH_LIBS([regcomp], [pcreposix])
+fi
 
 ### Checks for typedefs, structures, and compiler characteristics.
 
@@ -128,7 +136,7 @@
 AC_FUNC_ERROR_AT_LINE
 AC_TYPE_SIGNAL
 AC_FUNC_STAT
-AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle])
+AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle getpid])
 AX_FUNC_SYSCALL
 AX_CHECK_SYSCALL_LSEEK
 AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr])

Modified: box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
===================================================================
--- box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/distribution/boxbackup/DISTRIBUTION-MANIFEST.txt	2006-02-13 13:30:21 UTC (rev 456)
@@ -33,3 +33,8 @@
 distribution/boxbackup/contrib/suse contrib/suse
 NO-LICENSE-IN-DIR contrib/cygwin
 distribution/boxbackup/contrib/cygwin contrib/cygwin
+infrastructure/msvc
+NO-LICENSE-IN-DIR infrastructure/msvc/2003
+infrastructure/msvc/2003
+NO-LICENSE-IN-DIR infrastructure/msvc/2005
+infrastructure/msvc/2005
\ No newline at end of file

Modified: box/trunk/docs/backup/win32_build_on_cygwin_using_mingw.txt
===================================================================
--- box/trunk/docs/backup/win32_build_on_cygwin_using_mingw.txt	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/docs/backup/win32_build_on_cygwin_using_mingw.txt	2006-02-13 13:30:21 UTC (rev 456)
@@ -22,6 +22,23 @@
 	make
 	make install
 
+Download PCRE from 
+[http://prdownloads.sourceforge.net/pcre/pcre-6.3.tar.bz2?download]
+
+Open a Cygwin shell, and unpack PCRE:
+
+	tar xjvf pcre-6.3.tar.bz2
+
+Configure PCRE for MinGW compilation, and build and install it:
+	
+	cd pcre-6.3
+	export CFLAGS="-mno-cygwin"
+	./configure
+	make winshared
+	cp .libs/pcreposix.dll /bin
+	cp .libs/pcreposix.dll.a /usr/i686-pc-mingw32/lib
+	cp pcreposix.h /usr/i686-pc-mingw32/include/regex.h
+
 Now unpack the Box Backup sources, enter the source directory,
 and configure like this:
 

Modified: box/trunk/infrastructure/makeparcels.pl
===================================================================
--- box/trunk/infrastructure/makeparcels.pl	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/makeparcels.pl	2006-02-13 13:30:21 UTC (rev 456)
@@ -40,9 +40,10 @@
 				{
 					last if m'\AEND-ONLY';
 				}
-				next;
 			}
+			next;
 		}
+		next if (m'\AEND-ONLY');
 		
 		# new parcel, or a new parcel definition?
 		if(m/\A\s+(.+)\Z/)
@@ -105,6 +106,12 @@
 	for(@{$parcel_contents{$parcel}})
 	{
 		my ($type,$name) = split /\s+/;
+		my $optional = '';
+
+		if ($type eq 'optional')
+		{
+			($optional,$type,$name) = split /\s+/;
+		}
 		
 		if($type eq 'bin')
 		{
@@ -114,7 +121,14 @@
 		}
 		elsif ($type eq 'script')
 		{
-			print MAKE "\tcp $name $dir\n";
+			if ($optional)
+			{
+				print MAKE "\ttest -r $name && cp $name $dir\n";
+			}
+			else
+			{
+				print MAKE "\tcp $name $dir\n";
+			}
 			# remove path from script name
 			$name =~ m~/([^/]+)\Z~;
 			$name = $1;

Copied: box/trunk/infrastructure/msvc (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc)

Copied: box/trunk/infrastructure/msvc/2003 (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003)

Deleted: box/trunk/infrastructure/msvc/2003/bbackupctl.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/bbackupctl.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2003/bbackupctl.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="bbackupctl"
-	ProjectGUID="{9FD51412-E945-4457-A17A-CA3C505CF431}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
-				OutputFile="$(OutDir)/bbackupctl.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/bbackupctl.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib"
-				OutputFile="$(OutDir)/bbackupctl.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="bbackupctl"
-					Filter="">
-					<File
-						RelativePath="..\..\..\bin\bbackupctl\bbackupctl.cpp">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2003/bbackupctl.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/bbackupctl.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2003/bbackupctl.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2003/bbackupd.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/bbackupd.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2003/bbackupd.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="bbackupd"
-	ProjectGUID="{22D325FB-9131-4BD6-B390-968F0491D687}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\include&quot;;&quot;$(SolutionDir)..\..\..\..\zlib\include&quot;;&quot;$(SolutionDir)..\..\..\lib\backupclient&quot;;&quot;$(SolutionDir)..\..\..\lib\server&quot;;&quot;$(SolutionDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\lib\compress&quot;;&quot;$(SolutionDir)..\..\..\lib\win32&quot;;&quot;$(SolutionDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\lib\win32\Debug\boost_regex.lib $(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
-				OutputFile="$(OutDir)/bbackupd.exe"
-				LinkIncremental="2"
-				IgnoreAllDefaultLibraries="FALSE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/bbackupd.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\lib\win32\Release\boost_regex.lib"
-				OutputFile="$(OutDir)/bbackupd.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="bbackupd"
-					Filter="">
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientContext.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientDeleteList.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupDaemon.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\bbackupd.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\bbwinservice.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\ServiceBackupDaemon.cpp">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="bbackupd"
-					Filter="">
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientContext.h">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientDeleteList.h">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.h">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.h">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupDaemon.h">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\bbwinservice.h">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\ServiceBackupDaemon.h">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-		<File
-			RelativePath="..\..\..\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2003/bbackupd.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/bbackupd.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2003/bbackupd.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2003/boxbackup.sln
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/boxbackup.sln	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2003/boxbackup.sln	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,67 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boxquery", "boxquery.vcproj", "{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{98598F62-FEA7-4134-AA29-0AD2315A214F} = {98598F62-FEA7-4134-AA29-0AD2315A214F}
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcproj", "{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupd", "bbackupd.vcproj", "{22D325FB-9131-4BD6-B390-968F0491D687}"
-	ProjectSection(ProjectDependencies) = postProject
-		{98598F62-FEA7-4134-AA29-0AD2315A214F} = {98598F62-FEA7-4134-AA29-0AD2315A214F}
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32test", "win32test.vcproj", "{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupctl", "bbackupctl.vcproj", "{9FD51412-E945-4457-A17A-CA3C505CF431}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_regex", "lib\win32\boost_regex.vcproj", "{98598F62-FEA7-4134-AA29-0AD2315A214F}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug.ActiveCfg = Debug|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug.Build.0 = Debug|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release.ActiveCfg = Release|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release.Build.0 = Release|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug.ActiveCfg = Debug|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug.Build.0 = Debug|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release.ActiveCfg = Release|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release.Build.0 = Release|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Debug.ActiveCfg = Debug|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Debug.Build.0 = Debug|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Release.ActiveCfg = Release|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Release.Build.0 = Release|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug.ActiveCfg = Debug|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug.Build.0 = Debug|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release.ActiveCfg = Release|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release.Build.0 = Release|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Debug.ActiveCfg = Debug|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Debug.Build.0 = Debug|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Release.ActiveCfg = Release|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Release.Build.0 = Release|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Debug.ActiveCfg = Debug|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Debug.Build.0 = Debug|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Release.ActiveCfg = Release|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Release.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal

Copied: box/trunk/infrastructure/msvc/2003/boxbackup.sln (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/boxbackup.sln)


Property changes on: box/trunk/infrastructure/msvc/2003/boxbackup.sln
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2003/boxbackup.suo
===================================================================
(Binary files differ)

Copied: box/trunk/infrastructure/msvc/2003/boxbackup.suo (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/boxbackup.suo)


Property changes on: box/trunk/infrastructure/msvc/2003/boxbackup.suo
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: box/trunk/infrastructure/msvc/2003/boxquery.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/boxquery.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2003/boxquery.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="boxquery"
-	ProjectGUID="{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
-	RootNamespace="boxquery"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\lib\win32\Debug\boost_regex.lib"
-				OutputFile="$(OutDir)/bbackupquery.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/boxquery.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\lib\win32\Release\boost_regex.lib"
-				OutputFile="$(OutDir)/bbackupquery.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="FALSE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="backupquery"
-					Filter="">
-					<File
-						RelativePath="..\..\..\bin\bbackupquery\autogen_Documentation.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupquery\BackupQueries.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupquery\bbackupquery.cpp">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<Filter
-				Name="bin"
-				Filter="">
-				<Filter
-					Name="backupquery"
-					Filter="">
-					<File
-						RelativePath="..\..\..\bin\bbackupquery\BackupQueries.h">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-		<File
-			RelativePath="..\..\..\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2003/boxquery.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/boxquery.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2003/boxquery.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2003/common.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/common.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2003/common.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,638 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="common"
-	ProjectGUID="{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="4"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(OutDir)/common.lib"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="4"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;NDEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(OutDir)/common.lib"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<Filter
-				Name="lib"
-				Filter="">
-				<Filter
-					Name="compress"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\compress\autogen_CompressException.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\compress\CompressStream.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="common"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\common\autogen_CommonException.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\autogen_ConversionException.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxException.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTime.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTimeToText.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\CollectInBufferStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Configuration.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ConversionString.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\DebugAssertFailed.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\DebugMemLeakFinder.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\DebugPrintf.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\EventWatchFilesystemObject.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ExcludeList.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FdGetLine.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FileStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\IOStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\IOStreamGetLine.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\LinuxWorkaround.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemBlockStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\PartialReadStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ReadGatherStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\StreamableMemBlock.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\UnixUser.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Utils.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\WaitForEvent.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="backupclient"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\backupclient\autogen_BackupProtocolClient.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\autogen_BackupStoreException.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientCryptoKeys.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientFileAttributes.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientMakeExcludeList.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientRestore.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupDaemonConfigVerify.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreDirectory.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFile.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCmbDiff.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCmbIdx.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCombine.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCryptVar.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileDiff.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileEncodeStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFilename.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFilenameClear.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileRevDiff.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreObjectDump.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="crypto"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\crypto\autogen_CipherException.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherAES.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherBlowfish.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherContext.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherDescription.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\MD5Digest.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\Random.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\RollingChecksum.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="win32"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\win32\emu.cpp">
-					</File>
-				</Filter>
-				<Filter
-					Name="server"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\server\autogen_ConnectionException.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\autogen_ServerException.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Daemon.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\LocalProcessStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Protocol.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolObject.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolUncertainStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Socket.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketStream.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketStreamTLS.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SSLLib.cpp">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\TLSContext.cpp">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<Filter
-				Name="lib"
-				Filter="">
-				<Filter
-					Name="compress"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\compress\autogen_CompressException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\compress\Compress.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\compress\CompressException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\compress\CompressStream.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="common"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\common\autogen_CommonException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\autogen_ConversionException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BannerText.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BeginStructPackForWire.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Box.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxPlatform.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxPortsAndFiles.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTime.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTimeToText.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTimeToUnix.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\CollectInBufferStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\CommonException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Configuration.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Conversion.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\EndStructPackForWire.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\EventWatchFilesystemObject.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ExcludeList.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FdGetLine.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FileModificationTime.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FileStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Guards.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\IOStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\IOStreamGetLine.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\LinuxWorkaround.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\LocalProcessStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MainHelper.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemBlockStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemLeakFinder.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemLeakFindOff.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemLeakFindOn.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\NamedLock.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\PartialReadStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ReadGatherStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\StreamableMemBlock.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\TemporaryDirectory.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Test.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\UnixUser.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Utils.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\WaitForEvent.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="backupclient"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\backupclient\autogen_BackupProtocolClient.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\autogen_BackupStoreException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientCryptoKeys.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientFileAttributes.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientMakeExcludeList.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientRestore.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupDaemonConfigVerify.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreConstants.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreDirectory.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFile.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCryptVar.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileEncodeStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFilename.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFilenameClear.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileWire.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreObjectMagic.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="crypto"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\crypto\autogen_CipherException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherAES.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherBlowfish.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherContext.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherDescription.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\MD5Digest.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\Random.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\RollingChecksum.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="win32"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\win32\emu.h">
-					</File>
-				</Filter>
-				<Filter
-					Name="server"
-					Filter="">
-					<File
-						RelativePath="..\..\..\lib\server\autogen_ConnectionException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\autogen_ServerException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Daemon.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Protocol.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolObject.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolUncertainStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolWire.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ServerException.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ServerStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ServerTLS.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Socket.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketListen.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketStream.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketStreamTLS.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SSLLib.h">
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\TLSContext.h">
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2003/common.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/common.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2003/common.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2003/win32test.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/win32test.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2003/win32test.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="win32test"
-	ProjectGUID="{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
-				OutputFile="$(OutDir)/win32test.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/win32test.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib"
-				OutputFile="$(OutDir)/win32test.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\..\lib\win32\emu.cpp">
-			</File>
-			<File
-				RelativePath="..\..\..\lib\win32\win32test.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-		<File
-			RelativePath="..\..\..\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2003/win32test.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2003/win32test.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2003/win32test.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Copied: box/trunk/infrastructure/msvc/2005 (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005)

Deleted: box/trunk/infrastructure/msvc/2005/bbackupctl.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupctl.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2005/bbackupctl.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,217 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="bbackupctl"
-	ProjectGUID="{9FD51412-E945-4457-A17A-CA3C505CF431}"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
-				OutputFile="$(OutDir)/bbackupctl.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/bbackupctl.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="true"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib"
-				OutputFile="$(OutDir)/bbackupctl.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<Filter
-				Name="bin"
-				>
-				<Filter
-					Name="bbackupctl"
-					>
-					<File
-						RelativePath="..\..\..\bin\bbackupctl\bbackupctl.cpp"
-						>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2005/bbackupctl.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupctl.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2005/bbackupctl.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2005/bbackupd.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupd.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2005/bbackupd.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="bbackupd"
-	ProjectGUID="{22D325FB-9131-4BD6-B390-968F0491D687}"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\..\lib\backupclient&quot;;&quot;$(SolutionDir)..\..\..\lib\common&quot;;&quot;$(SolutionDir)..\..\..\lib\compress&quot;;&quot;$(SolutionDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\lib\server&quot;;&quot;$(SolutionDir)..\..\..\lib\win32&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\inc32&quot;;&quot;$(SolutionDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
-				OutputFile="$(OutDir)/bbackupd.exe"
-				LinkIncremental="2"
-				IgnoreAllDefaultLibraries="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/bbackupd.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="true"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\lib\win32\Release\boost_regex.lib"
-				OutputFile="$(OutDir)/bbackupd.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<Filter
-				Name="bin"
-				>
-				<Filter
-					Name="bbackupd"
-					>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientContext.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientDeleteList.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupDaemon.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\bbackupd.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\Win32BackupService.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\Win32ServiceFunctions.cpp"
-						>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<Filter
-				Name="bin"
-				>
-				<Filter
-					Name="bbackupd"
-					>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientContext.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientDeleteList.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\BackupDaemon.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\Win32BackupService.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupd\Win32ServiceFunctions.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<File
-			RelativePath="..\..\..\ReadMe.txt"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2005/bbackupd.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/bbackupd.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2005/bbackupd.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2005/boxbackup.sln
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxbackup.sln	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2005/boxbackup.sln	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,55 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boxquery", "boxquery.vcproj", "{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcproj", "{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupd", "bbackupd.vcproj", "{22D325FB-9131-4BD6-B390-968F0491D687}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32test", "win32test.vcproj", "{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupctl", "bbackupctl.vcproj", "{9FD51412-E945-4457-A17A-CA3C505CF431}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug|Win32.Build.0 = Debug|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release|Win32.ActiveCfg = Release|Win32
-		{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release|Win32.Build.0 = Release|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug|Win32.ActiveCfg = Debug|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug|Win32.Build.0 = Debug|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release|Win32.ActiveCfg = Release|Win32
-		{A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release|Win32.Build.0 = Release|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Debug|Win32.ActiveCfg = Debug|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Debug|Win32.Build.0 = Debug|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Release|Win32.ActiveCfg = Release|Win32
-		{22D325FB-9131-4BD6-B390-968F0491D687}.Release|Win32.Build.0 = Release|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug|Win32.Build.0 = Debug|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release|Win32.ActiveCfg = Release|Win32
-		{28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release|Win32.Build.0 = Release|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Debug|Win32.ActiveCfg = Debug|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Debug|Win32.Build.0 = Debug|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Release|Win32.ActiveCfg = Release|Win32
-		{9FD51412-E945-4457-A17A-CA3C505CF431}.Release|Win32.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

Copied: box/trunk/infrastructure/msvc/2005/boxbackup.sln (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxbackup.sln)


Property changes on: box/trunk/infrastructure/msvc/2005/boxbackup.sln
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2005/boxbackup.suo
===================================================================
(Binary files differ)

Copied: box/trunk/infrastructure/msvc/2005/boxbackup.suo (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxbackup.suo)


Property changes on: box/trunk/infrastructure/msvc/2005/boxbackup.suo
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: box/trunk/infrastructure/msvc/2005/boxquery.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxquery.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2005/boxquery.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="boxquery"
-	ProjectGUID="{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
-	RootNamespace="boxquery"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
-				OutputFile="$(OutDir)/bbackupquery.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/boxquery.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="true"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\lib\win32\Release\boost_regex.lib"
-				OutputFile="$(OutDir)/bbackupquery.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="false"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<Filter
-				Name="bin"
-				>
-				<Filter
-					Name="backupquery"
-					>
-					<File
-						RelativePath="..\..\..\bin\bbackupquery\autogen_Documentation.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupquery\BackupQueries.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\bin\bbackupquery\bbackupquery.cpp"
-						>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<Filter
-				Name="bin"
-				>
-				<Filter
-					Name="backupquery"
-					>
-					<File
-						RelativePath="..\..\..\bin\bbackupquery\BackupQueries.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<File
-			RelativePath="..\..\..\ReadMe.txt"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2005/boxquery.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/boxquery.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2005/boxquery.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2005/common.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2005/common.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,850 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="common"
-	ProjectGUID="{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
-	RootNamespace="common"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;$(NOINHERIT)"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				WarnAsError="false"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(OutDir)/common.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="true"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;NDEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(OutDir)/common.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<Filter
-				Name="lib"
-				>
-				<Filter
-					Name="compress"
-					>
-					<File
-						RelativePath="..\..\..\lib\compress\autogen_CompressException.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\compress\CompressStream.cpp"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="common"
-					>
-					<File
-						RelativePath="..\..\..\lib\common\autogen_CommonException.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\autogen_ConversionException.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxException.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTime.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTimeToText.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\CollectInBufferStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Configuration.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ConversionString.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\DebugAssertFailed.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\DebugMemLeakFinder.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\DebugPrintf.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\EventWatchFilesystemObject.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ExcludeList.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FdGetLine.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FileStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\IOStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\IOStreamGetLine.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemBlockStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\PartialReadStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ReadGatherStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\StreamableMemBlock.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\UnixUser.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Utils.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\WaitForEvent.cpp"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="backupclient"
-					>
-					<File
-						RelativePath="..\..\..\lib\backupclient\autogen_BackupProtocolClient.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\autogen_BackupStoreException.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientCryptoKeys.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientFileAttributes.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientMakeExcludeList.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientRestore.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupDaemonConfigVerify.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreDirectory.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFile.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCmbDiff.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCmbIdx.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCombine.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCryptVar.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileDiff.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileEncodeStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFilename.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFilenameClear.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileRevDiff.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreObjectDump.cpp"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="crypto"
-					>
-					<File
-						RelativePath="..\..\..\lib\crypto\autogen_CipherException.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherAES.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherBlowfish.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherContext.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherDescription.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\MD5Digest.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\Random.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\RollingChecksum.cpp"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="win32"
-					>
-					<File
-						RelativePath="..\..\..\lib\win32\emu.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.cpp"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="server"
-					>
-					<File
-						RelativePath="..\..\..\lib\server\autogen_ConnectionException.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\autogen_ServerException.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Daemon.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\LocalProcessStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Protocol.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolObject.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolUncertainStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Socket.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketStream.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketStreamTLS.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SSLLib.cpp"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\TLSContext.cpp"
-						>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<Filter
-				Name="lib"
-				>
-				<Filter
-					Name="compress"
-					>
-					<File
-						RelativePath="..\..\..\lib\compress\autogen_CompressException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\compress\Compress.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\compress\CompressException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\compress\CompressStream.h"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="common"
-					>
-					<File
-						RelativePath="..\..\..\lib\common\autogen_CommonException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\autogen_ConversionException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BannerText.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BeginStructPackForWire.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Box.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxConfig.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxPlatform.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxPortsAndFiles.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTime.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTimeToText.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\BoxTimeToUnix.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\CollectInBufferStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\CommonException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Configuration.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Conversion.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\EndStructPackForWire.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\EventWatchFilesystemObject.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ExcludeList.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FdGetLine.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FileModificationTime.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\FileStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Guards.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\IOStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\IOStreamGetLine.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\LocalProcessStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MainHelper.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemBlockStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemLeakFinder.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemLeakFindOff.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\MemLeakFindOn.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\NamedLock.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\PartialReadStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\ReadGatherStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\StreamableMemBlock.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\TemporaryDirectory.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Test.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\UnixUser.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\Utils.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\common\WaitForEvent.h"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="backupclient"
-					>
-					<File
-						RelativePath="..\..\..\lib\backupclient\autogen_BackupProtocolClient.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\autogen_BackupStoreException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientCryptoKeys.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientFileAttributes.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientMakeExcludeList.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupClientRestore.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupDaemonConfigVerify.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreConstants.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreDirectory.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFile.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileCryptVar.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileEncodeStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFilename.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFilenameClear.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreFileWire.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\backupclient\BackupStoreObjectMagic.h"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="crypto"
-					>
-					<File
-						RelativePath="..\..\..\lib\crypto\autogen_CipherException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherAES.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherBlowfish.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherContext.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherDescription.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\CipherException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\MD5Digest.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\Random.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\crypto\RollingChecksum.h"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="win32"
-					>
-					<File
-						RelativePath="..\..\..\lib\win32\emu.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.h"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="server"
-					>
-					<File
-						RelativePath="..\..\..\lib\server\autogen_ConnectionException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\autogen_ServerException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Daemon.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Protocol.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolObject.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolUncertainStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ProtocolWire.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ServerException.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ServerStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\ServerTLS.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\Socket.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketListen.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketStream.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SocketStreamTLS.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\SSLLib.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\..\lib\server\TLSContext.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2005/common.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/common.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2005/common.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Deleted: box/trunk/infrastructure/msvc/2005/win32test.vcproj
===================================================================
--- box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/win32test.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/infrastructure/msvc/2005/win32test.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,217 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="win32test"
-	ProjectGUID="{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="..\..\..\Debug"
-			IntermediateDirectory="..\..\..\Debug"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
-				OutputFile="$(OutDir)/win32test.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/win32test.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="..\..\..\Release"
-			IntermediateDirectory="..\..\..\Release"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="true"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib"
-				OutputFile="$(OutDir)/win32test.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\..\lib\win32\emu.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\test\win32\testlibwin32.cpp"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<File
-			RelativePath="..\..\..\ReadMe.txt"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

Copied: box/trunk/infrastructure/msvc/2005/win32test.vcproj (from rev 455, box/chris/win32/vc2005-compile-fixes/infrastructure/msvc/2005/win32test.vcproj)


Property changes on: box/trunk/infrastructure/msvc/2005/win32test.vcproj
___________________________________________________________________
Name: svn:eol-style
   + CRLF

Modified: box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupClientFileAttributes.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/backupclient/BackupClientFileAttributes.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,10 +9,13 @@
 
 #include "Box.h"
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string.h>
-#include <unistd.h>
 #include <limits.h>
 #include <algorithm>
 #include <new>
@@ -334,7 +337,12 @@
 		box_time_t modSecs = BoxTimeToSeconds(modTime);
 		__time64_t winTime = modSecs;
 
-		if (_gmtime64(&winTime) == 0 )
+		// _MAX__TIME64_T doesn't seem to be defined, but the code below
+		// will throw an assertion failure if we exceed it :-)
+		// Microsoft says dates up to the year 3000 are valid, which
+		// is a bit more than 15 * 2^32. Even that doesn't seem
+		// to be true (still aborts), but it can at least hold 2^32.
+		if (winTime >= 0x100000000LL || _gmtime64(&winTime) == 0)
 		{
 			::syslog(LOG_ERR, "Invalid Modification Time "
 				"caught for file: %s", Filename);
@@ -345,7 +353,7 @@
 		modSecs = BoxTimeToSeconds(modTime);
 		winTime = modSecs;
 
-		if (_gmtime64(&winTime) == 0 )
+		if (winTime > 0x100000000LL || _gmtime64(&winTime) == 0)
 		{
 			::syslog(LOG_ERR, "Invalid Attribute Modification "
 				"Time caught for file: %s", Filename);

Modified: box/trunk/lib/backupclient/BackupClientRestore.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupClientRestore.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/backupclient/BackupClientRestore.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,11 +9,14 @@
 
 #include "Box.h"
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string>
 #include <set>
-#include <unistd.h>
 #include <limits.h>
 #include <stdio.h>
 

Modified: box/trunk/lib/backupclient/BackupStoreFile.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFile.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/backupclient/BackupStoreFile.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,7 +9,10 @@
 
 #include "Box.h"
 
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <sys/stat.h>
 #include <string.h>
 #include <new>
@@ -1480,7 +1483,9 @@
 // --------------------------------------------------------------------------
 void BackupStoreFile::EncodingBuffer::Reallocate(int NewSize)
 {
+#ifndef WIN32
 	TRACE2("Reallocating EncodingBuffer from %d to %d\n", mBufferSize, NewSize);
+#endif
 	ASSERT(mpBuffer != 0);
 	uint8_t *buffer = (uint8_t*)BackupStoreFile::CodingChunkAlloc(NewSize);
 	if(buffer == 0)

Modified: box/trunk/lib/backupclient/BackupStoreFileDiff.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/backupclient/BackupStoreFileDiff.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -577,6 +577,31 @@
 			int rollOverInitialBytes = 0;
 			while(true)
 			{
+				if(sDiffTimerExpired)
+				{
+					ASSERT(TimeMgmtEpoch > 0);
+					ASSERT(pDiffTimer != NULL);
+					
+					time_t tTotalRunIntvl = time(NULL) - TimeMgmtEpoch;
+					
+					if(MaximumDiffingTime > 0 && 
+						tTotalRunIntvl >= MaximumDiffingTime)
+					{
+						TRACE0("MaximumDiffingTime reached - "
+							"suspending file diff\n");
+						abortSearch = true;
+						break;
+					}
+					else if(KeepAliveTime > 0)
+					{
+						TRACE0("KeepAliveTime reached - "
+							"initiating keep-alive\n");
+						pDiffTimer->DoKeepAlive();
+					}
+
+					sDiffTimerExpired = false;
+				}
+
 				// Load in another block of data, and record how big it is
 				int bytesInEndings = rFile.Read(endings, Sizes[s]);
 				int tmp;
@@ -661,38 +686,12 @@
 							break;
 						}
 
-						bool DiffTimedOut = false;
-						
-						if(sDiffTimerExpired)
-						{
-							ASSERT(TimeMgmtEpoch > 0);
-							ASSERT(pDiffTimer != NULL);
-							
-							time_t tTotalRunIntvl = time(NULL) - TimeMgmtEpoch;
-							
-							if(MaximumDiffingTime > 0 && 
-								tTotalRunIntvl >= MaximumDiffingTime)
-							{
-								TRACE0("MaximumDiffingTime reached - "
-									"suspending file diff\n");
-								DiffTimedOut = true;
-							}
-							else if(KeepAliveTime > 0)
-							{
-								TRACE0("KeepAliveTime reached - "
-									"initiating keep-alive\n");
-								pDiffTimer->DoKeepAlive();
-							}
-
-							sDiffTimerExpired = false;
-						}
-
 						int64_t NumBlocksFound = static_cast<int64_t>(
 							rFoundBlocks.size());
 						int64_t MaxBlocksFound = NumBlocks * 
 							BACKUP_FILE_DIFF_MAX_BLOCK_FIND_MULTIPLE;
 						
-						if(NumBlocksFound > MaxBlocksFound || DiffTimedOut)
+						if(NumBlocksFound > MaxBlocksFound)
 						{
 							abortSearch = true;
 							break;

Modified: box/trunk/lib/backupclient/BackupStoreFilenameClear.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFilenameClear.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/backupclient/BackupStoreFilenameClear.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -191,7 +191,9 @@
 {
 	if(spEncDecBuffer == 0)
 	{
+#ifndef WIN32
 		TRACE1("Allocating filename encoding/decoding buffer with size %d\n", BufSize);
+#endif
 		spEncDecBuffer = new MemoryBlockGuard<uint8_t *>(BufSize);
 		MEMLEAKFINDER_NOT_A_LEAK(spEncDecBuffer);
 		MEMLEAKFINDER_NOT_A_LEAK(*spEncDecBuffer);
@@ -201,7 +203,9 @@
 	{
 		if(sEncDecBufferSize < BufSize)
 		{
+#ifndef WIN32
 			TRACE2("Reallocating filename encoding/decoding buffer from %d to %d\n", sEncDecBufferSize, BufSize);
+#endif
 			spEncDecBuffer->Resize(BufSize);
 			sEncDecBufferSize = BufSize;
 			MEMLEAKFINDER_NOT_A_LEAK(*spEncDecBuffer);

Modified: box/trunk/lib/backupclient/BackupStoreObjectDump.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreObjectDump.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/backupclient/BackupStoreObjectDump.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -96,18 +96,18 @@
 		int depends_l = 0;
 		if((*i)->GetDependsNewer() != 0)
 		{
-#ifdef WIN32
+#ifdef _MSC_VER
 			depends_l += ::sprintf(depends + depends_l, " depNew(%I64x)", (*i)->GetDependsNewer());
 #else
-			depends_l += ::sprintf(depends + depends_l, " depNew(%llx)", (*i)->GetDependsNewer());
+			depends_l += ::sprintf(depends + depends_l, " depNew(%llx)", (long long)((*i)->GetDependsNewer()));
 #endif
 		}
 		if((*i)->GetDependsOlder() != 0)
 		{
-#ifdef WIN32
+#ifdef _MSC_VER
 			depends_l += ::sprintf(depends + depends_l, " depOld(%I64x)", (*i)->GetDependsOlder());
 #else
-			depends_l += ::sprintf(depends + depends_l, " depOld(%llx)", (*i)->GetDependsOlder());
+			depends_l += ::sprintf(depends + depends_l, " depOld(%llx)", (long long)((*i)->GetDependsOlder()));
 #endif
 		}
 

Modified: box/trunk/lib/common/BoxPlatform.h
===================================================================
--- box/trunk/lib/common/BoxPlatform.h	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/BoxPlatform.h	2006-02-13 13:30:21 UTC (rev 456)
@@ -87,13 +87,11 @@
 	typedef unsigned __int32 u_int32_t;
 	typedef unsigned __int64 u_int64_t;
 
-	#define HAVE_UINT8_T
-	#define HAVE_UINT16_T
-	#define HAVE_UINT32_T
-	#define HAVE_UINT64_T
+	#define HAVE_U_INT8_T
+	#define HAVE_U_INT16_T
+	#define HAVE_U_INT32_T
+	#define HAVE_U_INT64_T
 
-	typedef unsigned int uid_t;
-	typedef unsigned int gid_t;
 	typedef int pid_t;
 #endif // WIN32 && !__MINGW32__
 

Modified: box/trunk/lib/common/DebugMemLeakFinder.cpp
===================================================================
--- box/trunk/lib/common/DebugMemLeakFinder.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/DebugMemLeakFinder.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -16,8 +16,11 @@
 #undef realloc
 #undef free
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <map>
-#include <unistd.h>
 #include <stdio.h>
 #include <string.h>
 #include <set>
@@ -220,12 +223,12 @@
 		}
 		else
 		{
-			TRACE4("Block 0x%08lx size %d allocated at %s:%d\n", (long)i->first, i->second.size, i->second.file, i->second.line);
+			TRACE4("Block 0x%08p size %d allocated at %s:%d\n", i->first, i->second.size, i->second.file, i->second.line);
 		}
 	}
 	for(std::map<void *, ObjectInfo>::const_iterator i(sSectionObjectBlocks.begin()); i != sSectionObjectBlocks.end(); ++i)
 	{
-		TRACE5("Object%s 0x%08lx size %d allocated at %s:%d\n", i->second.array?" []":"", (long)i->first, i->second.size, i->second.file, i->second.line);
+		TRACE5("Object%s 0x%08p size %d allocated at %s:%d\n", i->second.array?" []":"", i->first, i->second.size, i->second.file, i->second.line);
 	}
 }
 
@@ -250,11 +253,11 @@
 {
 	for(std::map<void *, MallocBlockInfo>::const_iterator i(sMallocBlocks.begin()); i != sMallocBlocks.end(); ++i)
 	{
-		if(is_leak(i->first)) ::fprintf(file, "Block 0x%08lx size %d allocated at %s:%d\n", (long)i->first, i->second.size, i->second.file, i->second.line);
+		if(is_leak(i->first)) ::fprintf(file, "Block 0x%08p size %d allocated at %s:%d\n", i->first, i->second.size, i->second.file, i->second.line);
 	}
 	for(std::map<void *, ObjectInfo>::const_iterator i(sObjectBlocks.begin()); i != sObjectBlocks.end(); ++i)
 	{
-		if(is_leak(i->first)) ::fprintf(file, "Object%s 0x%08lx size %d allocated at %s:%d\n", i->second.array?" []":"", (long)i->first, i->second.size, i->second.file, i->second.line);
+		if(is_leak(i->first)) ::fprintf(file, "Object%s 0x%08p size %d allocated at %s:%d\n", i->second.array?" []":"", i->first, i->second.size, i->second.file, i->second.line);
 	}
 }
 
@@ -271,7 +274,11 @@
 	{
 		if(memleakfinder_numleaks() > 0)
 		{
+#ifdef HAVE_GETPID
 			fprintf(file, "MEMORY LEAKS FROM PROCESS %d (%s)\n", getpid(), markertext);
+#else
+			fprintf(file, "MEMORY LEAKS (%s)\n", markertext);
+#endif
 			memleakfinder_reportleaks_file(file);
 		}
 	

Modified: box/trunk/lib/common/EventWatchFilesystemObject.cpp
===================================================================
--- box/trunk/lib/common/EventWatchFilesystemObject.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/EventWatchFilesystemObject.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -10,8 +10,11 @@
 #include "Box.h"
 
 #include <fcntl.h>
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include "EventWatchFilesystemObject.h"
 #include "autogen_CommonException.h"
 

Modified: box/trunk/lib/common/ExcludeList.cpp
===================================================================
--- box/trunk/lib/common/ExcludeList.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/ExcludeList.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -232,7 +232,7 @@
 	//
 	mDefinite.clear();
 
-#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+#ifdef HAVE_REGEX_H
 	// free regex memory
 	while(mRegex.size() > 0)
 	{
@@ -273,7 +273,7 @@
 	//
 	//
 	//
-#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+#ifdef HAVE_REGEX_H
 	rArchive.Read(iCount);
 
 	if (iCount > 0)
@@ -310,7 +310,7 @@
 			}
 		}
 	}
-#endif // PLATFORM_REGEX_NOT_SUPPORTED
+#endif // HAVE_REGEX_H
 
 	//
 	//
@@ -365,7 +365,7 @@
 	//
 	//
 	//
-#ifndef PLATFORM_REGEX_NOT_SUPPORTED
+#ifdef HAVE_REGEX_H
 	// don't even try to save compiled regular expressions,
 	// use string copies instead.
 	ASSERT(mRegex.size() == mRegexStr.size()); 	
@@ -378,7 +378,7 @@
 	{
 		rArchive.Write(*i);
 	}
-#endif // PLATFORM_REGEX_NOT_SUPPORTED
+#endif // HAVE_REGEX_H
 
 	//
 	//

Modified: box/trunk/lib/common/FdGetLine.cpp
===================================================================
--- box/trunk/lib/common/FdGetLine.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/FdGetLine.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -10,8 +10,11 @@
 #include "Box.h"
 
 #include <sys/types.h>
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include "FdGetLine.h"
 #include "CommonException.h"
 
@@ -117,7 +120,21 @@
 		// Read more in?
 		if(!foundLineEnd && mBufferBegin >= mBytesInBuffer && !mPendingEOF)
 		{
+#ifdef WIN32
+			int bytes;
+
+			if (mFileHandle == _fileno(stdin))
+			{
+				bytes = console_read(mBuffer, sizeof(mBuffer));
+			}
+			else
+			{
+				bytes = ::read(mFileHandle, mBuffer, 
+					sizeof(mBuffer));
+			}
+#else // !WIN32
 			int bytes = ::read(mFileHandle, mBuffer, sizeof(mBuffer));
+#endif // WIN32
 			
 			// Error?
 			if(bytes == -1)

Modified: box/trunk/lib/common/FileStream.h
===================================================================
--- box/trunk/lib/common/FileStream.h	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/FileStream.h	2006-02-13 13:30:21 UTC (rev 456)
@@ -15,8 +15,11 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <sys/stat.h>
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #ifdef WIN32
 	#define INVALID_FILE NULL
 	typedef HANDLE tOSFileHandle;

Modified: box/trunk/lib/common/Guards.h
===================================================================
--- box/trunk/lib/common/Guards.h	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/Guards.h	2006-02-13 13:30:21 UTC (rev 456)
@@ -11,10 +11,13 @@
 #ifndef GUARDS__H
 #define GUARDS__H
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <fcntl.h>
 #include <stdlib.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <new>
 
 #include "CommonException.h"

Modified: box/trunk/lib/common/NamedLock.cpp
===================================================================
--- box/trunk/lib/common/NamedLock.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/NamedLock.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -11,7 +11,11 @@
 
 #include <fcntl.h>
 #include <errno.h>
-#include <unistd.h>
+
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #ifdef HAVE_FLOCK
 	#include <sys/file.h>
 #endif

Modified: box/trunk/lib/common/Test.h
===================================================================
--- box/trunk/lib/common/Test.h	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/Test.h	2006-02-13 13:30:21 UTC (rev 456)
@@ -14,8 +14,11 @@
 #include <sys/stat.h>
 #include <stdlib.h>
 #include <signal.h>
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <stdio.h>
  
 extern int failures;

Modified: box/trunk/lib/common/UnixUser.cpp
===================================================================
--- box/trunk/lib/common/UnixUser.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/UnixUser.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,11 +9,13 @@
 
 #include "Box.h"
 
-#ifndef WIN32
-#include <pwd.h>
+#ifdef HAVE_PWD_H
+	#include <pwd.h>
 #endif
 
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
 
 #include "UnixUser.h"
 #include "CommonException.h"

Modified: box/trunk/lib/common/WaitForEvent.cpp
===================================================================
--- box/trunk/lib/common/WaitForEvent.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/common/WaitForEvent.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,7 +9,10 @@
 
 #include "Box.h"
 
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <errno.h>
 #include <string.h>
 

Modified: box/trunk/lib/server/Daemon.cpp
===================================================================
--- box/trunk/lib/server/Daemon.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/server/Daemon.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,9 +9,12 @@
 
 #include "Box.h"
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <errno.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <signal.h>
 #include <string.h>
 #include <stdarg.h>
@@ -124,11 +127,35 @@
 
 		// Load the configuration file.
 		std::string errors;
-		std::auto_ptr<Configuration> pconfig = 
-			Configuration::LoadAndVerify(
+		std::auto_ptr<Configuration> pconfig;
+
+		try
+		{
+			pconfig = Configuration::LoadAndVerify(
 				mConfigFileName.c_str(), 
 				GetConfigVerify(), errors);
+		}
+		catch(BoxException &e)
+		{
+			if(e.GetType() == CommonException::ExceptionType &&
+				e.GetSubType() == CommonException::OSFileOpenError)
+			{
+				fprintf(stderr, "%s: failed to start: "
+					"failed to open configuration file: "
+					"%s", DaemonName(), 
+					mConfigFileName.c_str());
+#ifdef WIN32
+				::syslog(LOG_ERR, "%s: failed to start: "
+					"failed to open configuration file: "
+					"%s", DaemonName(), 
+					mConfigFileName.c_str());
+#endif
+				return 1;
+			}
 
+			throw;
+		}
+
 		// Got errors?
 		if(pconfig.get() == 0 || !errors.empty())
 		{
@@ -136,6 +163,11 @@
 			fprintf(stderr, "%s: Errors in config file %s:\n%s", 
 				DaemonName(), mConfigFileName.c_str(), 
 				errors.c_str());
+#ifdef WIN32
+			::syslog(LOG_ERR, "%s: Errors in config file %s:\n%s",
+				DaemonName(), mConfigFileName.c_str(), 
+				errors.c_str());
+#endif
 			// And give up
 			return 1;
 		}
@@ -144,9 +176,6 @@
 		mpConfiguration = pconfig.release();
 		mLoadedConfigModifiedTime = GetConfigFileModifiedTime();
 		
-		// Server configuration
-		const Configuration &serverConfig(mpConfiguration->GetSubConfiguration("Server"));
-		
 		// Let the derived class have a go at setting up stuff in the initial process
 		SetupInInitialProcess();
 		
@@ -161,6 +190,10 @@
 			THROW_EXCEPTION(ServerException, DaemoniseFailed)
 		}
 		
+		// Server configuration
+		const Configuration &serverConfig(
+			mpConfiguration->GetSubConfiguration("Server"));
+
 		// Open PID file for writing
 		pidFileName = serverConfig.GetKeyValue("PidFile");
 		FileHandleGuard<(O_WRONLY | O_CREAT | O_TRUNC), (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)> pidFile(pidFileName.c_str());
@@ -290,17 +323,33 @@
 	}
 	catch(BoxException &e)
 	{
-		fprintf(stderr, "%s: exception %s (%d/%d)\n", DaemonName(), e.what(), e.GetType(), e.GetSubType());
+		fprintf(stderr, "%s: failed to start: exception %s (%d/%d)\n", 
+			DaemonName(), e.what(), e.GetType(), e.GetSubType());
+#ifdef WIN32
+		::syslog(LOG_ERR, "%s: failed to start: "
+			"exception %s (%d/%d)\n", DaemonName(), 
+			e.what(), e.GetType(), e.GetSubType());
+#endif
 		return 1;
 	}
 	catch(std::exception &e)
 	{
-		fprintf(stderr, "%s: exception %s\n", DaemonName(), e.what());
+		fprintf(stderr, "%s: failed to start: exception %s\n", 
+			DaemonName(), e.what());
+#ifdef WIN32
+		::syslog(LOG_ERR, "%s: failed to start: exception %s\n", 
+			DaemonName(), e.what());
+#endif
 		return 1;
 	}
 	catch(...)
 	{
-		fprintf(stderr, "%s: unknown exception\n", DaemonName());
+		fprintf(stderr, "%s: failed to start: unknown exception\n", 
+			DaemonName());
+#ifdef WIN32
+		::syslog(LOG_ERR, "%s: failed to start: unknown exception\n", 
+			DaemonName());
+#endif
 		return 1;
 	}
 	
@@ -357,17 +406,21 @@
 	}
 	catch(BoxException &e)
 	{
-		::syslog(LOG_ERR, "exception %s (%d/%d) -- terminating", e.what(), e.GetType(), e.GetSubType());
+		::syslog(LOG_ERR, "%s: terminating due to exception %s "
+			"(%d/%d)", DaemonName(), e.what(), e.GetType(), 
+			e.GetSubType());
 		return 1;
 	}
 	catch(std::exception &e)
 	{
-		::syslog(LOG_ERR, "exception %s -- terminating", e.what());
+		::syslog(LOG_ERR, "%s: terminating due to exception %s", 
+			DaemonName(), e.what());
 		return 1;
 	}
 	catch(...)
 	{
-		::syslog(LOG_ERR, "unknown exception -- terminating");
+		::syslog(LOG_ERR, "%s: terminating due to unknown exception",
+			DaemonName());
 		return 1;
 	}
 	

Modified: box/trunk/lib/server/LocalProcessStream.cpp
===================================================================
--- box/trunk/lib/server/LocalProcessStream.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/server/LocalProcessStream.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,11 +9,14 @@
 
 #include "Box.h"
 
-#ifndef WIN32
-#include <sys/socket.h>
+#ifdef HAVE_SYS_SOCKET_H
+	#include <sys/socket.h>
 #endif
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include "LocalProcessStream.h"
 #include "SocketStream.h"
 #include "autogen_ServerException.h"

Modified: box/trunk/lib/server/Socket.cpp
===================================================================
--- box/trunk/lib/server/Socket.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/server/Socket.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,7 +9,10 @@
 
 #include "Box.h"
 
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <sys/types.h>
 #ifndef WIN32
 #include <sys/socket.h>

Modified: box/trunk/lib/server/SocketListen.h
===================================================================
--- box/trunk/lib/server/SocketListen.h	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/server/SocketListen.h	2006-02-13 13:30:21 UTC (rev 456)
@@ -11,8 +11,11 @@
 #define SOCKETLISTEN__H
 
 #include <errno.h>
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #ifdef HAVE_KQUEUE
 	#include <sys/event.h>
 	#include <sys/time.h>

Modified: box/trunk/lib/server/SocketStream.cpp
===================================================================
--- box/trunk/lib/server/SocketStream.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/server/SocketStream.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -9,7 +9,10 @@
 
 #include "Box.h"
 
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <sys/types.h>
 #include <errno.h>
 

Modified: box/trunk/lib/win32/WinNamedPipeStream.cpp
===================================================================
--- box/trunk/lib/win32/WinNamedPipeStream.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/win32/WinNamedPipeStream.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -11,7 +11,10 @@
 
 #ifdef WIN32
 
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+
 #include <sys/types.h>
 #include <errno.h>
 #include <windows.h>
@@ -97,15 +100,14 @@
 	{
 		::syslog(LOG_ERR, "ConnectNamedPipe failed: %d", 
 			GetLastError());
-		CloseHandle(mSocketHandle);
-		mSocketHandle = NULL;
+		Close();
 		THROW_EXCEPTION(ServerException, SocketOpenError)
 	}
 	
-	mReadClosed  = FALSE;
-	mWriteClosed = FALSE;
-	mIsServer    = TRUE; // must flush and disconnect before closing
-	mIsConnected = TRUE;
+	mReadClosed  = false;
+	mWriteClosed = false;
+	mIsServer    = true; // must flush and disconnect before closing
+	mIsConnected = true;
 }
 
 // --------------------------------------------------------------------------
@@ -140,10 +142,10 @@
 		THROW_EXCEPTION(ServerException, SocketOpenError)
 	}
 
-	mReadClosed  = FALSE;
-	mWriteClosed = FALSE;
-	mIsServer    = FALSE; // just close the socket
-	mIsConnected = TRUE;
+	mReadClosed  = false;
+	mWriteClosed = false;
+	mIsServer    = false; // just close the socket
+	mIsConnected = true;
 }
 
 // --------------------------------------------------------------------------
@@ -240,8 +242,15 @@
 // --------------------------------------------------------------------------
 void WinNamedPipeStream::Close()
 {
-	if (mSocketHandle == NULL || !mIsConnected) 
+	if (mSocketHandle == NULL && mIsConnected)
 	{
+		fprintf(stderr, "Inconsistent connected state\n");
+		::syslog(LOG_ERR, "Inconsistent connected state");
+		mIsConnected = false;
+	}
+
+	if (mSocketHandle == NULL) 
+	{
 		THROW_EXCEPTION(ServerException, BadSocketHandle)
 	}
 
@@ -262,14 +271,16 @@
 		mIsServer = false;
 	}
 
-	if (!CloseHandle(mSocketHandle))
+	bool result = CloseHandle(mSocketHandle);
+
+	mSocketHandle = NULL;
+	mIsConnected = false;
+
+	if (!result) 
 	{
 		::syslog(LOG_ERR, "CloseHandle failed: %d", GetLastError());
 		THROW_EXCEPTION(ServerException, SocketCloseError)
 	}
-	
-	mSocketHandle = NULL;
-	mIsConnected = FALSE;
 }
 
 // --------------------------------------------------------------------------

Copied: box/trunk/lib/win32/config.h.win32 (from rev 455, box/chris/win32/vc2005-compile-fixes/lib/win32/config.h.win32)

Modified: box/trunk/lib/win32/emu.cpp
===================================================================
--- box/trunk/lib/win32/emu.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/win32/emu.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -12,14 +12,20 @@
 #include <windows.h>
 #include <fcntl.h>
 // #include <atlenc.h>
-#include <unistd.h>
 
+#ifdef HAVE_UNISTD_H
+	#include <unistd.h>
+#endif
+#ifdef HAVE_PROCESS_H
+	#include <process.h>
+#endif
+
 #include <string>
 #include <list>
 
-//our implimentation for a timer
-//based on a simple thread which sleeps for a
-//period of time
+// our implementation for a timer, based on a 
+// simple thread which sleeps for a period of time
+
 static bool gFinishTimer;
 static CRITICAL_SECTION gLock;
 
@@ -28,14 +34,14 @@
 	int countDown;
 	int interval;
 }
-tTimer;
+Timer_t;
 
-std::list<tTimer> gTimerList;
+std::list<Timer_t> gTimerList;
 static void (__cdecl *gTimerFunc) (int) = NULL;
 
-int setitimer(int type , struct itimerval *timeout, int)
+int setitimer(int type, struct itimerval *timeout, void *arg)
 {
-	if ( SIGVTALRM == type || ITIMER_VIRTUAL == type )
+	if (ITIMER_VIRTUAL == type)
 	{
 		EnterCriticalSection(&gLock);
 		// we only need seconds for the mo!
@@ -46,7 +52,7 @@
 		}
 		else
 		{
-			tTimer ourTimer;
+			Timer_t ourTimer;
 			ourTimer.countDown = timeout->it_value.tv_sec;
 			ourTimer.interval  = timeout->it_interval.tv_sec;
 			gTimerList.push_back(ourTimer);
@@ -64,12 +70,12 @@
 
 	while (!gFinishTimer)
 	{
-		std::list<tTimer>::iterator it;
+		std::list<Timer_t>::iterator it;
 		EnterCriticalSection(&gLock);
 
 		for (it = gTimerList.begin(); it != gTimerList.end(); it++)
 		{
-			tTimer& rTimer(*it);
+			Timer_t& rTimer(*it);
 
 			rTimer.countDown --;
 			if (rTimer.countDown == 0)
@@ -92,13 +98,18 @@
 
 		for (it = gTimerList.begin(); it != gTimerList.end(); it++)
 		{
-			tTimer& rTimer(*it);
+			Timer_t& rTimer(*it);
 
 			if (rTimer.countDown == -1)
 			{
 				gTimerList.erase(it);
-				//if we don't do this the search is on a corrupt list
+				
+				// the iterator is now invalid, so restart search
 				it = gTimerList.begin();
+
+				// if the list is now empty, don't try to increment 
+				// the iterator again
+				if (it == gTimerList.end()) break;
 			}
 		}
 
@@ -148,7 +159,8 @@
 		TOKEN_ADJUST_PRIVILEGES, 
 		&hToken ))
 	{
-		printf( "Cannot open process token - err = %d\n", GetLastError( ) );
+		printf( "Cannot open process token: error %d\n", 
+			(int)GetLastError() );
 		return false;
 	}
 
@@ -159,7 +171,8 @@
 		SE_BACKUP_NAME, //the name of the privilege
 		&( token_priv.Privileges[0].Luid )) ) //result
 	{
-		printf( "Cannot lookup backup privilege - err = %d\n", GetLastError( ) );
+		printf( "Cannot lookup backup privilege: error %d\n", 
+			(int)GetLastError( ) );
 		return false;
 	}
 
@@ -179,7 +192,8 @@
 		//this function is a little tricky - if we were adjusting
 		//more than one privilege, it could return success but not
 		//adjust them all - in the general case, you need to trap this
-		printf( "Could not enable backup privileges - err = %d\n", GetLastError( ) );
+		printf( "Could not enable backup privileges: error %d\n", 
+			(int)GetLastError( ) );
 		return false;
 
 	}
@@ -192,115 +206,342 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    openfile
-//		Purpose: replacement for any open calls - handles unicode filenames - supplied in utf8
-//		Created: 25th October 2004
+//		Name:    ConvertToWideString
+//		Purpose: Converts a string from specified codepage to 
+//			 a wide string (WCHAR*). Returns a buffer which 
+//			 MUST be freed by the caller with delete[].
+//			 In case of fire, logs the error and returns NULL.
+//		Created: 4th February 2006
 //
 // --------------------------------------------------------------------------
-HANDLE openfile(const char *filename, int flags, int mode)
+WCHAR* ConvertToWideString(const char* pString, unsigned int codepage)
 {
-	try{
+	int len = MultiByteToWideChar
+	(
+		codepage, // source code page
+		0,        // character-type options
+		pString,  // string to map
+		-1,       // number of bytes in string - auto detect
+		NULL,     // wide-character buffer
+		0         // size of buffer - work out 
+		          //   how much space we need
+	);
 
-		wchar_t *buffer;
-		std::string fileN(filename);
+	if (len == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert string to wide string: "
+			"error %d", GetLastError());
+		errno = EINVAL;
+		return NULL;
+	}
 
-		std::string tmpStr("\\\\?\\");
-		//is the path relative or otherwise
-		if ( fileN[1] != ':' )
-		{
-			//we need to get the current directory
-			char wd[PATH_MAX];
-			if(::getcwd(wd, PATH_MAX) == 0)
-			{
-				return NULL;
-			}
-			tmpStr += wd;
-			if (tmpStr[tmpStr.length()] != '\\')
-			{
-				tmpStr += '\\';
-			}
-		}
-		tmpStr += filename;
+	WCHAR* buffer = new WCHAR[len];
 
-		int strlen = MultiByteToWideChar(
-			CP_UTF8,               // code page
-			0,                     // character-type options
-			tmpStr.c_str(),        // string to map
-			(int)tmpStr.length(),       // number of bytes in string
-			NULL,                  // wide-character buffer
-			0                      // size of buffer - work out how much space we need
-			);
+	if (buffer == NULL)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert string to wide string: "
+			"out of memory");
+		errno = ENOMEM;
+		return NULL;
+	}
 
-		buffer = new wchar_t[strlen+1];
-		if ( buffer == NULL )
-		{
-			return NULL;
-		}
+	len = MultiByteToWideChar
+	(
+		codepage, // source code page
+		0,        // character-type options
+		pString,  // string to map
+		-1,       // number of bytes in string - auto detect
+		buffer,   // wide-character buffer
+		len       // size of buffer
+	);
 
-		strlen = MultiByteToWideChar(
-			CP_UTF8,               // code page
-			0,                     // character-type options
-			tmpStr.c_str(),        // string to map
-			(int)tmpStr.length(),       // number of bytes in string
-			buffer,                // wide-character buffer
-			strlen                 // size of buffer
-			);
+	if (len == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert string to wide string: "
+			"error %i", GetLastError());
+		errno = EACCES;
+		delete [] buffer;
+		return NULL;
+	}
 
-		if ( strlen == 0 )
-		{
-			delete [] buffer;
-			return NULL;
-		}
+	return buffer;
+}
 
-		buffer[strlen] = L'\0';
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertUtf8ToWideString
+//		Purpose: Converts a string from UTF-8 to a wide string.
+//			 Returns a buffer which MUST be freed by the caller 
+//			 with delete[].
+//			 In case of fire, logs the error and returns NULL.
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+WCHAR* ConvertUtf8ToWideString(const char* pString)
+{
+	return ConvertToWideString(pString, CP_UTF8);
+}
 
-		//flags could be O_WRONLY | O_CREAT | O_RDONLY
-		DWORD createDisposition = OPEN_EXISTING;
-		DWORD shareMode = FILE_SHARE_READ;
-		DWORD accessRights = FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA;
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertFromWideString
+//		Purpose: Converts a wide string to a narrow string in the
+//			 specified code page. Returns a buffer which MUST 
+//			 be freed by the caller with delete[].
+//			 In case of fire, logs the error and returns NULL.
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+char* ConvertFromWideString(const WCHAR* pString, unsigned int codepage)
+{
+	int len = WideCharToMultiByte
+	(
+		codepage, // destination code page
+		0,        // character-type options
+		pString,  // string to map
+		-1,       // number of bytes in string - auto detect
+		NULL,     // output buffer
+		0,        // size of buffer - work out 
+		          //   how much space we need
+		NULL,     // replace unknown chars with system default
+		NULL      // don't tell us when that happened
+	);
 
-		if ( flags & O_WRONLY )
+	if (len == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert wide string to narrow: "
+			"error %d", GetLastError());
+		errno = EINVAL;
+		return NULL;
+	}
+
+	char* buffer = new char[len];
+
+	if (buffer == NULL)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert wide string to narrow: "
+			"out of memory");
+		errno = ENOMEM;
+		return NULL;
+	}
+
+	len = WideCharToMultiByte
+	(
+		codepage, // source code page
+		0,        // character-type options
+		pString,  // string to map
+		-1,       // number of bytes in string - auto detect
+		buffer,   // output buffer
+		len,      // size of buffer
+		NULL,     // replace unknown chars with system default
+		NULL      // don't tell us when that happened
+	);
+
+	if (len == 0)
+	{
+		::syslog(LOG_WARNING, 
+			"Failed to convert wide string to narrow: "
+			"error %i", GetLastError());
+		errno = EACCES;
+		delete [] buffer;
+		return NULL;
+	}
+
+	return buffer;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertUtf8ToConsole
+//		Purpose: Converts a string from UTF-8 to the console 
+//			 code page. On success, replaces contents of rDest 
+//			 and returns true. In case of fire, logs the error 
+//			 and returns false.
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+bool ConvertUtf8ToConsole(const char* pString, std::string& rDest)
+{
+	WCHAR* pWide = ConvertToWideString(pString, CP_UTF8);
+	if (pWide == NULL)
+	{
+		return false;
+	}
+
+	char* pConsole = ConvertFromWideString(pWide, GetConsoleOutputCP());
+	delete [] pWide;
+
+	if (!pConsole)
+	{
+		return false;
+	}
+
+	rDest = pConsole;
+	delete [] pConsole;
+
+	return true;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertConsoleToUtf8
+//		Purpose: Converts a string from the console code page
+//			 to UTF-8. On success, replaces contents of rDest
+//			 and returns true. In case of fire, logs the error 
+//			 and returns false.
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+bool ConvertConsoleToUtf8(const char* pString, std::string& rDest)
+{
+	WCHAR* pWide = ConvertToWideString(pString, GetConsoleCP());
+	if (pWide == NULL)
+	{
+		return false;
+	}
+
+	char* pConsole = ConvertFromWideString(pWide, CP_UTF8);
+	delete [] pWide;
+
+	if (!pConsole)
+	{
+		return false;
+	}
+
+	rDest = pConsole;
+	delete [] pConsole;
+
+	return true;
+}
+
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    ConvertPathToAbsoluteUnicode
+//		Purpose: Converts relative paths to absolute (with unicode marker)
+//		Created: 4th February 2006
+//
+// --------------------------------------------------------------------------
+std::string ConvertPathToAbsoluteUnicode(const char *pFileName)
+{
+	std::string tmpStr("\\\\?\\");
+	
+	// Is the path relative or absolute?
+	// Absolute paths on Windows are always a drive letter
+	// followed by ':'
+	
+	if (pFileName[1] != ':')
+	{
+		// Must be relative. We need to get the 
+		// current directory to make it absolute.
+		
+		char wd[PATH_MAX];
+		if (::getcwd(wd, PATH_MAX) == 0)
 		{
-			createDisposition = OPEN_EXISTING;
-			shareMode |= FILE_SHARE_READ ;//| FILE_SHARE_WRITE;
+			::syslog(LOG_WARNING, 
+				"Failed to open '%s': path too long", 
+				pFileName);
+			errno = ENAMETOOLONG;
+			tmpStr = "";
+			return tmpStr;
 		}
-		if ( flags & O_CREAT )
+		
+		tmpStr += wd;
+		if (tmpStr[tmpStr.length()] != '\\')
 		{
-			createDisposition = OPEN_ALWAYS;
-			shareMode |= FILE_SHARE_READ ;//| FILE_SHARE_WRITE;
-			accessRights |= FILE_WRITE_ATTRIBUTES | FILE_WRITE_DATA | FILE_WRITE_EA | FILE_ALL_ACCESS;
+			tmpStr += '\\';
 		}
-		if ( flags & O_TRUNC )
-		{
-			createDisposition = OPEN_ALWAYS;
-		}
+	}
+	
+	tmpStr += pFileName;
+	return tmpStr;
+}
 
-		HANDLE hdir = CreateFileW(buffer, 
-			accessRights, 
-			shareMode, 
-			NULL, 
-			createDisposition, 
-			FILE_FLAG_BACKUP_SEMANTICS,
-			NULL);
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    openfile
+//		Purpose: replacement for any open calls - handles unicode filenames - supplied in utf8
+//		Created: 25th October 2004
+//
+// --------------------------------------------------------------------------
+HANDLE openfile(const char *pFileName, int flags, int mode)
+{
+	std::string AbsPathWithUnicode = ConvertPathToAbsoluteUnicode(pFileName);
+	
+	if (AbsPathWithUnicode.size() == 0)
+	{
+		// error already logged by ConvertPathToAbsoluteUnicode()
+		return NULL;
+	}
+	
+	WCHAR* pBuffer = ConvertUtf8ToWideString(AbsPathWithUnicode.c_str());
+	// We are responsible for freeing pBuffer
+	
+	if (pBuffer == NULL)
+	{
+		// error already logged by ConvertUtf8ToWideString()
+		return NULL;
+	}
 
-		if ( hdir == INVALID_HANDLE_VALUE )
-		{
-			// DWORD err = GetLastError();
-			// syslog(EVENTLOG_WARNING_TYPE, "Couldn't open file %s, err %i\n", filename, err);
-			delete [] buffer;
-			return NULL;
-		}
+	// flags could be O_WRONLY | O_CREAT | O_RDONLY
+	DWORD createDisposition = OPEN_EXISTING;
+	DWORD shareMode = FILE_SHARE_READ;
+	DWORD accessRights = FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA;
 
-		delete [] buffer;
-		return hdir;
-
+	if (flags & O_WRONLY)
+	{
+		shareMode = FILE_SHARE_WRITE;
 	}
-	catch(...)
+	if (flags & O_RDWR)
 	{
-		printf("Caught openfile:%s\r\n", filename);
+		shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
 	}
-	return NULL;
+	if (flags & O_CREAT)
+	{
+		createDisposition = OPEN_ALWAYS;
+		shareMode |= FILE_SHARE_WRITE;
+		accessRights |= FILE_WRITE_ATTRIBUTES 
+			| FILE_WRITE_DATA | FILE_WRITE_EA 
+			| FILE_ALL_ACCESS;
+	}
+	if (flags & O_TRUNC)
+	{
+		createDisposition = CREATE_ALWAYS;
+	}
+	if (flags & O_EXCL)
+	{
+		shareMode = 0;
+	}
 
+	HANDLE hdir = CreateFileW(pBuffer, 
+		accessRights, 
+		shareMode, 
+		NULL, 
+		createDisposition, 
+		FILE_FLAG_BACKUP_SEMANTICS,
+		NULL);
+	
+	delete [] pBuffer;
+
+	if (hdir == INVALID_HANDLE_VALUE)
+	{
+		::syslog(LOG_WARNING, "Failed to open file %s: "
+			"error %i", pFileName, GetLastError());
+		return NULL;
+	}
+
+	return hdir;
 }
 
 // MinGW provides a getopt implementation
@@ -315,18 +556,18 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    ourfstat
+//		Name:    emu_fstat
 //		Purpose: replacement for fstat supply a windows handle
 //		Created: 25th October 2004
 //
 // --------------------------------------------------------------------------
-int ourfstat(HANDLE hdir, struct stat * st)
+int emu_fstat(HANDLE hdir, struct stat * st)
 {
 	ULARGE_INTEGER conv;
 
 	if (hdir == INVALID_HANDLE_VALUE)
 	{
-		::syslog(LOG_ERR, "Error: invalid file handle in ourfstat()");
+		::syslog(LOG_ERR, "Error: invalid file handle in emu_fstat()");
 		errno = EBADF;
 		return -1;
 	}
@@ -343,7 +584,7 @@
 	// This next example is how we get our INODE (equivalent) information
 	conv.HighPart = fi.nFileIndexHigh;
 	conv.LowPart = fi.nFileIndexLow;
-	st->st_ino = conv.QuadPart;
+	st->st_ino = (_ino_t)conv.QuadPart;
 
 	// get the time information
 	st->st_ctime = ConvertFileTimeToTime_t(&fi.ftCreationTime);
@@ -362,7 +603,7 @@
 
 	conv.HighPart = st_size.HighPart;
 	conv.LowPart = st_size.LowPart;
-	st->st_size = conv.QuadPart;
+	st->st_size = (_off_t)conv.QuadPart;
 
 	//the mode of the file
 	st->st_mode = 0;
@@ -400,76 +641,26 @@
 //		Created: 10th December 2004
 //
 // --------------------------------------------------------------------------
-HANDLE OpenFileByNameUtf8(const char* pName)
+HANDLE OpenFileByNameUtf8(const char* pFileName)
 {
-	//some string thing - required by ms to indicate long/unicode filename
-	std::string tmpStr("\\\\?\\");
-
-	// is the path relative or otherwise
-	std::string fileN(pName);
-	if (fileN[1] != ':')
+	std::string AbsPathWithUnicode = ConvertPathToAbsoluteUnicode(pFileName);
+	
+	if (AbsPathWithUnicode.size() == 0)
 	{
-		// we need to get the current directory
-		char wd[PATH_MAX];
-		if(::getcwd(wd, PATH_MAX) == 0)
-		{
-			::syslog(LOG_WARNING, 
-				"Failed to open '%s': path too long", pName);
-			errno = ENAMETOOLONG;
-			return NULL;
-		}
-
-		tmpStr += wd;
-		if (tmpStr[tmpStr.length()] != '\\')
-		{
-			tmpStr += '\\';
-		}
-	}
-
-	tmpStr += fileN;
-
-	int strlen = MultiByteToWideChar(
-		CP_UTF8,               // code page
-		0,                     // character-type options
-		tmpStr.c_str(),        // string to map
-		(int)tmpStr.length(),  // number of bytes in string
-		NULL,                  // wide-character buffer
-		0                      // size of buffer - work out 
-		                       //   how much space we need
-		);
-
-	wchar_t* buffer = new wchar_t[strlen+1];
-
-	if (buffer == NULL)
-	{
-		::syslog(LOG_WARNING, 
-			"Failed to open '%s': out of memory", pName);
-		errno = ENOMEM;
+		// error already logged by ConvertPathToAbsoluteUnicode()
 		return NULL;
 	}
-
-	strlen = MultiByteToWideChar(
-		CP_UTF8,               // code page
-		0,                     // character-type options
-		tmpStr.c_str(),        // string to map
-		(int)tmpStr.length(),  // number of bytes in string
-		buffer,                // wide-character buffer
-		strlen                 // size of buffer
-		);
-
-	if (strlen == 0)
+	
+	WCHAR* pBuffer = ConvertUtf8ToWideString(AbsPathWithUnicode.c_str());
+	// We are responsible for freeing pBuffer
+	
+	if (pBuffer == NULL)
 	{
-		::syslog(LOG_WARNING, 
-			"Failed to open '%s': could not convert "
-			"file name to Unicode", pName);
-		errno = EACCES;
-		delete [] buffer;
+		// error already logged by ConvertUtf8ToWideString()
 		return NULL;
 	}
 
-	buffer[strlen] = L'\0';
-
-	HANDLE handle = CreateFileW(buffer, 
+	HANDLE handle = CreateFileW(pBuffer, 
 		FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA, 
 		FILE_SHARE_READ | FILE_SHARE_DELETE | FILE_SHARE_WRITE, 
 		NULL, 
@@ -483,7 +674,7 @@
 		// open in this mode - to get the inode information
 		// at least one process must have the file open - 
 		// in this case someone else does.
-		handle = CreateFileW(buffer, 
+		handle = CreateFileW(pBuffer, 
 			0, 
 			FILE_SHARE_READ, 
 			NULL, 
@@ -492,7 +683,7 @@
 			NULL);
 	}
 
-	delete [] buffer;
+	delete [] pBuffer;
 
 	if (handle == INVALID_HANDLE_VALUE)
 	{
@@ -505,7 +696,7 @@
 		else
 		{
 			::syslog(LOG_WARNING, 
-				"Failed to open '%s': error %d", pName);
+				"Failed to open '%s': error %d", pFileName, err);
 			errno = EACCES;
 		}
 
@@ -518,13 +709,13 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    ourstat 
+//		Name:    emu_stat 
 //		Purpose: replacement for the lstat and stat functions, 
 //			works with unicode filenames supplied in utf8 format
 //		Created: 25th October 2004
 //
 // --------------------------------------------------------------------------
-int ourstat(const char * pName, struct stat * st)
+int emu_stat(const char * pName, struct stat * st)
 {
 	// at the mo
 	st->st_uid = 0;
@@ -539,7 +730,7 @@
 		return -1;
 	}
 
-	int retVal = ourfstat(handle, st);
+	int retVal = emu_fstat(handle, st);
 	if (retVal != 0)
 	{
 		// error logged, but without filename
@@ -593,14 +784,6 @@
 	return 0;
 }
 
-
-
-
-
-// MinGW provides opendir(), etc. via <dirent.h>
-// MSVC does not provide these, so emulation is needed
-
-#ifndef __MINGW32__
 // --------------------------------------------------------------------------
 //
 // Function
@@ -611,110 +794,56 @@
 // --------------------------------------------------------------------------
 DIR *opendir(const char *name)
 {
-	try
+	if (!name || !name[0])
 	{
-		DIR *dir = 0;
-		std::string dirName(name);
+		errno = EINVAL;
+		return NULL;
+	}
+	
+	std::string dirName(name);
 
-		//append a '\' win32 findfirst is sensitive to this
-		if ( dirName[dirName.size()] != '\\' || dirName[dirName.size()] != '/' )
-		{
-			dirName += '\\';
-		}
+	//append a '\' win32 findfirst is sensitive to this
+	if ( dirName[dirName.size()] != '\\' || dirName[dirName.size()] != '/' )
+	{
+		dirName += '\\';
+	}
 
-		//what is the search string? - everything
-		dirName += '*';
+	// what is the search string? - everything
+	dirName += '*';
 
-		if(name && name[0])
-		{
-			if ( ( dir = new DIR ) != 0 )
-			{
-				//mbstowcs(dir->name, dirName.c_str(),100);
-				//wcscpy((wchar_t*)dir->name, (const wchar_t*)dirName.c_str());
-				//mbstowcs(dir->name, dirName.c_str(), dirName.size()+1);
-				//wchar_t *buffer;
+	DIR *pDir = new DIR;
+	if (pDir == NULL)
+	{
+		errno = ENOMEM;
+		return NULL;
+	}
 
-				int strlen = MultiByteToWideChar(
-					CP_UTF8,               // code page
-					0,                     // character-type options
-					dirName.c_str(),       // string to map
-					(int)dirName.length(), // number of bytes in string
-					NULL,                  // wide-character buffer
-					0                      // size of buffer - work out how much space we need
-					);
+	pDir->name = ConvertUtf8ToWideString(dirName.c_str());
+	// We are responsible for freeing dir->name
+	
+	if (pDir->name == NULL)
+	{
+		delete pDir;
+		return NULL;
+	}
 
-				dir->name = new wchar_t[strlen+1];
+	pDir->fd = _wfindfirst((const wchar_t*)pDir->name, &(pDir->info));
 
-				if (dir->name == NULL)
-				{
-					delete dir;
-					dir   = 0;
-					errno = ENOMEM;
-					return NULL;
-				}
-
-				strlen = MultiByteToWideChar(
-					CP_UTF8,               // code page
-					0,                     // character-type options
-					dirName.c_str(),        // string to map
-					(int)dirName.length(),       // number of bytes in string
-					dir->name,                // wide-character buffer
-					strlen                 // size of buffer
-					);
-
-				if (strlen == 0)
-				{
-					delete dir->name;
-					delete dir;
-					dir   = 0;
-					errno = ENOMEM;
-					return NULL;
-				}
-
-				dir->name[strlen] = L'\0';
-
-				
-				dir->fd = _wfindfirst(
-					(const wchar_t*)dir->name,
-					&dir->info);
-
-				if (dir->fd != -1)
-				{
-					dir->result.d_name = 0;
-				}
-				else // go back
-				{
-					delete [] dir->name;
-					delete dir;
-					dir = 0;
-				}
-			}
-			else // backwards again
-			{
-				delete dir;
-				dir   = 0;
-				errno = ENOMEM;
-			}
-		}
-		else
-		{
-			errno = EINVAL;
-		}
-
-		return dir;
-
-	}
-	catch(...)
+	if (pDir->fd == -1)
 	{
-		printf("Caught opendir");
+		delete [] pDir->name;
+		delete pDir;
+		return NULL;
 	}
-
-	return NULL;
+		
+	pDir->result.d_name = 0;
+	return pDir;
 }
 
-//this kinda makes it not thread friendly!
-//but I don't think it needs to be.
+// this kinda makes it not thread friendly!
+// but I don't think it needs to be.
 char tempbuff[MAX_PATH];
+
 // --------------------------------------------------------------------------
 //
 // Function
@@ -794,7 +923,6 @@
 	}
 	return -1;
 }
-#endif // !__MINGW32__
 
 // --------------------------------------------------------------------------
 //
@@ -873,11 +1001,12 @@
 }
 
 HANDLE gSyslogH = 0;
+static bool sHaveWarnedEventLogFull = false;
 
 void syslog(int loglevel, const char *frmt, ...)
 {
-	DWORD errinfo;
-	char* buffer;
+	WORD errinfo;
+	char buffer[1024];
 	std::string sixfour(frmt);
 
 	switch (loglevel)
@@ -896,81 +1025,203 @@
 		break;
 	}
 
-
-	//taken from MSDN
-	try
+	// taken from MSDN
+	int sixfourpos;
+	while ( (sixfourpos = (int)sixfour.find("%ll")) != -1 )
 	{
+		// maintain portability - change the 64 bit formater...
+		std::string temp = sixfour.substr(0,sixfourpos);
+		temp += "%I64";
+		temp += sixfour.substr(sixfourpos+3, sixfour.length());
+		sixfour = temp;
+	}
 
+	// printf("parsed string is:%s\r\n", sixfour.c_str());
 
-		int sixfourpos;
-		while ( ( sixfourpos = sixfour.find("%ll")) != -1 )
+	va_list args;
+	va_start(args, frmt);
+
+	int len = vsnprintf(buffer, sizeof(buffer)-1, sixfour.c_str(), args);
+	ASSERT(len < sizeof(buffer))
+	buffer[sizeof(buffer)-1] = 0;
+
+	va_end(args);
+
+	LPCSTR strings[] = { buffer, NULL };
+
+	if (!ReportEvent(gSyslogH, // event log handle 
+		errinfo,               // event type 
+		0,                     // category zero 
+		MSG_ERR_EXIST,	       // event identifier - 
+		                       // we will call them all the same
+		NULL,                  // no user security identifier 
+		1,                     // one substitution string 
+		0,                     // no data 
+		strings,               // pointer to string array 
+		NULL))                 // pointer to data 
+
+	{
+		DWORD err = GetLastError();
+		if (err == ERROR_LOG_FILE_FULL)
 		{
-			//maintain portability - change the 64 bit formater...
-			std::string temp = sixfour.substr(0,sixfourpos);
-			temp += "%I64";
-			temp += sixfour.substr(sixfourpos+3, sixfour.length());
-			sixfour = temp;
+			if (!sHaveWarnedEventLogFull)
+			{
+				printf("Unable to send message to Event Log "
+					"(Event Log is full):\r\n");
+				sHaveWarnedEventLogFull = TRUE;
+			}
 		}
+		else
+		{
+			printf("Unable to send message to Event Log: "
+				"error %i:\r\n", (int)err);
+		}
+	}
+	else
+	{
+		sHaveWarnedEventLogFull = false;
+	}
 
-		//printf("parsed string is:%s\r\n", sixfour.c_str());
+	printf("%s\r\n", buffer);
+}
 
-		va_list args;
-		va_start(args, frmt);
+int emu_chdir(const char* pDirName)
+{
+	WCHAR* pBuffer = ConvertUtf8ToWideString(pDirName);
+	if (!pBuffer) return -1;
+	int result = SetCurrentDirectoryW(pBuffer);
+	delete [] pBuffer;
+	if (result != 0) return 0;
+	errno = EACCES;
+	return -1;
+}
 
-#ifdef __MINGW32__
-		// no _vscprintf, use a fixed size buffer
-		buffer = new char[1024];
-		int len = 1023;
-#else
-		int len = _vscprintf( sixfour.c_str(), args );
-		ASSERT(len > 0)
+char* emu_getcwd(char* pBuffer, int BufSize)
+{
+	DWORD len = GetCurrentDirectoryW(0, NULL);
+	if (len == 0)
+	{
+		errno = EINVAL;
+		return NULL;
+	}
 
-		len = len + 1;
-		char* buffer = new char[len];
-#endif
+	if (len > BufSize)
+	{
+		errno = ENAMETOOLONG;
+		return NULL;
+	}
 
-		ASSERT(buffer)
-		memset(buffer, 0, len);
+	WCHAR* pWide = new WCHAR [len];
+	if (!pWide)
+	{
+		errno = ENOMEM;
+		return NULL;
+	}
 
-		int len2 = vsnprintf(buffer, len, sixfour.c_str(), args);
-		ASSERT(len2 <= len);
+	DWORD result = GetCurrentDirectoryW(len, pWide);
+	if (result <= 0 || result >= len)
+	{
+		errno = EACCES;
+		return NULL;
+	}
 
-		va_end(args);
+	char* pUtf8 = ConvertFromWideString(pWide, CP_UTF8);
+	delete [] pWide;
+
+	if (!pUtf8)
+	{
+		return NULL;
 	}
-	catch (...)
+
+	strncpy(pBuffer, pUtf8, BufSize - 1);
+	pBuffer[BufSize - 1] = 0;
+	delete [] pUtf8;
+
+	return pBuffer;
+}
+
+int emu_mkdir(const char* pPathName)
+{
+	WCHAR* pBuffer = ConvertToWideString(pPathName, CP_UTF8);
+	if (!pBuffer)
 	{
-		printf("Caught syslog: %s", sixfour.c_str());
-		return;
+		return -1;
 	}
 
-	try
+	BOOL result = CreateDirectoryW(pBuffer, NULL);
+	delete [] pBuffer;
+
+	if (!result)
 	{
+		errno = EACCES;
+		return -1;
+	}
 
-		if (!ReportEvent(gSyslogH,    // event log handle 
-			errinfo,              // event type 
-			0,                    // category zero 
-			MSG_ERR_EXIST,	      // event identifier - 
-			                      // we will call them all the same
-			NULL,                 // no user security identifier 
-			1,                    // one substitution string 
-			0,                    // no data 
-			(LPCSTR*)&buffer,     // pointer to string array 
-			NULL))                // pointer to data 
+	return 0;
+}
 
-		{
-			DWORD err = GetLastError();
-			printf("Unable to send message to Event Log "
-				"(error %i):\r\n", err);
-		}
+int emu_unlink(const char* pFileName)
+{
+	WCHAR* pBuffer = ConvertToWideString(pFileName, CP_UTF8);
+	if (!pBuffer)
+	{
+		return -1;
+	}
 
-		printf("%s\r\n", buffer);
+	BOOL result = DeleteFileW(pBuffer);
+	delete [] pBuffer;
 
-		if (buffer) delete [] buffer;
+	if (!result)
+	{
+		errno = EACCES;
+		return -1;
 	}
-	catch (...)
+
+	return 0;
+}
+
+int console_read(char* pBuffer, size_t BufferSize)
+{
+	HANDLE hConsole = GetStdHandle(STD_INPUT_HANDLE);
+
+	if (hConsole == INVALID_HANDLE_VALUE)
 	{
-		printf("Caught syslog ReportEvent");
+		::fprintf(stderr, "Failed to get a handle on standard input: "
+			"error %d\n", GetLastError());
+		return -1;
 	}
+
+	int WideSize = BufferSize / 5;
+	WCHAR* pWideBuffer = new WCHAR [WideSize];
+
+	if (!pWideBuffer)
+	{
+		::perror("Failed to allocate wide character buffer");
+		return -1;
+	}
+
+	DWORD numCharsRead = 0;
+
+	if (!ReadConsoleW(
+			hConsole,
+			pWideBuffer,
+			WideSize - 1,
+			&numCharsRead,
+			NULL // reserved
+		)) 
+	{
+		::fprintf(stderr, "Failed to read from console: error %d\n",
+			GetLastError());
+		return -1;
+	}
+
+	pWideBuffer[numCharsRead] = 0;
+
+	char* pUtf8 = ConvertFromWideString(pWideBuffer, GetConsoleCP());
+	strncpy(pBuffer, pUtf8, BufferSize);
+	delete [] pUtf8;
+
+	return strlen(pBuffer);
 }
 
 #endif // WIN32

Modified: box/trunk/lib/win32/emu.h
===================================================================
--- box/trunk/lib/win32/emu.h	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/lib/win32/emu.h	2006-02-13 13:30:21 UTC (rev 456)
@@ -3,7 +3,6 @@
 #if ! defined EMU_INCLUDE && defined WIN32
 #define EMU_INCLUDE
 
-#define _STAT_DEFINED
 #define _INO_T_DEFINED
 
 #include <winsock2.h>
@@ -17,9 +16,6 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <time.h>
-//#include <winsock.h>
-//#include <sys/types.h>
-//#include <sys/stat.h>
 
 #include <string>
 
@@ -27,13 +23,21 @@
 	( *(_result) = *gmtime( (_clock) ), \
 	(_result) )
 
-
-//signal in unix SIGVTALRM does not exist in win32 - but looking at the 
-#define SIGVTALRM 254
-#define SIGALRM SIGVTALRM
 #define ITIMER_VIRTUAL 0
 
-int setitimer(int type , struct itimerval *timeout, int);
+#ifdef _MSC_VER
+// Microsoft decided to deprecate the standard POSIX functions. Great!
+#define open(file,flags,mode) _open(file,flags,mode)
+#define close(fd)             _close(fd)
+#define dup(fd)               _dup(fd)
+#define read(fd,buf,count)    _read(fd,buf,count)
+#define write(fd,buf,count)   _write(fd,buf,count)
+#define lseek(fd,off,whence)  _lseek(fd,off,whence)
+#define fileno(struct_file)   _fileno(struct_file)
+#endif
+
+int SetTimerHandler(void (__cdecl *func ) (int));
+int setitimer(int type, struct itimerval *timeout, void *arg);
 void InitTimer(void);
 void FiniTimer(void);
 
@@ -109,12 +113,44 @@
 	return 0;
 }
 
-inline int chmod(const char * Filename, int uid)
-{
-	//indicate sucsess
-	return 0;
-}
+int   emu_chdir (const char* pDirName);
+int   emu_unlink(const char* pFileName);
+char* emu_getcwd(char* pBuffer, int BufSize);
 
+#ifdef _MSC_VER
+	inline int emu_chmod(const char * Filename, int mode)
+	{
+		// indicate success
+		return 0;
+	}
+
+	#define chmod(file, mode)    emu_chmod(file, mode)
+	#define chdir(directory)     emu_chdir(directory)
+	#define unlink(file)         emu_unlink(file)
+	#define getcwd(buffer, size) emu_getcwd(buffer, size)
+#else
+	inline int chmod(const char * Filename, int mode)
+	{
+		// indicate success
+		return 0;
+	}
+
+	inline int chdir(const char* pDirName)
+	{
+		return emu_chdir(pDirName);
+	}
+
+	inline char* getcwd(char* pBuffer, int BufSize)
+	{
+		return emu_getcwd(pBuffer, BufSize);
+	}
+
+	inline int unlink(const char* pFileName)
+	{
+		return emu_unlink(pFileName);
+	}
+#endif
+
 //I do not perceive a need to change the user or group on a backup client
 //at any rate the owner of a service can be set in the service settings
 inline int setegid(int)
@@ -149,55 +185,56 @@
 // MinGW provides a getopt implementation
 #ifndef __MINGW32__
 
-//this will need to be implimented if we see fit that command line
-//options are going to be used! (probably then:)
-//where the calling function looks for the parsed parameter
+// this will need to be implemented if we see fit that command line
+// options are going to be used! (probably then:)
+// where the calling function looks for the parsed parameter
 extern char *optarg;
-//optind looks like an index into the string - how far we have moved along
+
+// optind looks like an index into the string - how far we have moved along
 extern int optind;
 extern char nextchar;
 
-inline int getopt(int count, char * const * args, char * tolookfor)
+inline int getopt(int count, char * const * args, const char * tolookfor)
 {
-	if ( optind >= count ) return -1;
+	if (optind >= count) return -1;
 
 	std::string str((const char *)args[optind]);
 	std::string interestin(tolookfor);
 	int opttolookfor = 0;
 	int index = -1;
-	//just initialize the string - just in case it is used.
-	//optarg[0] = 0;
+	// just initialize the string - just in case it is used.
+	// optarg[0] = 0;
 	std::string opt;
 
-	if ( count == 0 ) return -1;
+	if (count == 0) return -1;
 
 	do 
 	{
-		if ( index != -1 )
+		if (index != -1)
 		{
 			str = str.substr(index+1, str.size());
 		}
 
-		index = str.find('-');
+		index = (int)str.find('-');
 
-		if ( index == -1 ) return -1;
+		if (index == -1) return -1;
 
 		opt = str[1];
 
 		optind ++;
 		str = args[optind];
 	}
-	while ( ( opttolookfor = interestin.find(opt)) == -1 );
+	while ((opttolookfor = (int)interestin.find(opt)) == -1);
 
-	if ( interestin[opttolookfor+1] == ':' ) 
+	if (interestin[opttolookfor+1] == ':') 
 	{
 
-		//strcpy(optarg, str.c_str());
+		// strcpy(optarg, str.c_str());
 		optarg = args[optind];
 		optind ++;
 	}
 
-	//indicate we have finished
+	// indicate we have finished
 	return opt[0];
 }
 #endif // !__MINGW32__
@@ -244,49 +281,44 @@
 
 #define S_ISLNK(x) ( false )
 
-// nasty implementation to get working - TODO get the win32 equiv
-#ifdef _DEBUG
-#define getpid() 1
-#endif
-
 #define vsnprintf _vsnprintf
 
 #ifndef __MINGW32__
 typedef unsigned int mode_t;
 #endif
 
-inline int mkdir(const char *pathname, mode_t mode)
+int emu_mkdir(const char* pPathName);
+
+inline int mkdir(const char *pPathName, mode_t mode)
 {
-	return mkdir(pathname);
+	return emu_mkdir(pPathName);
 }
 
-#ifdef __MINGW32__
-	#include <dirent.h>
-#else
-	inline int strcasecmp(const char *s1, const char *s2)
-	{
-		return _stricmp(s1,s2);
-	}
+#ifndef __MINGW32__
+inline int strcasecmp(const char *s1, const char *s2)
+{
+	return _stricmp(s1,s2);
+}
+#endif
 
-	struct dirent
-	{
-		char *d_name;
-	};
+struct dirent
+{
+	char *d_name;
+};
 
-	struct DIR
-	{
-		intptr_t		fd;	// filedescriptor
-		// struct _finddata_t	info;
-		struct _wfinddata_t	info;
-		// struct _finddata_t 	info;
-		struct dirent		result;	// d_name (first time null)
-		wchar_t			*name;	// null-terminated byte string
-	};
+struct DIR
+{
+	intptr_t		fd;	// filedescriptor
+	// struct _finddata_t	info;
+	struct _wfinddata_t	info;
+	// struct _finddata_t 	info;
+	struct dirent		result;	// d_name (first time null)
+	wchar_t			*name;	// null-terminated byte string
+};
 
-	DIR *opendir(const char *name);
-	struct dirent *readdir(DIR *dp);
-	int closedir(DIR *dp);
-#endif
+DIR *opendir(const char *name);
+struct dirent *readdir(DIR *dp);
+int closedir(DIR *dp);
 
 HANDLE openfile(const char *filename, int flags, int mode);
 
@@ -358,6 +390,7 @@
 	TCHAR f_mntonname[MAX_PATH];
 };
 
+#if 0
 // I think this should get us going
 // Although there is a warning about 
 // mount points in win32 can now exists - which means inode number can be 
@@ -381,9 +414,10 @@
 #ifndef __MINGW32__
 typedef u_int64_t _ino_t;
 #endif
+#endif
 
-int ourstat(const char * name, struct stat * st);
-int ourfstat(HANDLE file, struct stat * st);
+int emu_stat(const char * name, struct stat * st);
+int emu_fstat(HANDLE file, struct stat * st);
 int statfs(const char * name, struct statfs * s);
 
 //need this for converstions
@@ -395,7 +429,8 @@
 	// Convert the last-write time to local time.
 	FileTimeToSystemTime(fileTime, &stUTC);
 	// SystemTimeToTzSpecificLocalTime(NULL, &stUTC, &stLocal);
-	
+
+	memset(&timeinfo, 0, sizeof(timeinfo));	
 	timeinfo.tm_sec = stUTC.wSecond;
 	timeinfo.tm_min = stUTC.wMinute;
 	timeinfo.tm_hour = stUTC.wHour;
@@ -405,17 +440,35 @@
 	// timeinfo.tm_yday = ...;
 	timeinfo.tm_year = stUTC.wYear - 1900;
 
-	time_t retVal = mktime(&timeinfo);
+	time_t retVal = mktime(&timeinfo) - _timezone;
 	return retVal;
 }
 
-#define stat(x,y) ourstat(x,y)
-#define fstat(x,y) ourfstat(x,y)
-#define lstat(x,y) ourstat(x,y)
+#ifdef _MSC_VER
+	#define stat(filename,  struct) emu_stat (filename, struct)
+	#define lstat(filename, struct) emu_stat (filename, struct)
+	#define fstat(handle,   struct) emu_fstat(handle,   struct)
+#else
+	inline int stat(const char* filename, struct stat* stat)
+	{
+		return emu_stat(filename, stat);
+	}
+	inline int lstat(const char* filename, struct stat* stat)
+	{
+		return emu_stat(filename, stat);
+	}
+	inline int fstat(HANDLE handle, struct stat* stat)
+	{
+		return emu_fstat(handle, stat);
+	}
+#endif
 
-int poll (struct pollfd *ufds, unsigned long nfds, int timeout);
+int poll(struct pollfd *ufds, unsigned long nfds, int timeout);
 bool EnableBackupRights( void );
 
+bool ConvertUtf8ToConsole(const char* pString, std::string& rDest);
+bool ConvertConsoleToUtf8(const char* pString, std::string& rDest);
+
 //
 // MessageId: MSG_ERR_EXIST
 // MessageText:
@@ -423,4 +476,7 @@
 //
 #define MSG_ERR_EXIST                         ((DWORD)0xC0000004L)
 
+// replacement for _cgetws which requires a relatively recent C runtime lib
+int console_read(char* pBuffer, size_t BufferSize);
+
 #endif // !EMU_INCLUDE && WIN32

Modified: box/trunk/parcels.txt
===================================================================
--- box/trunk/parcels.txt	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/parcels.txt	2006-02-13 13:30:21 UTC (rev 456)
@@ -15,6 +15,7 @@
 	script bin/bbackupd/win32/bbackupd.conf
 	script /bin/mgwz.dll
 	script /bin/mingwm10.dll
+	optional script /bin/pcreposix.dll
 END-ONLY
 
 OMIT:mingw32

Copied: box/trunk/test/win32/Makefile (from rev 455, box/chris/win32/vc2005-compile-fixes/test/win32/Makefile)

Modified: box/trunk/test/win32/testlibwin32.cpp
===================================================================
--- box/trunk/test/win32/testlibwin32.cpp	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/test/win32/testlibwin32.cpp	2006-02-13 13:30:21 UTC (rev 456)
@@ -8,8 +8,8 @@
 
 #include "../../bin/bbackupd/BackupDaemon.h"
 #include "BoxPortsAndFiles.h"
+#include "emu.h"
 
-
 int main(int argc, char* argv[])
 {
 	chdir("c:\\tmp");

Copied: box/trunk/test/win32/timezone.cpp (from rev 455, box/chris/win32/vc2005-compile-fixes/test/win32/timezone.cpp)

Modified: box/trunk/win32.bat
===================================================================
--- box/trunk/win32.bat	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/win32.bat	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,27 +1,28 @@
+@echo off
 
-pwd = /usr/src/boxbackup0.08/
+echo quick and dirty to get up and running by generating the required files 
+echo using Cygwin and Perl
 
-# quick and dirty to get up and running by generating the required files 
-# using Cygwin and Perl
+cd .\bin\bbackupquery\ & perl ./../../bin/bbackupquery/makedocumentation.pl
+cd ..\..\
 
-cd ./bin/bbackupquery/ & perl ./../../bin/bbackupquery/makedocumentation.pl
-cd ../../
-
-cd ./lib/backupclient & perl ./../../lib/common/makeexception.pl BackupStoreException.txt
+cd .\lib\backupclient & perl ./../../lib/common/makeexception.pl BackupStoreException.txt
 perl ./../../lib/server/makeprotocol.pl Client ./../../bin/bbstored/backupprotocol.txt
-cd ../../
+cd ..\..\
 
-cd ./lib/compress & perl ./../../lib/common/makeexception.pl CompressException.txt
-cd ../../
+cd .\lib\compress & perl ./../../lib/common/makeexception.pl CompressException.txt
+cd ..\..\
 
-cd ./lib/common & perl ./../../lib/common/makeexception.pl CommonException.txt & perl ./../../lib/common/makeexception.pl ConversionException.txt
+cd .\lib\common & perl ./../../lib/common/makeexception.pl CommonException.txt & perl ./../../lib/common/makeexception.pl ConversionException.txt
 
-cd ../../
+cd ..\..\
 
-cd ./lib/crypto & perl ./../../lib/common/makeexception.pl CipherException.txt
-cd ../../
+cd .\lib\crypto & perl ./../../lib/common/makeexception.pl CipherException.txt
+cd ..\..\
 
-# server parts - which appears as though some of the clients rely on
+echo server parts - which appears as though some of the clients rely on
 
-cd ./lib/server & perl ./../../lib/common/makeexception.pl ServerException.txt & perl ./../../lib/common/makeexception.pl ConnectionException.txt
-cd ../../
+cd .\lib\server & perl ./../../lib/common/makeexception.pl ServerException.txt & perl ./../../lib/common/makeexception.pl ConnectionException.txt
+cd ..\..\
+
+copy lib\win32\config.h.win32 lib\common\BoxConfig.h

Deleted: box/trunk/win32test.vcproj
===================================================================
--- box/trunk/win32test.vcproj	2006-02-12 22:56:26 UTC (rev 455)
+++ box/trunk/win32test.vcproj	2006-02-13 13:30:21 UTC (rev 456)
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="win32test"
-	ProjectGUID="{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)bin\bbackupd&quot;;&quot;$(ProjectDir)..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\zlib\lib\zdll.lib $(ProjectDir)..\openssl\lib\libeay32.lib $(ProjectDir)..\openssl\lib\ssleay32.lib $(ProjectDir)Debug\common.lib $(ProjectDir)..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
-				OutputFile="$(OutDir)/win32test.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/win32test.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableFiberSafeOptimizations="TRUE"
-				OptimizeForProcessor="1"
-				AdditionalIncludeDirectories="&quot;$(ProjectDir)bin\bbackupd&quot;;&quot;$(ProjectDir)lib\backupclient&quot;;&quot;$(ProjectDir)lib\server&quot;;&quot;$(ProjectDir)lib\crypto&quot;;&quot;$(ProjectDir)..\openssl\include&quot;;&quot;$(ProjectDir)lib\compress&quot;;&quot;$(ProjectDir)..\zlib\include&quot;;&quot;$(ProjectDir)lib\win32&quot;;&quot;$(ProjectDir)lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="FALSE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\zlib\lib\zdll.lib $(ProjectDir)..\openssl\lib\libeay32.lib $(ProjectDir)..\openssl\lib\ssleay32.lib $(ProjectDir)Release\common.lib"
-				OutputFile="$(OutDir)/win32test.exe"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath=".\lib\win32\emu.cpp">
-			</File>
-			<File
-				RelativePath=".\lib\win32\win32test.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-		</Filter>
-		<File
-			RelativePath=".\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 13:35:52 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 13 Feb 2006 13:35:52 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r457 - in box/trunk: bin/bbstored lib/server
Message-ID: <20060213133552.E26D795@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-13 13:35:51 +0000 (Mon, 13 Feb 2006)
New Revision: 457

Modified:
   box/trunk/bin/bbstored/BackupStoreDaemon.cpp
   box/trunk/bin/bbstored/BackupStoreDaemon.h
   box/trunk/lib/server/SocketStream.cpp
   box/trunk/lib/server/SocketStream.h
   box/trunk/lib/server/SocketStreamTLS.cpp
Log:
Bandwidth usage logging patch from Pascal Lalonde <plalonde@overnet.qc.ca>, with minor change to exception handling

Modified: box/trunk/bin/bbstored/BackupStoreDaemon.cpp
===================================================================
--- box/trunk/bin/bbstored/BackupStoreDaemon.cpp	2006-02-13 13:30:21 UTC (rev 456)
+++ box/trunk/bin/bbstored/BackupStoreDaemon.cpp	2006-02-13 13:35:51 UTC (rev 457)
@@ -278,7 +278,25 @@
 	BackupProtocolServer server(rStream);
 	server.SetLogToSysLog(mExtendedLogging);
 	server.SetTimeout(BACKUP_STORE_TIMEOUT);
-	server.DoServer(context);
+	try
+	{
+		server.DoServer(context);
+	}
+	catch(...)
+	{
+		LogConnectionStats(clientCommonName.c_str(), rStream);
+		throw;
+	}
+	LogConnectionStats(clientCommonName.c_str(), rStream);
 	context.CleanUp();
 }
 
+void BackupStoreDaemon::LogConnectionStats(const char *commonName,
+		const SocketStreamTLS &s)
+{
+	// Log the amount of data transferred
+	::syslog(LOG_INFO, "Connection statistics for %s: "
+			"IN=%lld OUT=%lld TOTAL=%lld\n", commonName,
+			s.GetBytesRead(), s.GetBytesWritten(),
+			s.GetBytesRead() + s.GetBytesWritten());
+}

Modified: box/trunk/bin/bbstored/BackupStoreDaemon.h
===================================================================
--- box/trunk/bin/bbstored/BackupStoreDaemon.h	2006-02-13 13:30:21 UTC (rev 456)
+++ box/trunk/bin/bbstored/BackupStoreDaemon.h	2006-02-13 13:35:51 UTC (rev 457)
@@ -61,6 +61,8 @@
 	void HousekeepingProcess();
 	bool CheckForInterProcessMsg(int AccountNum = 0, int MaximumWaitTime = 0);
 
+	void LogConnectionStats(const char *commonName, const SocketStreamTLS &s);
+
 private:
 	BackupStoreAccountDatabase *mpAccountDatabase;
 	BackupStoreAccounts *mpAccounts;

Modified: box/trunk/lib/server/SocketStream.cpp
===================================================================
--- box/trunk/lib/server/SocketStream.cpp	2006-02-13 13:30:21 UTC (rev 456)
+++ box/trunk/lib/server/SocketStream.cpp	2006-02-13 13:35:51 UTC (rev 457)
@@ -38,7 +38,9 @@
 SocketStream::SocketStream()
 	: mSocketHandle(-1),
 	  mReadClosed(false),
-	  mWriteClosed(false)
+	  mWriteClosed(false),
+	  mBytesRead(0),
+	  mBytesWritten(0)
 {
 }
 
@@ -53,7 +55,9 @@
 SocketStream::SocketStream(int socket)
 	: mSocketHandle(socket),
 	  mReadClosed(false),
-	  mWriteClosed(false)
+	  mWriteClosed(false),
+	  mBytesRead(0),
+	  mBytesWritten(0)
 {
 	if(socket < 0)
 	{
@@ -72,7 +76,9 @@
 SocketStream::SocketStream(const SocketStream &rToCopy)
 	: mSocketHandle(::dup(rToCopy.mSocketHandle)),
 	  mReadClosed(rToCopy.mReadClosed),
-	  mWriteClosed(rToCopy.mWriteClosed)
+	  mWriteClosed(rToCopy.mWriteClosed),
+	  mBytesRead(rToCopy.mBytesRead),
+	  mBytesWritten(rToCopy.mBytesWritten)
 
 {
 	if(rToCopy.mSocketHandle < 0)
@@ -114,6 +120,7 @@
 	if(mSocketHandle != -1) {THROW_EXCEPTION(ServerException, SocketAlreadyOpen)}
 
 	mSocketHandle = socket;
+	ResetCounters();
 }
 
 
@@ -154,6 +161,7 @@
 		mSocketHandle = -1;
 		THROW_EXCEPTION(ConnectionException, Conn_SocketConnectError)
 	}
+	ResetCounters();
 }
 
 // --------------------------------------------------------------------------
@@ -225,6 +233,7 @@
 		mReadClosed = true;
 	}
 	
+	mBytesRead += r;
 	return r;
 }
 
@@ -266,6 +275,8 @@
 		bytesLeft -= sent;
 		// Move buffer pointer
 		buffer += sent;
+
+		mBytesWritten += sent;
 		
 		// Need to wait until it can send again?
 		if(bytesLeft > 0)

Modified: box/trunk/lib/server/SocketStream.h
===================================================================
--- box/trunk/lib/server/SocketStream.h	2006-02-13 13:30:21 UTC (rev 456)
+++ box/trunk/lib/server/SocketStream.h	2006-02-13 13:35:51 UTC (rev 457)
@@ -56,6 +56,15 @@
 	tOSSocketHandle mSocketHandle;
 	bool mReadClosed;
 	bool mWriteClosed;
+
+protected:
+	off_t mBytesRead;
+	off_t mBytesWritten;
+
+public:
+	off_t GetBytesRead() const {return mBytesRead;}
+	off_t GetBytesWritten() const {return mBytesWritten;}
+	void ResetCounters() {mBytesRead = mBytesWritten = 0;}
 };
 
 #endif // SOCKETSTREAM__H

Modified: box/trunk/lib/server/SocketStreamTLS.cpp
===================================================================
--- box/trunk/lib/server/SocketStreamTLS.cpp	2006-02-13 13:30:21 UTC (rev 456)
+++ box/trunk/lib/server/SocketStreamTLS.cpp	2006-02-13 13:35:51 UTC (rev 457)
@@ -40,6 +40,7 @@
 SocketStreamTLS::SocketStreamTLS()
 	: mpSSL(0), mpBIO(0)
 {
+	ResetCounters();
 }
 
 // --------------------------------------------------------------------------
@@ -101,6 +102,7 @@
 {
 	SocketStream::Open(Type, Name, Port);
 	Handshake(rContext);
+	ResetCounters();
 }
 
 
@@ -295,6 +297,7 @@
 		{
 		case SSL_ERROR_NONE:
 			// No error, return number of bytes read
+			mBytesRead += r;
 			return r;
 			break;
 
@@ -358,6 +361,7 @@
 		{
 		case SSL_ERROR_NONE:
 			// No error, data sent, return success
+			mBytesWritten += r;
 			return;
 			break;
 


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 13:42:39 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 13 Feb 2006 13:42:39 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r458 - in box/trunk: infrastructure lib/common
Message-ID: <20060213134239.A16D595@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-13 13:42:38 +0000 (Mon, 13 Feb 2006)
New Revision: 458

Modified:
   box/trunk/infrastructure/makedistribution.pl
   box/trunk/lib/common/BannerText.h
Log:
Update copyright notice, add SVN revision to distributed files

Modified: box/trunk/infrastructure/makedistribution.pl
===================================================================
--- box/trunk/infrastructure/makedistribution.pl	2006-02-13 13:35:51 UTC (rev 457)
+++ box/trunk/infrastructure/makedistribution.pl	2006-02-13 13:42:38 UTC (rev 458)
@@ -47,7 +47,9 @@
 my $license_f;
 read LICENSE,$license_f,100000;
 close LICENSE;
-my @license = ('distribution '.$base_name,'',split(/\n/,$license_f));
+my $svnversion = `svnversion .`;
+chomp $svnversion;
+my @license = ('distribution '.$base_name.' (svn version: '.$svnversion.')',split(/\n/,$license_f));
 
 # copy files, make a note of all the modules included
 my %modules_included;

Modified: box/trunk/lib/common/BannerText.h
===================================================================
--- box/trunk/lib/common/BannerText.h	2006-02-13 13:35:51 UTC (rev 457)
+++ box/trunk/lib/common/BannerText.h	2006-02-13 13:42:38 UTC (rev 458)
@@ -11,7 +11,7 @@
 #define BANNERTEXT__H
 
 #define BANNER_TEXT(UtilityName) \
-	"Box " UtilityName " v" BOX_VERSION ", (c) Ben Summers 2003, 2004\n"
+	"Box " UtilityName " v" BOX_VERSION ", (c) Ben Summers and contributors 2003-2006\n"
 
 #endif // BANNERTEXT__H
 


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 13:53:40 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 13 Feb 2006 13:53:40 +0000
Subject: [Box Backup-dev] Code freeze and release candidate 3
Message-ID: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk>

I have just merged Chris' latest Win32 stuff and his fixes to  
existing functionality. If you have time, please review revision 456.

I want to get a release candidate 3 out, so no more changes, except  
to fix horribly broken stuff. If you notice something, go ahead and  
commit fixes to trunk. If there's something which is OK for now, but  
should be revisited later, commit a comment with the keyword TODO  
next to the relevant code.

Once I have a thumbs up for revision 458 from a few other developers,  
I will package up a release candidate.

Then, I would like those listed here

   http://boxbackup.hostworks.ca/index.php/Release_plan

to sign off the candidate after testing.

I think we're missing FreeBSD, NetBSD and varying Solaris from that  
list. And no specific mentions of PPC either.

After 0.10 is out, I would like 0.11 to concentrate on getting Win32  
being "perfect". (I know Charles has some advice on this.)

While that's happening, we can discuss the changes we'd like to make  
for the next one.

Thanks for all your hard work, especially Chris who seems to have  
spent a large proportion of the last few weeks of his life fighting  
Windows.

Ben




From boxbackup-dev@fluffy.co.uk  Mon Feb 13 20:10:51 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 13 Feb 2006 20:10:51 +0000 (GMT)
Subject: [Box Backup-dev] Code freeze and release candidate 3
In-Reply-To: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk>
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602132008400.14656@top.qwarx.com>

Hi Ben,

> I have just merged Chris' latest Win32 stuff and his fixes to existing 
> functionality.

Thanks!

> Then, I would like those listed here
>
>  http://boxbackup.hostworks.ca/index.php/Release_plan
>
> to sign off the candidate after testing.

I don't intend to sign off on the Win32 release yet, as it still has known 
(verified) and reported (unverified) bugs. I think we should consider this 
port to be experimental rather than "official" for now.

> Thanks for all your hard work, especially Chris who seems to have spent 
> a large proportion of the last few weeks of his life fighting Windows.

I hope these last few weeks were not the last of my life, as I would have 
a nasty surprise coming up very soon :-(

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 13 23:47:35 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 13 Feb 2006 23:47:35 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r459 - box/chris/win32/vc2005-compile-fixes/lib/win32
Message-ID: <20060213234735.92F3595@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-13 23:47:32 +0000 (Mon, 13 Feb 2006)
New Revision: 459

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
Log:
* emu.cpp
- Zero any unused fields in struct stat, to avoid spurious checksum mismatches
  that waste bandwidth and slow down backups


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-13 13:42:38 UTC (rev 458)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-13 23:47:32 UTC (rev 459)
@@ -581,6 +581,8 @@
 		return -1;
 	}
 
+	memset(st, 0, sizeof(*st));
+
 	// This next example is how we get our INODE (equivalent) information
 	conv.HighPart = fi.nFileIndexHigh;
 	conv.LowPart = fi.nFileIndexLow;


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 00:17:32 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 14 Feb 2006 00:17:32 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r459 - box/chris/win32/vc2005-compile-fixes/lib/win32
In-Reply-To: <20060213234735.92F3595@s0g0.pems.testserver.co.uk>
References: <20060213234735.92F3595@s0g0.pems.testserver.co.uk>
Message-ID: <Pine.LNX.4.62.0602140017000.14656@top.qwarx.com>

Hi Ben,

Please merge this before producing a new release candidate, it's kind of 
important :-)

Cheers, Chris.

On Mon, 13 Feb 2006 subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-13 23:47:32 +0000 (Mon, 13 Feb 2006)
> New Revision: 459
>
> Modified:
>   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
> Log:
> * emu.cpp
> - Zero any unused fields in struct stat, to avoid spurious checksum mismatches
>  that waste bandwidth and slow down backups
>
>
> Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp
> ===================================================================
> --- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-13 13:42:38 UTC (rev 458)
> +++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.cpp	2006-02-13 23:47:32 UTC (rev 459)
> @@ -581,6 +581,8 @@
> 		return -1;
> 	}
>
> +	memset(st, 0, sizeof(*st));
> +
> 	// This next example is how we get our INODE (equivalent) information
> 	conv.HighPart = fi.nFileIndexHigh;
> 	conv.LowPart = fi.nFileIndexLow;
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev
>
>
> !DSPAM:43f11af9157172884816971!
>

-- 
_ ___ __     _
  / __/ / ,__(_)_  | 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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 01:20:01 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 14 Feb 2006 01:20:01 +0000
Subject: [Box Backup-dev] COMMIT r459 -
 box/chris/win32/vc2005-compile-fixes/lib/win32
In-Reply-To: <Pine.LNX.4.62.0602140017000.14656@top.qwarx.com>
References: <20060213234735.92F3595@s0g0.pems.testserver.co.uk>
 <Pine.LNX.4.62.0602140017000.14656@top.qwarx.com>
Message-ID: <1139880002.5944.93.camel@avenin.ebourne.me.uk>

On Tue, 2006-02-14 at 00:17 +0000, Chris Wilson wrote:
> Hi Ben,
> 
> Please merge this before producing a new release candidate, it's kind of 
> important :-)

It's a simple fix - you're allowed to merge this yourself!

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 02:29:35 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 14 Feb 2006 02:29:35 +0000
Subject: [Box Backup-dev] win32 review
In-Reply-To: <3CB7BF19-7FA2-4EFC-A357-C5CFEF9D0013@fluffy.co.uk>
References: <357AC0C2-5AEB-4E04-8143-9D7A24178C2E@fluffy.co.uk>
 <Pine.LNX.4.62.0602121443180.14656@top.qwarx.com>
 <B66B94F7-1F0A-4F55-B870-6C1C13B7EA50@fluffy.co.uk>
 <1139793588.5944.65.camel@avenin.ebourne.me.uk>
 <3CB7BF19-7FA2-4EFC-A357-C5CFEF9D0013@fluffy.co.uk>
Message-ID: <1139884175.5944.96.camel@avenin.ebourne.me.uk>

On Mon, 2006-02-13 at 10:59 +0000, Ben Summers wrote:
> The release script also adds the license to files. And you can't just  
> tar up a SVN checkout because of the doubling of size. So you've got  
> to use a script at some point to make it consistent.

tar --exclude \\\.svn

But yes, I see your points. :)

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 02:37:50 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 14 Feb 2006 02:37:50 +0000
Subject: [Box Backup-dev] Code freeze and release candidate 3
In-Reply-To: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk>
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk>
Message-ID: <1139884670.5944.102.camel@avenin.ebourne.me.uk>

On Mon, 2006-02-13 at 13:53 +0000, Ben Summers wrote:
> Once I have a thumbs up for revision 458 from a few other developers,  
> I will package up a release candidate.

I've had a look at the win32 merge. To be honest I'm a bit tired and my
eyes are glazing over so I wasn't very effective, but I didn't find
anything new.

I did notice the incorrect set::const_iterator stuff is still there
though. Doesn't cause a problem on gcc at the moment, but if they put
out a new version with a fixed libstdc++ then box would no longer
compile on unix.

> Then, I would like those listed here
> 
>    http://boxbackup.hostworks.ca/index.php/Release_plan
> 
> to sign off the candidate after testing.

I've taken Solaris off my list. I don't have access to that at the
moment, and when I do again I probably won't have enough time to do
anything for this release.

Maybe Stefan can take care of that one?

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 02:45:17 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 14 Feb 2006 02:45:17 +0000
Subject: [Box Backup-dev] Extended attributes on FreeBSD 5/6
In-Reply-To: <20060213113348.GD31646@netinertia.co.uk>
References: <20060212105855.GB31646@netinertia.co.uk>
 <1139794066.5944.73.camel@avenin.ebourne.me.uk>
 <20060213113348.GD31646@netinertia.co.uk>
Message-ID: <1139885117.5944.108.camel@avenin.ebourne.me.uk>

On Mon, 2006-02-13 at 11:33 +0000, James O'Gorman wrote:
> Right, got it. Is ACL support in the pipeline, or is that way in the
> future (or a complete nono)? While it's not necessary obviously it would
> be nice if we could have it.

I have no plans to do any specific work on ACLs since they are supported
on Linux due to their xattr based implementation. I don't mind adding
new features if they come without too much effort while doing other
related work (like restructure the attributes code which is planned),
but not otherwise. Always happy to help others though.

> I had another look and as well as sys/acl.h there's a sys/extattr.h.
> 
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/ has these files.

Well the interface is definitely unique - different header, very
different function names. However, the parameters are similar so it's
possible it might not be hard to support the xattrs. Can't tell without
reading the man pages though.

First you'd need to find out if xattr support on FreeBSD gets you acl
support anyway.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 07:51:12 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Tue, 14 Feb 2006 08:51:12 +0100
Subject: [Box Backup-dev] Code freeze and release candidate 3
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk> <1139884670.5944.102.camel@avenin.ebourne.me.uk>
Message-ID: <00db01c6313b$6d16cc80$0301050a@stenorhem>

> I've taken Solaris off my list. I don't have access to that at the
> moment, and when I do again I probably won't have enough time to do
> anything for this release.
> 
> Maybe Stefan can take care of that one?

Sure, I put myself up for Solaris 9 Sparc, 10 Sparc and 10 x86 on the Wiki.
Solaris 7 I have given up, at least for the time being.

I will try to run debug and release tests during the day.

Stefan


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 09:08:28 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Tue, 14 Feb 2006 09:08:28 +0000
Subject: [Box Backup-dev] Extended attributes on FreeBSD 5/6
In-Reply-To: <1139885117.5944.108.camel@avenin.ebourne.me.uk>
References: <20060212105855.GB31646@netinertia.co.uk> <1139794066.5944.73.camel@avenin.ebourne.me.uk> <20060213113348.GD31646@netinertia.co.uk> <1139885117.5944.108.camel@avenin.ebourne.me.uk>
Message-ID: <20060214090828.GK31646@netinertia.co.uk>

On Tue, Feb 14, 2006 at 02:45:17AM +0000, Martin Ebourne wrote:
> I have no plans to do any specific work on ACLs since they are supported
> on Linux due to their xattr based implementation. I don't mind adding
> new features if they come without too much effort while doing other
> related work (like restructure the attributes code which is planned),
> but not otherwise. Always happy to help others though.

OK - just so I do understand, when you say ACLs are "supported on Linux
due to their xattr based implementation", does that mean that on Linux
if a file has an ACL, that will be backed up and restored as well? Quite
nifty if so..

> > I had another look and as well as sys/acl.h there's a sys/extattr.h.
> > 
> > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/ has these files.
> 
> Well the interface is definitely unique - different header, very
> different function names. However, the parameters are similar so it's
> possible it might not be hard to support the xattrs. Can't tell without
> reading the man pages though.

Here's the extattr manpages:
http://www.freebsd.org/cgi/man.cgi?query=extattr&apropos=0&sektion=3&manpath=FreeBSD+6.0-RELEASE&format=html
http://www.freebsd.org/cgi/man.cgi?query=extattr&apropos=0&sektion=9&manpath=FreeBSD+6.0-RELEASE&format=html

> First you'd need to find out if xattr support on FreeBSD gets you acl
> support anyway.

I think it looks like that's a no, but I'm not 100% sure on that.

This gives a bit more information:
http://www.trustedbsd.org/components.html

James

From boxbackup-dev@fluffy.co.uk  Tue Feb 14 09:19:43 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 14 Feb 2006 09:19:43 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r460 - box/trunk/lib/win32
Message-ID: <20060214091943.5223A95@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-14 09:19:40 +0000 (Tue, 14 Feb 2006)
New Revision: 460

Modified:
   box/trunk/lib/win32/emu.cpp
Log:
Zero any unused fields in struct stat, to avoid spurious checksum mismatches that waste bandwidth and slow down backups (committing on behalf of chris)

Modified: box/trunk/lib/win32/emu.cpp
===================================================================
--- box/trunk/lib/win32/emu.cpp	2006-02-13 23:47:32 UTC (rev 459)
+++ box/trunk/lib/win32/emu.cpp	2006-02-14 09:19:40 UTC (rev 460)
@@ -581,6 +581,8 @@
 		return -1;
 	}
 
+	memset(st, 0, sizeof(*st));
+
 	// This next example is how we get our INODE (equivalent) information
 	conv.HighPart = fi.nFileIndexHigh;
 	conv.LowPart = fi.nFileIndexLow;


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 11:24:09 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 14 Feb 2006 11:24:09 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r461 - box/trunk/test/bbackupd
Message-ID: <20060214112409.4479395@s0g0.pems.testserver.co.uk>

Author: stenor
Date: 2006-02-14 11:24:05 +0000 (Tue, 14 Feb 2006)
New Revision: 461

Modified:
   box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Increased "timeout" from 18 to 28 seconds needed on Solaris.


Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp	2006-02-14 09:19:40 UTC (rev 460)
+++ box/trunk/test/bbackupd/testbbackupd.cpp	2006-02-14 11:24:05 UTC (rev 461)
@@ -758,7 +758,7 @@
 
 			printf("Keep on continuously updating file, check it is uploaded eventually\n");
 
-			for(int l = 0; l < 18; ++l)
+			for(int l = 0; l < 28; ++l)
 			{
 				FILE *f = ::fopen("testfiles/TestDir1/continousupdate", "w+");
 				TEST_THAT(f != 0);


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 13:08:51 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 14 Feb 2006 13:08:51 +0000
Subject: [Box Backup-dev] Extended attributes on FreeBSD 5/6
In-Reply-To: <20060214090828.GK31646@netinertia.co.uk>
References: <20060212105855.GB31646@netinertia.co.uk>
 <1139794066.5944.73.camel@avenin.ebourne.me.uk>
 <20060213113348.GD31646@netinertia.co.uk>
 <1139885117.5944.108.camel@avenin.ebourne.me.uk>
 <20060214090828.GK31646@netinertia.co.uk>
Message-ID: <1139922531.5944.120.camel@avenin.ebourne.me.uk>

On Tue, 2006-02-14 at 09:08 +0000, James O'Gorman wrote:
> OK - just so I do understand, when you say ACLs are "supported on Linux
> due to their xattr based implementation", does that mean that on Linux
> if a file has an ACL, that will be backed up and restored as well? Quite
> nifty if so..

Yes. xattrs are just arbitrary metadata about files, stored in key=value
pairs, where key is ascii and value is anything.

Most systems with xattrs implement acls on top of them because it's a
perfect place to store the data without having yet another special kind
of metadata storage.

The good news is that FreeBSD also stores acls in xattr:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/fs-acl.html

> Here's the extattr manpages:
> http://www.freebsd.org/cgi/man.cgi?query=extattr&apropos=0&sektion=3&manpath=FreeBSD+6.0-RELEASE&format=html
> http://www.freebsd.org/cgi/man.cgi?query=extattr&apropos=0&sektion=9&manpath=FreeBSD+6.0-RELEASE&format=html

The bad news is that although the behaviour of these extattr calls is
broadly similar to the more common listattr/getattr API, they have one
major difference. Most systems use namespaces to partition xattrs, most
do it by prepending the namespace name and a dot before the xattr name.
eg system.acl or user.somekey. FreeBSD separates namespaces out from the
key name and translates them to numbers. This probably makes it
sufficiently different that it would be better to have its own
implementation rather than shoehorn it in with the current one and a
preprocessor hack.

A more troubling issue is that I cannot see a way to get a list of valid
namespaces, which is a serious issue for a backup program.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 13:15:07 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Tue, 14 Feb 2006 14:15:07 +0100
Subject: [Box Backup-dev] Solaris update
References: <02be01c62cf8$b44dd8b0$0301050a@stenorhem> <1139619817.5096.25.camel@avenin.ebourne.me.uk>
Message-ID: <01ef01c63168$ad638c60$1601060a@cs>

> In what way does the -C option behave differently? Maybe we can change
> it to work for both?

Solaris (non-GNU):

 -C directory file       Performs a chdir (see cd(1))  opera-
                             tion on directory and performs the c
                             (create) or r (replace) operation on
                             file.  Use short relative path names
                             for file.  If file is  ".",  archive
                             all files in directory. This operand
                             enables archiving files from  multi-
                             ple  directories  not  related  by a
                             close common parent.

GNU:

 -C, --directory DIR
              change to directory DIR

So... it is not really possible to find a direct use of tar that works
in both cases, I think.

However, this construct should work on all platforms:

gzip -d < trunk.tar.gz  | (cd testfiles ; tar xf -)

Does it seem ok?


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 13:38:36 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Tue, 14 Feb 2006 14:38:36 +0100
Subject: [Box Backup-dev] Code freeze and release candidate 3
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk>
Message-ID: <021401c6316b$f4eb97a0$1601060a@cs>

> I think we're missing FreeBSD, NetBSD and varying Solaris from that  list. 
> And no specific mentions of PPC either.

All tests pass for debug and release on Solaris 9 Sparc, 10 Sparc, 10 x86
except for a problem with the 40 sec time limit (timeout) for the 
bbackupdiff
test on Solaris 9 which runs on a Sun Ultra 5, a quite slow workstation.

So, I would say all is ok for Solaris.

The suggested "tar"-change would eliminate the need for GNU tar to run
the tests as well which would be a small extra bonus. :)

Stefan 


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 14:31:28 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 14 Feb 2006 14:31:28 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r462 - box/trunk/test/bbackupd
Message-ID: <20060214143128.177D595@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-14 14:31:26 +0000 (Tue, 14 Feb 2006)
New Revision: 462

Modified:
   box/trunk/test/bbackupd/testbbackupd.cpp
Log:
tar -C is not portable, so avoid using it in tests.


Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp	2006-02-14 11:24:05 UTC (rev 461)
+++ box/trunk/test/bbackupd/testbbackupd.cpp	2006-02-14 14:31:26 UTC (rev 462)
@@ -516,7 +516,7 @@
 	// unpack the files for the initial test
 	TEST_THAT(::system("rm -rf testfiles/TestDir1") == 0);
 	TEST_THAT(::system("mkdir testfiles/TestDir1") == 0);
-	TEST_THAT(::system("gzip -d < testfiles/spacetest1.tgz | tar xf - -C testfiles/TestDir1/") == 0);
+	TEST_THAT(::system("gzip -d < testfiles/spacetest1.tgz | ( cd testfiles/TestDir1 && tar xf - )") == 0);
 
 	int pid = LaunchServer("../../bin/bbackupd/bbackupd testfiles/bbackupd.conf", "testfiles/bbackupd.pid");
 	TEST_THAT(pid != -1 && pid != 0);
@@ -535,7 +535,7 @@
 		TestRemoteProcessMemLeaks("bbstoreaccounts.memleaks");
 
 		// Unpack some more files
-		TEST_THAT(::system("gzip -d < testfiles/spacetest2.tgz | tar xf - -C testfiles/TestDir1/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/spacetest2.tgz | ( cd testfiles/TestDir1 && tar xf - )") == 0);
 		// Delete a file and a directory
 		TEST_THAT(::unlink("testfiles/TestDir1/spacetest/d1/f3") == 0);
 		TEST_THAT(::system("rm -rf testfiles/TestDir1/spacetest/d3/d4") == 0);
@@ -556,7 +556,7 @@
 		TEST_THAT(!TestFileExists("testfiles/notifyran.store-full.2"));
 		
 		// unpack the initial files again
-		TEST_THAT(::system("gzip -d < testfiles/test_base.tgz | tar xf - -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test_base.tgz | ( cd testfiles && tar xf - )") == 0);
 
 		// wait for it to do it's stuff
 		wait_for_backup_operation();
@@ -656,7 +656,7 @@
 		// Add some more files
 		// Because the 'm' option is not used, these files will look very old to the daemon.
 		// Lucky it'll upload them then!
-		TEST_THAT(::system("gzip -d < testfiles/test2.tgz | tar xf - -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test2.tgz | ( cd  testfiles && tar xf - )") == 0);
 		::chmod("testfiles/TestDir1/sub23/dhsfdss/blf.h", 0415);
 		
 		// Wait and test
@@ -693,7 +693,7 @@
 
 		// Add some files and directories which are marked as excluded
 		printf("Add files and dirs for exclusion test\n");
-		TEST_THAT(::system("gzip -d < testfiles/testexclude.tgz | tar xf - -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/testexclude.tgz | ( cd testfiles && tar xf - )") == 0);
 		// Wait and test
 		wait_for_backup_operation();
 		compareReturnValue = ::system("../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query3c.log \"compare -ac\" quit");
@@ -830,7 +830,7 @@
 	
 		// Add some more files and modify others
 		// Use the m flag this time so they have a recent modification time
-		TEST_THAT(::system("gzip -d < testfiles/test3.tgz | tar xmf - -C testfiles/") == 0);
+		TEST_THAT(::system("gzip -d < testfiles/test3.tgz | ( cd testfiles && tar xmf - )") == 0);
 		
 		// Wait and test
 		wait_for_backup_operation();
@@ -1035,7 +1035,7 @@
 	BackupClientCryptoKeys_Setup("testfiles/bbackupd.keys");
 
 	// Initial files
-	TEST_THAT(::system("gzip -d < testfiles/test_base.tgz | tar xf - -C testfiles/") == 0);
+	TEST_THAT(::system("gzip -d < testfiles/test_base.tgz | ( cd testfiles && tar xf - )") == 0);
 
 	// Do the tests
 


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 14:39:56 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Tue, 14 Feb 2006 14:39:56 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
Message-ID: <20060214143955.GM31646@netinertia.co.uk>

--VbJkn9YxBvnuCH5J
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi all,

I've just run the debug and release tests from r461 - output attached.

Basic summary of failures from debug:

FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
failed at testbackupstore.cpp(1244)
FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
testbackupstore.cpp(1246)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1293)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1293)
FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1322)
FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1323)
FAILED: 6 tests failed
backupstore: FAILED: 6 tests failed

Basic summary of failures from release:

FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1322)
FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1323)
FAILED: 2 tests failed
backupstore: FAILED: 2 tests failed

James

--VbJkn9YxBvnuCH5J
Content-Type: application/x-gtar
Content-Disposition: attachment; filename="runtest-debug-r461.log.tgz"
Content-Transfer-Encoding: base64

[encoded data, 350254 characters]
8d948ODBgwcPHjx48ODBgwcPHjx48ODhP/4TxbbSZgDAJgA=

--VbJkn9YxBvnuCH5J
Content-Type: application/x-gtar
Content-Disposition: attachment; filename="runtest-release-r461.log.tgz"
Content-Transfer-Encoding: base64

[encoded data, 12045 characters]
5+Hz8Nn35/8BAjBbNwBAAQA=

--VbJkn9YxBvnuCH5J--

From boxbackup-dev@fluffy.co.uk  Tue Feb 14 14:53:03 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 14 Feb 2006 14:53:03 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <20060214143955.GM31646@netinertia.co.uk>
References: <20060214143955.GM31646@netinertia.co.uk>
Message-ID: <1139928784.3333.0.camel@avenin.ebourne.me.uk>

On Tue, 2006-02-14 at 14:39 +0000, James O'Gorman wrote:
> I've just run the debug and release tests from r461 - output attached.
> 
> backupstore: FAILED: 6 tests failed

Works here. Has it worked previously? Can you track down the rev that
broke it?

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 15:01:25 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Tue, 14 Feb 2006 15:01:25 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <1139928784.3333.0.camel@avenin.ebourne.me.uk>
References: <20060214143955.GM31646@netinertia.co.uk> <1139928784.3333.0.camel@avenin.ebourne.me.uk>
Message-ID: <20060214150124.GN31646@netinertia.co.uk>

On Tue, Feb 14, 2006 at 02:53:03PM +0000, Martin Ebourne wrote:
> Works here. Has it worked previously? Can you track down the rev that
> broke it?

I think it's been broken for a little while, I just forgot to report it
before - sorry! Only had that box back up for a little while as I've
just moved...

If I wanted to grab a much earlier release from svn to check, how do I
do this? Is it just svn -r<rev num> checkout ?

James

From boxbackup-dev@fluffy.co.uk  Tue Feb 14 15:14:25 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 14 Feb 2006 15:14:25 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <20060214150124.GN31646@netinertia.co.uk>
References: <20060214143955.GM31646@netinertia.co.uk>
 <1139928784.3333.0.camel@avenin.ebourne.me.uk>
 <20060214150124.GN31646@netinertia.co.uk>
Message-ID: <1139930065.3880.3.camel@avenin.ebourne.me.uk>

On Tue, 2006-02-14 at 15:01 +0000, James O'Gorman wrote:
> On Tue, Feb 14, 2006 at 02:53:03PM +0000, Martin Ebourne wrote:
> > Works here. Has it worked previously? Can you track down the rev that
> > broke it?
> 
> I think it's been broken for a little while, I just forgot to report it
> before - sorry! Only had that box back up for a little while as I've
> just moved...
> 
> If I wanted to grab a much earlier release from svn to check, how do I
> do this? Is it just svn -r<rev num> checkout ?

'svn co -r <num>', although you can use 'svn up -r <num>' in your
working copy instead which saves a whole lot of bandwidth.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 15:45:05 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Tue, 14 Feb 2006 15:45:05 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <1139928784.3333.0.camel@avenin.ebourne.me.uk>
References: <20060214143955.GM31646@netinertia.co.uk> <1139928784.3333.0.camel@avenin.ebourne.me.uk>
Message-ID: <20060214154505.GO31646@netinertia.co.uk>

On Tue, Feb 14, 2006 at 02:53:03PM +0000, Martin Ebourne wrote:
> On Tue, 2006-02-14 at 14:39 +0000, James O'Gorman wrote:
> > I've just run the debug and release tests from r461 - output attached.
> > 
> > backupstore: FAILED: 6 tests failed
> 
> Works here. Has it worked previously? Can you track down the rev that
> broke it?

I just 'updated' from r461 to r412 and only 4 tests failed in debug mode
then - the two en->GetName() failures appeared somewhere between these
two revs. I'll have a look through the commit logs to see if I can spot
which rev it was...

Shall I try rolling back even further to see when those other 4 errors
appeared (assuming they weren't always there...)?

James

From boxbackup-dev@fluffy.co.uk  Tue Feb 14 16:12:28 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Tue, 14 Feb 2006 08:12:28 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <Pine.LNX.4.62.0602121414480.14656@top.qwarx.com>
Message-ID: <20060214161228.47011.qmail@web36703.mail.mud.yahoo.com>

I have been testing various builds with respect to SSL and KeepAlive() for some time now, and just
ran into a new problem. I think this is a new problem, since it happens under Cygwin 0.9-mod, the
distribution I put together w/KeepAlive() in the first place. Here is the log:

Client side:

---

2/13/2006 11:38:31 PM  bbackupd: PID 1352: Terminating daemon.
2/13/2006 11:15:37 PM bbackupd: PID 1352: File statistics: total file size uploaded 700280750,
bytes already on server 152397212, encoded size 156954728.
2/13/2006 11:13:57 PM  bbackupd: PID 1352: Exception caught (7/33), reset state and waiting to
retry....
2/13/2006 11:13:57 PM  bbackupd: PID 1352: SSL err during Write: error:1409F07F:SSL
routines:SSL3_WRITE_PENDING:bad write retry.
2/13/2006 11:13:57 PM  bbackupd: PID 1352: Send Finished().
2/13/2006 10:14:48 PM  bbackupd: PID 1352: Sending stream, size uncertain.
2/13/2006 10:14:48 PM bbackupd: PID 1352: Send
StoreFile(0xf,0x40c62a48ee880,0xf2f17103a51041d9,0x62e0,""seven.hundred.meg.file.dat"")."
2/13/2006 10:12:18 PM  bbackupd: PID 1352: Receive IsAlive().
2/13/2006 10:12:18 PM  bbackupd: PID 1352: Send GetIsAlive().
2/13/2006 10:09:48 PM  bbackupd: PID 1352: Receive IsAlive().
2/13/2006 10:09:48 PM  bbackupd: PID 1352: Send GetIsAlive().
2/13/2006 10:07:18 PM  bbackupd: PID 1352: Receive IsAlive().
2/13/2006 10:07:18 PM  bbackupd: PID 1352: Send GetIsAlive().
2/13/2006 10:04:48 PM  bbackupd: PID 1352: Receive IsAlive().
2/13/2006 10:04:48 PM  bbackupd: PID 1352: Send GetIsAlive().
2/13/2006 10:02:18 PM  bbackupd: PID 1352: Receive IsAlive().
2/13/2006 10:02:18 PM  bbackupd: PID 1352: Send GetIsAlive().
2/13/2006 9:59:48 PM  bbackupd: PID 1352: Receiving stream, size 85372.
2/13/2006 9:59:48 PM  bbackupd: PID 1352: Receive Success(0x62e0).
2/13/2006 9:59:48 PM bbackupd Information None 0 SERVER\User SERVER ": bbackupd: PID 1352: Send
GetBlockIndexByName(0xf,""seven.hundred.meg.file.dat"")."

---

Any ideas on what might be causing this?

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Tue Feb 14 16:26:30 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 14 Feb 2006 16:26:30 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <20060214154505.GO31646@netinertia.co.uk>
References: <20060214143955.GM31646@netinertia.co.uk>
 <1139928784.3333.0.camel@avenin.ebourne.me.uk>
 <20060214154505.GO31646@netinertia.co.uk>
Message-ID: <1139934391.3880.5.camel@avenin.ebourne.me.uk>

On Tue, 2006-02-14 at 15:45 +0000, James O'Gorman wrote:
> On Tue, Feb 14, 2006 at 02:53:03PM +0000, Martin Ebourne wrote:
> > On Tue, 2006-02-14 at 14:39 +0000, James O'Gorman wrote:
> > > I've just run the debug and release tests from r461 - output attached.
> > > 
> > > backupstore: FAILED: 6 tests failed
> > 
> > Works here. Has it worked previously? Can you track down the rev that
> > broke it?
> 
> I just 'updated' from r461 to r412 and only 4 tests failed in debug mode
> then - the two en->GetName() failures appeared somewhere between these
> two revs. I'll have a look through the commit logs to see if I can spot
> which rev it was...
> 
> Shall I try rolling back even further to see when those other 4 errors
> appeared (assuming they weren't always there...)?

If those errors are still in HEAD, yes. Don't try tracking down anything
already fixed. :)

Cheers,

Martin.



From boxbackup-dev@fluffy.co.uk  Tue Feb 14 19:44:49 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Tue, 14 Feb 2006 19:44:49 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <1139934391.3880.5.camel@avenin.ebourne.me.uk>
References: <20060214143955.GM31646@netinertia.co.uk> <1139928784.3333.0.camel@avenin.ebourne.me.uk> <20060214154505.GO31646@netinertia.co.uk> <1139934391.3880.5.camel@avenin.ebourne.me.uk>
Message-ID: <20060214194449.GP31646@netinertia.co.uk>

On Tue, Feb 14, 2006 at 04:26:30PM +0000, Martin Ebourne wrote:
> On Tue, 2006-02-14 at 15:45 +0000, James O'Gorman wrote:
> > On Tue, Feb 14, 2006 at 02:53:03PM +0000, Martin Ebourne wrote:
> > > On Tue, 2006-02-14 at 14:39 +0000, James O'Gorman wrote:
> > > > I've just run the debug and release tests from r461 - output attached.
> > > > 
> > > > backupstore: FAILED: 6 tests failed
> > > 
> > > Works here. Has it worked previously? Can you track down the rev that
> > > broke it?
> > 
> > I just 'updated' from r461 to r412 and only 4 tests failed in debug mode
> > then - the two en->GetName() failures appeared somewhere between these
> > two revs. I'll have a look through the commit logs to see if I can spot
> > which rev it was...
> > 
> > Shall I try rolling back even further to see when those other 4 errors
> > appeared (assuming they weren't always there...)?
> 
> If those errors are still in HEAD, yes. Don't try tracking down anything
> already fixed. :)

r363 introduced these errors (still present in HEAD):

FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
failed at testbackupstore.cpp(1244)
FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
testbackupstore.cpp(1246)
FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1322)
FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1323)

I think r414 introduced these errors (also still in HEAD):

FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1293)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1293)

Hope that helps!

James

From boxbackup-dev@fluffy.co.uk  Tue Feb 14 19:54:16 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 14 Feb 2006 19:54:16 +0000
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060214161228.47011.qmail@web36703.mail.mud.yahoo.com>
References: <20060214161228.47011.qmail@web36703.mail.mud.yahoo.com>
Message-ID: <88E6CCDE-594C-408F-8A4D-7326F8A7A995@fluffy.co.uk>

Does this still happen with the latest Win32 releases? Or just in  
your original code?

Has anyone actually tested the keep-alive stuff on UNIX platforms?

Ben


On 14 Feb 2006, at 16:12, Gary wrote:

> I have been testing various builds with respect to SSL and KeepAlive 
> () for some time now, and just
> ran into a new problem. I think this is a new problem, since it  
> happens under Cygwin 0.9-mod, the
> distribution I put together w/KeepAlive() in the first place. Here  
> is the log:
>
> Client side:
>
> ---
>
> 2/13/2006 11:38:31 PM  bbackupd: PID 1352: Terminating daemon.
> 2/13/2006 11:15:37 PM bbackupd: PID 1352: File statistics: total  
> file size uploaded 700280750,
> bytes already on server 152397212, encoded size 156954728.
> 2/13/2006 11:13:57 PM  bbackupd: PID 1352: Exception caught (7/33),  
> reset state and waiting to
> retry....
> 2/13/2006 11:13:57 PM  bbackupd: PID 1352: SSL err during Write:  
> error:1409F07F:SSL
> routines:SSL3_WRITE_PENDING:bad write retry.
> 2/13/2006 11:13:57 PM  bbackupd: PID 1352: Send Finished().
> 2/13/2006 10:14:48 PM  bbackupd: PID 1352: Sending stream, size  
> uncertain.
> 2/13/2006 10:14:48 PM bbackupd: PID 1352: Send
> StoreFile(0xf, 
> 0x40c62a48ee880,0xf2f17103a51041d9,0x62e0,""seven.hundred.meg.file.dat 
> "")."
> 2/13/2006 10:12:18 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:12:18 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 10:09:48 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:09:48 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 10:07:18 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:07:18 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 10:04:48 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:04:48 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 10:02:18 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:02:18 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 9:59:48 PM  bbackupd: PID 1352: Receiving stream, size  
> 85372.
> 2/13/2006 9:59:48 PM  bbackupd: PID 1352: Receive Success(0x62e0).
> 2/13/2006 9:59:48 PM bbackupd Information None 0 SERVER\User SERVER  
> ": bbackupd: PID 1352: Send
> GetBlockIndexByName(0xf,""seven.hundred.meg.file.dat"")."
>
> ---
>
> Any ideas on what might be causing this?
>
> Gary
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 20:59:33 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 14 Feb 2006 20:59:33 +0000 (GMT)
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <20060214194449.GP31646@netinertia.co.uk>
References: <20060214143955.GM31646@netinertia.co.uk>
 <1139928784.3333.0.camel@avenin.ebourne.me.uk> <20060214154505.GO31646@netinertia.co.uk>
 <1139934391.3880.5.camel@avenin.ebourne.me.uk> <20060214194449.GP31646@netinertia.co.uk>
Message-ID: <Pine.LNX.4.62.0602142058400.14656@top.qwarx.com>

Hi James,

> r363 introduced these errors (still present in HEAD):
>
> FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
> failed at testbackupstore.cpp(1244)
> FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
> testbackupstore.cpp(1246)
> FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1322)
> FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1323)

Please could you double-check that they are NOT in r362? I can't see 
anything about the changes between r362 and r363 that could cause these 
errors.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 14 21:41:10 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Tue, 14 Feb 2006 13:41:10 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <88E6CCDE-594C-408F-8A4D-7326F8A7A995@fluffy.co.uk>
Message-ID: <20060214214110.31710.qmail@web36704.mail.mud.yahoo.com>

Ben,

> Does this still happen with the latest Win32 releases? Or just in  
> your original code?

I cannot say, since there is no Win32 version yet with KeepAlive(), yet (except for old Nick's
release tree for 0.9).

> Has anyone actually tested the keep-alive stuff on UNIX platforms?

I believe it will be the same thing. Well, according to the log:

1. KeepAlive()s do happen.
2. The error comes up after sending stream (NOT after diffing), and happens upon Finished().

Not sure what might be going on there, why would diffing work, uploading work, and then Finished()
fail? Makes no sense, there is constant network activity.

That is, unless sending a network-based KeepAlive() command does not "bump" some part of the
client/server procotol or SLL layers. Perhaps KeepAlive() should actually transmit some data over
the SLL link?

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Tue Feb 14 21:42:38 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Tue, 14 Feb 2006 13:42:38 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <88E6CCDE-594C-408F-8A4D-7326F8A7A995@fluffy.co.uk>
Message-ID: <20060214214238.7817.qmail@web36709.mail.mud.yahoo.com>

> Has anyone actually tested the keep-alive stuff on UNIX platforms?

At any rate, it looks like we need a long, detailed, hard look at client/server procotol layer,
SSL layer, and network layer timeout possibilities in the current code...

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 00:11:06 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed, 15 Feb 2006 00:11:06 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r463 - box/chris/win32/releases
Message-ID: <20060215001106.9658195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-15 00:06:22 +0000 (Wed, 15 Feb 2006)
New Revision: 463

Added:
   box/chris/win32/releases/boxbackup-0.09_plus2_r462-backup-client-mingw32.zip
Log:
* boxbackup-0.09_plus2_r462-backup-client-mingw32.zip
- Added a new build (NOT a release candidate) with SSL keepalive fix and
  spurious directory change detection fix


Added: box/chris/win32/releases/boxbackup-0.09_plus2_r462-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus2_r462-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Wed Feb 15 00:13:24 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Wed, 15 Feb 2006 00:13:24 +0000 (GMT)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060214214110.31710.qmail@web36704.mail.mud.yahoo.com>
References: <20060214214110.31710.qmail@web36704.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602150011470.14656@top.qwarx.com>

Hi Gary,

> I cannot say, since there is no Win32 version yet with KeepAlive(), yet 
> (except for old Nick's release tree for 0.9).

Please try the new build at:

[http://bbdev.fluffy.co.uk/svn/box/chris/win32/releases/boxbackup-0.09_plus2_r462-backup-client-mingw32.zip]

> That is, unless sending a network-based KeepAlive() command does not 
> "bump" some part of the client/server procotol or SLL layers. Perhaps 
> KeepAlive() should actually transmit some data over the SLL link?

I though the whole purpose of these keepalives was to "bump" the link? 
Anyway, they should do so, since they require sending and receiving data 
packets (Box protocol) through the tunneled stream.

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 |


From boxbackup-dev@fluffy.co.uk  Wed Feb 15 00:29:15 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 14 Feb 2006 16:29:15 -0800
Subject: [Box Backup-dev] Code freeze and release candidate 3
In-Reply-To: <021401c6316b$f4eb97a0$1601060a@cs>
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk> <021401c6316b$f4eb97a0$1601060a@cs>
Message-ID: <43F275DB.5030607@reedtz.com>

Just FYI, I'm re-doing my test environments (All hail VMware), so my
tests (FC2 and FC3) won't be done until Wednesday or Thursday.

I will also add the latest build of FC5-test (currently 2, I believe),
for those interested.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Wed Feb 15 00:46:55 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Tue, 14 Feb 2006 16:46:55 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <Pine.LNX.4.62.0602150011470.14656@top.qwarx.com>
Message-ID: <20060215004655.5865.qmail@web36714.mail.mud.yahoo.com>

Chris,

> I though the whole purpose of these keepalives was to "bump" the link? 
> Anyway, they should do so, since they require sending and receiving data 
> packets (Box protocol) through the tunneled stream.

My thoughts exactly. Yet, it happens, from time to time. Perhaps a KeepAlive() should send some
data over the link? Or the problem is due to some other kind of network problem?

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 01:35:06 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Wed, 15 Feb 2006 01:35:06 +0000 (GMT)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060214161228.47011.qmail@web36703.mail.mud.yahoo.com>
References: <20060214161228.47011.qmail@web36703.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602150133350.14656@top.qwarx.com>

Hi Gary,

How did you create your test file? Is it very compressible?

It took about an hour to upload. Perhaps during the upload itself (after 
the diffing has finished) no data was sent for a long time, because Box 
was busy compressing it, and the link timed out?

Cheers, Chris.

On Tue, 14 Feb 2006, Gary wrote:

> I have been testing various builds with respect to SSL and KeepAlive() for some time now, and just
> ran into a new problem. I think this is a new problem, since it happens under Cygwin 0.9-mod, the
> distribution I put together w/KeepAlive() in the first place. Here is the log:
>
> Client side:
>
> ---
>
> 2/13/2006 11:38:31 PM  bbackupd: PID 1352: Terminating daemon.
> 2/13/2006 11:15:37 PM bbackupd: PID 1352: File statistics: total file size uploaded 700280750,
> bytes already on server 152397212, encoded size 156954728.
> 2/13/2006 11:13:57 PM  bbackupd: PID 1352: Exception caught (7/33), reset state and waiting to
> retry....
> 2/13/2006 11:13:57 PM  bbackupd: PID 1352: SSL err during Write: error:1409F07F:SSL
> routines:SSL3_WRITE_PENDING:bad write retry.
> 2/13/2006 11:13:57 PM  bbackupd: PID 1352: Send Finished().
> 2/13/2006 10:14:48 PM  bbackupd: PID 1352: Sending stream, size uncertain.
> 2/13/2006 10:14:48 PM bbackupd: PID 1352: Send
> StoreFile(0xf,0x40c62a48ee880,0xf2f17103a51041d9,0x62e0,""seven.hundred.meg.file.dat"")."
> 2/13/2006 10:12:18 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:12:18 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 10:09:48 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:09:48 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 10:07:18 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:07:18 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 10:04:48 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:04:48 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 10:02:18 PM  bbackupd: PID 1352: Receive IsAlive().
> 2/13/2006 10:02:18 PM  bbackupd: PID 1352: Send GetIsAlive().
> 2/13/2006 9:59:48 PM  bbackupd: PID 1352: Receiving stream, size 85372.
> 2/13/2006 9:59:48 PM  bbackupd: PID 1352: Receive Success(0x62e0).
> 2/13/2006 9:59:48 PM bbackupd Information None 0 SERVER\User SERVER ": bbackupd: PID 1352: Send
> GetBlockIndexByName(0xf,""seven.hundred.meg.file.dat"")."
>
> ---
>
> Any ideas on what might be causing this?
>
> Gary
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev
>
>
> !DSPAM:43f201a3261846290497112!
>

-- 
_ ___ __     _
  / __/ / ,__(_)_  | 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 |


From boxbackup-dev@fluffy.co.uk  Wed Feb 15 03:47:48 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Tue, 14 Feb 2006 19:47:48 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <Pine.LNX.4.62.0602150011470.14656@top.qwarx.com>
Message-ID: <20060215034748.43588.qmail@web36701.mail.mud.yahoo.com>

[http://bbdev.fluffy.co.uk/svn/box/chris/win32/releases/boxbackup-0.09_plus2_r462-backup-client-mingw32.zip]

Exception caught (Connection Protocol_HandshakeFailed 7/48), reset state and waiting to retry....

Tried various combinations, etc. but always the same error. Does this version require some kind of
server side upgrade? I am still running on 0.9.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 08:49:41 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 08:49:41 +0000
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060215034748.43588.qmail@web36701.mail.mud.yahoo.com>
References: <20060215034748.43588.qmail@web36701.mail.mud.yahoo.com>
Message-ID: <D0446B96-459E-4B15-A5EF-6456AB8631BD@fluffy.co.uk>

On 15 Feb 2006, at 03:47, Gary wrote:

> [http://bbdev.fluffy.co.uk/svn/box/chris/win32/releases/ 
> boxbackup-0.09_plus2_r462-backup-client-mingw32.zip]
>
> Exception caught (Connection Protocol_HandshakeFailed 7/48), reset  
> state and waiting to retry....
>
> Tried various combinations, etc. but always the same error. Does  
> this version require some kind of
> server side upgrade? I am still running on 0.9.

You need an upgraded server.

Ben





From boxbackup-dev@fluffy.co.uk  Wed Feb 15 09:15:41 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 09:15:41 +0000
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060214214110.31710.qmail@web36704.mail.mud.yahoo.com>
References: <20060214214110.31710.qmail@web36704.mail.mud.yahoo.com>
Message-ID: <21F89016-B116-4A52-9C8E-E762A5A80526@fluffy.co.uk>

On 14 Feb 2006, at 21:41, Gary wrote:

> Ben,
>
>> Does this still happen with the latest Win32 releases? Or just in
>> your original code?
>
> I cannot say, since there is no Win32 version yet with KeepAlive(),  
> yet (except for old Nick's
> release tree for 0.9).

What about the versions which Chris keeps on posting?

>
>> Has anyone actually tested the keep-alive stuff on UNIX platforms?
>
> I believe it will be the same thing. Well, according to the log:
>
> 1. KeepAlive()s do happen.
> 2. The error comes up after sending stream (NOT after diffing), and  
> happens upon Finished().
>
> Not sure what might be going on there, why would diffing work,  
> uploading work, and then Finished()
> fail? Makes no sense, there is constant network activity.

How do you know that this is the case? Have you checked the logs on  
the server?

You might see this error if the server ran out of space in the  
account, but you can only tell if you look at the logs on the server  
as well.

(Yes, error reporting from bbackupd and bbstored is not wonderful.)

>
> That is, unless sending a network-based KeepAlive() command does  
> not "bump" some part of the
> client/server procotol or SLL layers. Perhaps KeepAlive() should  
> actually transmit some data over
> the SLL link?

It does transmit data! There is no timeout in the Box Backup code,  
only in the underlying OS socket. Sending a few bytes is more than  
enough to convince the remote side that it's still being used.



On 14 Feb 2006, at 21:42, Gary wrote:
>> Has anyone actually tested the keep-alive stuff on UNIX platforms?
>
> At any rate, it looks like we need a long, detailed, hard look at  
> client/server procotol layer,
> SSL layer, and network layer timeout possibilities in the current  
> code...

The basic Protocol code has not changed.

Ben




From boxbackup-dev@fluffy.co.uk  Wed Feb 15 09:17:26 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 09:17:26 +0000
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <Pine.LNX.4.62.0602150133350.14656@top.qwarx.com>
References: <20060214161228.47011.qmail@web36703.mail.mud.yahoo.com> <Pine.LNX.4.62.0602150133350.14656@top.qwarx.com>
Message-ID: <7ED7AA87-11C2-4744-A9EC-B3540DBF45CD@fluffy.co.uk>

On 15 Feb 2006, at 01:35, Chris Wilson wrote:

> Hi Gary,
>
> How did you create your test file? Is it very compressible?
>
> It took about an hour to upload. Perhaps during the upload itself  
> (after the diffing has finished) no data was sent for a long time,  
> because Box was busy compressing it, and the link timed out?

The data in each block is only compressed and encrypted just before  
it's required for sending to the server. Block sizes are small enough  
for this not to be a worry.

Ben






From boxbackup-dev@fluffy.co.uk  Wed Feb 15 10:36:12 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Wed, 15 Feb 2006 10:36:12 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <Pine.LNX.4.62.0602142058400.14656@top.qwarx.com>
References: <20060214143955.GM31646@netinertia.co.uk> <1139928784.3333.0.camel@avenin.ebourne.me.uk> <20060214154505.GO31646@netinertia.co.uk> <1139934391.3880.5.camel@avenin.ebourne.me.uk> <20060214194449.GP31646@netinertia.co.uk> <Pine.LNX.4.62.0602142058400.14656@top.qwarx.com>
Message-ID: <20060215103612.GQ31646@netinertia.co.uk>

Hi Chris,

On Tue, Feb 14, 2006 at 08:59:33PM +0000, Chris Wilson wrote:
> Hi James,
> 
> >r363 introduced these errors (still present in HEAD):
> >
> >FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
> >failed at testbackupstore.cpp(1244)
> >FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
> >testbackupstore.cpp(1246)
> >FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1322)
> >FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1323)
> 
> Please could you double-check that they are NOT in r362? I can't see 
> anything about the changes between r362 and r363 that could cause these 
> errors.

I'm very confused now. I just tested r361, 362 and 363 by rm -rf the
whole trunk directory and svn up each revision and running ./runtest.pl
backupstore debug.

For r361 I only got the foundCurrent and foundOld errors.
For r362 I only got the dir.GetAttributes* errors.
For r363 I got all 6 errors (including the en->GetName() errors).

Maybe this is a general problem with the way FreeBSD is handling things?
I'm not quite sure how to debug this further.

James

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:28:56 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Wed, 15 Feb 2006 10:28:56 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <Pine.LNX.4.62.0602150133350.14656@top.qwarx.com>
Message-ID: <20060215182856.61453.qmail@web36705.mail.mud.yahoo.com>

Chris,

> How did you create your test file? Is it very compressible?

The test file is a real-world Outlook personal folder file (*.pst) with changes all over the
place. It is set to compressible encryption, but I suspect it is not really compressible.

> It took about an hour to upload. Perhaps during the upload itself (after 
> the diffing has finished) no data was sent for a long time, because Box 
> was busy compressing it, and the link timed out?

As far as I can tell, the upload link was not interrupted during that time (meaning: a network
problem). I am not sure what you mean about compressing, I thought Box server was handling and
compressing content on blobk-by-block basis, it should not take more than 300 seconds to process
one block on the server side (if this is, indeed, an SLL timeout).

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:30:15 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Wed, 15 Feb 2006 10:30:15 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <D0446B96-459E-4B15-A5EF-6456AB8631BD@fluffy.co.uk>
Message-ID: <20060215183015.36346.qmail@web36712.mail.mud.yahoo.com>

> > [http://bbdev.fluffy.co.uk/svn/box/chris/win32/releases/ 
> > boxbackup-0.09_plus2_r462-backup-client-mingw32.zip]

> > Exception caught (Connection Protocol_HandshakeFailed 7/48), reset  
> > state and waiting to retry....

> You need an upgraded server.

I ran all previoud boxbackup-0.09_plus2_r* builds with 0.9, and it worked fine (with the exception
of large files). Chris, can you confirm this? I would rather not mess with my production server,
if I can help it.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:35:43 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Wed, 15 Feb 2006 10:35:43 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <21F89016-B116-4A52-9C8E-E762A5A80526@fluffy.co.uk>
Message-ID: <20060215183543.19946.qmail@web36703.mail.mud.yahoo.com>

> > I cannot say, since there is no Win32 version yet with KeepAlive(),  
> > yet (except for old Nick's
> > release tree for 0.9).
> 
> What about the versions which Chris keeps on posting?

Those, apparently, did not include the KeepAlive(). The implementation for the command was there,
but it was not being called (?).

> >> Has anyone actually tested the keep-alive stuff on UNIX platforms?

I actually tested my old 0.9 code very extensively under Cygwin (client) and RedHat 9.0
(client/server). Both worked well.

> How do you know that this is the case? Have you checked the logs on  
> the server?

The server does not report any network-related problems or timeouts.

> You might see this error if the server ran out of space in the  
> account, but you can only tell if you look at the logs on the server  
> as well.

No, still plenty of space under the account. My soft limit is about twice as large as my maximum
backup size, thus Box should start deleting content in case it runs out of space (hitting soft
limit) without waiting for housekeeping.

> It does transmit data! There is no timeout in the Box Backup code,  
> only in the underlying OS socket. Sending a few bytes is more than  
> enough to convince the remote side that it's still being used.

Ok, so KeepAlive() should have done its job, and the problem occurs with my original 0.9 code as
well (confirmed KeepAlive() getting called). So, it follows, this is either some kind of a freak
network problem/error unrelated to KeepAlive(), or something entirely new, that KeepAlive() does
not solve.

> The basic Protocol code has not changed.

Yeah, but we've been having large file diff/upload problems for a year now, we should really solve
this once and for all :).

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:38:11 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 18:38:11 +0000
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060215182856.61453.qmail@web36705.mail.mud.yahoo.com>
References: <20060215182856.61453.qmail@web36705.mail.mud.yahoo.com>
Message-ID: <91B6F41B-FEDD-4582-9849-3AD40F4BA4F8@fluffy.co.uk>

On 15 Feb 2006, at 18:28, Gary wrote:

> Chris,
>
>> How did you create your test file? Is it very compressible?
>
> The test file is a real-world Outlook personal folder file (*.pst)  
> with changes all over the
> place. It is set to compressible encryption, but I suspect it is  
> not really compressible.
>
>> It took about an hour to upload. Perhaps during the upload itself  
>> (after
>> the diffing has finished) no data was sent for a long time,  
>> because Box
>> was busy compressing it, and the link timed out?
>
> As far as I can tell, the upload link was not interrupted during  
> that time (meaning: a network
> problem). I am not sure what you mean about compressing, I thought  
> Box server

Compression is on the client side.

> was handling and
> compressing content on blobk-by-block basis, it should not take  
> more than 300 seconds to process
> one block on the server side (if this is, indeed, an SLL timeout).

We haven't seen the logs from the server, so have no idea what is  
going on. You need to give us the server logs!



On 15 Feb 2006, at 18:30, Gary wrote:
>>> [http://bbdev.fluffy.co.uk/svn/box/chris/win32/releases/
>>> boxbackup-0.09_plus2_r462-backup-client-mingw32.zip]
>
>>> Exception caught (Connection Protocol_HandshakeFailed 7/48), reset
>>> state and waiting to retry....
>
>> You need an upgraded server.
>
> I ran all previoud boxbackup-0.09_plus2_r* builds with 0.9, and it  
> worked fine (with the exception
> of large files). Chris, can you confirm this? I would rather not  
> mess with my production server,
> if I can help it.

The version identifier is changed in the code in SVN, so it  
definitely won't work. This is deliberate, because the server needs  
to support extra commands, which will only be used if diffing takes a  
long time. So a weird one if anyone gets caught by it.

Ben





From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:40:09 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Wed, 15 Feb 2006 10:40:09 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <7ED7AA87-11C2-4744-A9EC-B3540DBF45CD@fluffy.co.uk>
Message-ID: <20060215184009.12063.qmail@web36711.mail.mud.yahoo.com>

> The data in each block is only compressed and encrypted just before  
> it's required for sending to the server. Block sizes are small enough  
> for this not to be a worry.

Yeah, that was my understanding as well. So, with server-side block compress+encrypt guaranteed
under 300 seconds (approx. default SSL timeout), and client-side KeepAlive() transmitting data
between client and the server over SLL during diff,

>>what else is there that could have probably failed?<<

Let's assume for the moment that a network timeout event has occured during upload (after a
successful diff). Shouldn't Box fail the whole upload in that case, and never report "Send
Finished()"? (as it did in my log file?).

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:41:32 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 18:41:32 +0000
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060215183543.19946.qmail@web36703.mail.mud.yahoo.com>
References: <20060215183543.19946.qmail@web36703.mail.mud.yahoo.com>
Message-ID: <A3119DF0-791E-4CA9-A217-443052C1E839@fluffy.co.uk>

On 15 Feb 2006, at 18:35, Gary wrote:

>>> I cannot say, since there is no Win32 version yet with KeepAlive(),
>>> yet (except for old Nick's
>>> release tree for 0.9).
>>
>> What about the versions which Chris keeps on posting?
>
> Those, apparently, did not include the KeepAlive(). The  
> implementation for the command was there,
> but it was not being called (?).

I think his latest one does, but let's see what he says.


>
>>>> Has anyone actually tested the keep-alive stuff on UNIX platforms?
>
> I actually tested my old 0.9 code very extensively under Cygwin  
> (client) and RedHat 9.0
> (client/server). Both worked well.
>
>> How do you know that this is the case? Have you checked the logs on
>> the server?
>
> The server does not report any network-related problems or timeouts.

Can I see the logs so I can tell what's going on there?  
ExtendedLogging preferred.


>
>> You might see this error if the server ran out of space in the
>> account, but you can only tell if you look at the logs on the server
>> as well.
>
> No, still plenty of space under the account. My soft limit is about  
> twice as large as my maximum
> backup size, thus Box should start deleting content in case it runs  
> out of space (hitting soft
> limit) without waiting for housekeeping.

Good to eliminate the "obvious".


>
>> It does transmit data! There is no timeout in the Box Backup code,
>> only in the underlying OS socket. Sending a few bytes is more than
>> enough to convince the remote side that it's still being used.
>
> Ok, so KeepAlive() should have done its job, and the problem occurs  
> with my original 0.9 code as
> well (confirmed KeepAlive() getting called). So, it follows, this  
> is either some kind of a freak
> network problem/error unrelated to KeepAlive(), or something  
> entirely new, that KeepAlive() does
> not solve.

So you can repeat this with the latest server and latest client?

I must confess to being a little confused now.


>> The basic Protocol code has not changed.
>
> Yeah, but we've been having large file diff/upload problems for a  
> year now, we should really solve
> this once and for all :).

Yes.

Ben




From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:43:16 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Wed, 15 Feb 2006 10:43:16 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <91B6F41B-FEDD-4582-9849-3AD40F4BA4F8@fluffy.co.uk>
Message-ID: <20060215184316.92291.qmail@web36708.mail.mud.yahoo.com>

> We haven't seen the logs from the server, so have no idea what is  
> going on. You need to give us the server logs!

I do not have a copy of the thing anymore, but I checked it, and it did not have anything there
except for the same SSL timeout message, as usual.

> The version identifier is changed in the code in SVN, so it  
> definitely won't work. This is deliberate, because the server needs  
> to support extra commands, which will only be used if diffing takes a  
> long time. So a weird one if anyone gets caught by it.

Ok. Which is the source tree goes with the client released by Chris?

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:46:08 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 18:46:08 +0000
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060215184316.92291.qmail@web36708.mail.mud.yahoo.com>
References: <20060215184316.92291.qmail@web36708.mail.mud.yahoo.com>
Message-ID: <929671AF-6E49-4ED8-AFA0-F9C2348310F3@fluffy.co.uk>

On 15 Feb 2006, at 18:43, Gary wrote:

>> We haven't seen the logs from the server, so have no idea what is
>> going on. You need to give us the server logs!
>
> I do not have a copy of the thing anymore, but I checked it, and it  
> did not have anything there
> except for the same SSL timeout message, as usual.

So the server did report an error. Entirely possible it was a network  
issue then.

>
>> The version identifier is changed in the code in SVN, so it
>> definitely won't work. This is deliberate, because the server needs
>> to support extra commands, which will only be used if diffing takes a
>> long time. So a weird one if anyone gets caught by it.
>
> Ok. Which is the source tree goes with the client released by Chris?

Do

   svn checkout http://bbdev.fluffy.co.uk/svn/box/trunk

to get it.

Ben




From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:46:31 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 18:46:31 +0000
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <20060215184009.12063.qmail@web36711.mail.mud.yahoo.com>
References: <20060215184009.12063.qmail@web36711.mail.mud.yahoo.com>
Message-ID: <A4E0315F-7CC0-4D60-B0AF-1821F1F437CB@fluffy.co.uk>

On 15 Feb 2006, at 18:40, Gary wrote:

>> The data in each block is only compressed and encrypted just before
>> it's required for sending to the server. Block sizes are small enough
>> for this not to be a worry.
>
> Yeah, that was my understanding as well. So, with server-side block  
> compress+encrypt guaranteed
> under 300 seconds (approx. default SSL timeout), and client-side  
> KeepAlive() transmitting data
> between client and the server over SLL during diff,

Yes.

>
>>> what else is there that could have probably failed?<<
>
> Let's assume for the moment that a network timeout event has  
> occured during upload (after a
> successful diff). Shouldn't Box fail the whole upload in that case,  
> and never report "Send
> Finished()"? (as it did in my log file?).

It's entirely possible. If the stream is being sent, then there will  
be quite a bit of it in the buffer (at the OS socket level) waiting  
to go when the actual Finished command is sent. So if the OS doesn't  
realise until a bit later, after the log message, then you might see  
what you saw.

But it's repeatable, so it can't be that. But I really would like to  
see the server logs.

Ben




From boxbackup-dev@fluffy.co.uk  Wed Feb 15 18:48:26 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Wed, 15 Feb 2006 10:48:26 -0800 (PST)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <A3119DF0-791E-4CA9-A217-443052C1E839@fluffy.co.uk>
Message-ID: <20060215184826.42901.qmail@web36712.mail.mud.yahoo.com>

> Can I see the logs so I can tell what's going on there?  
> ExtendedLogging preferred.

I will have another run at it, and see if I can replicate it with full logging.

> So you can repeat this with the latest server and latest client?

Will do.

> I must confess to being a little confused now.

Ok, here is my understanding: I think there are two large file problems that we are running into.
One problem, the SLL timeout during a large file diff, was occuring right after a diff finished,
and the client was starting to upload to the server (that's quite logical: diffing took too long,
and as soon as the client tried to upload, it failed). My 0.9-mod code took care of that problem
with KeepAlive()s. Yet, while running 0.9-mod recently, I ran into another problem with diffing
large files. This one was NOT occuring right after a diff was done, but AFTER Send Finished().
This is something new, or some kind of freak network problem.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 20:09:49 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Wed, 15 Feb 2006 20:09:49 +0000 (GMT)
Subject: [Box Backup-dev] A new problem with diffing large files?
In-Reply-To: <A3119DF0-791E-4CA9-A217-443052C1E839@fluffy.co.uk>
References: <20060215183543.19946.qmail@web36703.mail.mud.yahoo.com>
 <A3119DF0-791E-4CA9-A217-443052C1E839@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602152006060.14656@top.qwarx.com>

Hi all,

On Wed, 15 Feb 2006, Ben Summers wrote:

>>  Those, apparently, did not include the KeepAlive(). The implementation 
>>  for the command was there, but it was not being called (?).
>
> I think his latest one does, but let's see what he says.

Yes, the latest build (r462) was built from trunk with KeepAlive support 
that works, as far as I can tell.

This build is the first that bumps the protocol ID number, and thus 
requires a server upgrade. 3 possible solutions:

* Build a new server from trunk;

* Patch your existing server to use the new protocol version (no other
   patches required, as far as I know, the protocol itself has not changed
   since the last build I released);

* I can create a private build for you, that drops the server version
   change (but this should not be used by the general public, since your
   server includes patches that most will not).

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 |


From boxbackup-dev@fluffy.co.uk  Wed Feb 15 21:50:17 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Wed, 15 Feb 2006 13:50:17 -0800
Subject: [Box Backup-dev] Code freeze and release candidate 3
In-Reply-To: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk>
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk>
Message-ID: <43F3A219.7030507@reedtz.com>

Hi,
Is there an RC3 tag I can pull yet? Or are we waiting for the fixes to
the KeepAlive() stuff?

I will (finally) be able to test on any (almost) x86-based OS needed
using VMware. Currently, I'm planning to test FC2, FC3 and FC5-test2. I
can pick up the FreeBSD/NetBSD testing too (excluding xattr testing,
from what I understand from Martin).

If I don't hear back from another tester, I will test on the latest
FreeBSD/NetBSD versions as well. I'll put that in the Wiki...

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Wed Feb 15 22:13:00 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Wed, 15 Feb 2006 22:13:00 +0000
Subject: [Box Backup-dev] Code freeze and release candidate 3
In-Reply-To: <43F3A219.7030507@reedtz.com>
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk> <43F3A219.7030507@reedtz.com>
Message-ID: <20060215221259.GS31646@netinertia.co.uk>

Hi Per,

On Wed, Feb 15, 2006 at 01:50:17PM -0800, Per Thomsen wrote:
> If I don't hear back from another tester, I will test on the latest
> FreeBSD/NetBSD versions as well. I'll put that in the Wiki...

I've been testing on 5.4-RELEASE and 6.0-RELEASE but as shown from what
I've posted so far I'm a bit crap at debugging, so having someone else
test on FreeBSD would be good!

I'm also the port maintainer, so I'll post my updated Makefile at some
point so people can test that.

James

From boxbackup-dev@fluffy.co.uk  Wed Feb 15 22:13:36 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 22:13:36 +0000
Subject: [Box Backup-dev] Code freeze and release candidate 3
In-Reply-To: <43F3A219.7030507@reedtz.com>
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk> <43F3A219.7030507@reedtz.com>
Message-ID: <C889670E-92E5-4E24-8A0E-AAC144E3AAD1@fluffy.co.uk>

Not yet. I think I'm waiting for confirmation for something, but  
maybe not. There's a slight possibility that something is amiss with  
the KeepAlive stuff, but I don't know what's going on there yet.

I'll do an rc3 tomorrow morning, unless someone comes up with a good  
reason why not in the meantime.

Thanks on the testing, very much appreciated.

Ben


On 15 Feb 2006, at 21:50, Per Thomsen wrote:

> Hi,
> Is there an RC3 tag I can pull yet? Or are we waiting for the fixes to
> the KeepAlive() stuff?
>
> I will (finally) be able to test on any (almost) x86-based OS needed
> using VMware. Currently, I'm planning to test FC2, FC3 and FC5- 
> test2. I
> can pick up the FreeBSD/NetBSD testing too (excluding xattr testing,
> from what I understand from Martin).
>
> If I don't hear back from another tester, I will test on the latest
> FreeBSD/NetBSD versions as well. I'll put that in the Wiki...
>
> Thanks,
> Per
>
> -- 
> Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
> V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
> GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Wed Feb 15 22:44:42 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 15 Feb 2006 22:44:42 +0000
Subject: [Box Backup-dev] Code freeze and release candidate 3
In-Reply-To: <C889670E-92E5-4E24-8A0E-AAC144E3AAD1@fluffy.co.uk>
References: <2F73C10B-1C1E-460F-8D97-B2E2EDA173B9@fluffy.co.uk> <43F3A219.7030507@reedtz.com> <C889670E-92E5-4E24-8A0E-AAC144E3AAD1@fluffy.co.uk>
Message-ID: <BD1E4DEF-94CC-4366-B07E-55C4758C77A4@fluffy.co.uk>


Oh I remember, I was waiting for someone else to review the Win32  
merge. Martin's sort of done it, and I'll have another look tomorrow.

Ben



On 15 Feb 2006, at 22:13, Ben Summers wrote:

>
> Not yet. I think I'm waiting for confirmation for something, but  
> maybe not. There's a slight possibility that something is amiss  
> with the KeepAlive stuff, but I don't know what's going on there yet.
>
> I'll do an rc3 tomorrow morning, unless someone comes up with a  
> good reason why not in the meantime.
>
> Thanks on the testing, very much appreciated.
>
> Ben
>
>
> On 15 Feb 2006, at 21:50, Per Thomsen wrote:
>
>> Hi,
>> Is there an RC3 tag I can pull yet? Or are we waiting for the  
>> fixes to
>> the KeepAlive() stuff?
>>
>> I will (finally) be able to test on any (almost) x86-based OS needed
>> using VMware. Currently, I'm planning to test FC2, FC3 and FC5- 
>> test2. I
>> can pick up the FreeBSD/NetBSD testing too (excluding xattr testing,
>> from what I understand from Martin).
>>
>> If I don't hear back from another tester, I will test on the latest
>> FreeBSD/NetBSD versions as well. I'll put that in the Wiki...
>>
>> Thanks,
>> Per
>>
>> -- 
>> Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
>> V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
>> GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen
>>
>> _______________________________________________
>> Boxbackup-dev mailing list
>> Boxbackup-dev@fluffy.co.uk
>> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Thu Feb 16 15:33:28 2006
From: boxbackup-dev@fluffy.co.uk (Todd D. Esposito)
Date: Thu, 16 Feb 2006 09:33:28 -0600 (CST)
Subject: [Box Backup-dev] Further test results on Gentoo/Linux w/ XFS
Message-ID: <39136.67.184.68.1.1140104008.squirrel@67.184.68.1>

------=_20060216093328_87685
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hey guys,

I ran the test suite on an XFS partition, this time in debug mode, and got
the same results as the previous (release-mode) tests I ran, to wit: 1
failure in test/bbackupd.  I have attached a 256K (after gzipping) results
file from doing:

$ ./runtest.pl ALL debug 2>&1 > ../../tests-all-debug-xfs.txt

I'm not sure if this is of concern or not, but please let me know if I can
be of any further help.

Do you want me to re-run the tests in debug mode on JFS?

[Aside to Ben: sorry for posting this to the general list, esp w/ the
attachement; I believe the original call for testing came from the general
list, though I'm total with you on not flooding the general users.]

- Todd


------=_20060216093328_87685
Content-Type: application/x-gzip; name="tests-all-debug-xfs.txt.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="tests-all-debug-xfs.txt.gz"

[encoded data, 354046 characters]
------=_20060216093328_87685--



From boxbackup-dev@fluffy.co.uk  Fri Feb 17 02:26:37 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 02:26:37 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r464 - box/trunk/lib/backupclient
Message-ID: <20060217022637.88FDF95@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-17 02:26:35 +0000 (Fri, 17 Feb 2006)
New Revision: 464

Modified:
   box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
Log:
On XFS the file permissions appear to apply also to the extended attribute data. ie. If a file is not readable then nor is the extended attribute data - even if there isn't any this is still an error.

This is not an ideal fix for this problem. Really we should notify a read-error as we do for file read permission problems and continue, but the BackupClientFileAttributes code is called from multiple locations and it is not clear that it could always report the error in such a way, nor even continue. This alternative is better than aborting the whole run. In the case where a file isn't readable this will be found and reported elsewhere anyway.


Modified: box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupClientFileAttributes.cpp	2006-02-15 00:06:22 UTC (rev 463)
+++ box/trunk/lib/backupclient/BackupClientFileAttributes.cpp	2006-02-17 02:26:35 UTC (rev 464)
@@ -555,7 +555,7 @@
 
 			outputBlock.ResizeBlock(xattrSize);
 		}
-		else if(listSize<0 && errno!=EOPNOTSUPP)
+		else if(listSize<0 && errno!=EOPNOTSUPP && errno!=EACCES)
 		{
 			THROW_EXCEPTION(CommonException, OSFileError);
 		}


From boxbackup-dev@fluffy.co.uk  Fri Feb 17 02:35:51 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Fri, 17 Feb 2006 02:35:51 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <20060215103612.GQ31646@netinertia.co.uk>
References: <20060214143955.GM31646@netinertia.co.uk>
 <1139928784.3333.0.camel@avenin.ebourne.me.uk>
 <20060214154505.GO31646@netinertia.co.uk>
 <1139934391.3880.5.camel@avenin.ebourne.me.uk>
 <20060214194449.GP31646@netinertia.co.uk>
 <Pine.LNX.4.62.0602142058400.14656@top.qwarx.com>
 <20060215103612.GQ31646@netinertia.co.uk>
Message-ID: <1140143752.6545.19.camel@avenin.ebourne.me.uk>

On Wed, 2006-02-15 at 10:36 +0000, James O'Gorman wrote:
> I'm very confused now. I just tested r361, 362 and 363 by rm -rf the
> whole trunk directory and svn up each revision and running ./runtest.pl
> backupstore debug.
> 
> For r361 I only got the foundCurrent and foundOld errors.
> For r362 I only got the dir.GetAttributes* errors.
> For r363 I got all 6 errors (including the en->GetName() errors).
> 
> Maybe this is a general problem with the way FreeBSD is handling things?
> I'm not quite sure how to debug this further.

Have you tried running exactly the same version a few times? Are your
failures consistent? If not, then you'll have to be a lot more careful
running different versions (ie. try running each version a few times).

There were no code changes in trunk between 362:363, so they cannot
behave differently.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Fri Feb 17 01:09:16 2006
From: boxbackup-dev@fluffy.co.uk (Johan Allard)
Date: Fri, 17 Feb 2006 12:09:16 +1100
Subject: [Box Backup-dev] Re: [Box Backup] readline support on OS X
In-Reply-To: <1140133313.6545.8.camel@avenin.ebourne.me.uk>
References: <C1F981F1-2816-4C10-8AC4-EB76CDFE9FE3@allard.nu> <1140133313.6545.8.camel@avenin.ebourne.me.uk>
Message-ID: <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu>

--Apple-Mail-6-770083298
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

On 17/02/2006, at 10:41 AM, Martin Ebourne wrote:

> On Fri, 2006-02-17 at 00:39 +1100, Johan Allard wrote:
>> Hi,
>>
>> After some fiddling around I managed to build readline support into
>> the default Mac OS 10.4.5 distribution. The patch to get it to work
>> is as follows (against trunk):
>>
>> Index: infrastructure/m4/vl_lib_readline.m4
>> ===================================================================
>> --- infrastructure/m4/vl_lib_readline.m4        (revision 463)
>> +++ infrastructure/m4/vl_lib_readline.m4        (working copy)
>> @@ -70,6 +70,7 @@
>>     if test "x$vl_cv_lib_readline_compat_found" = "xno"; then
>>       VL_LIB_READLINE_CHECK([editline],
>>                             [edit editline],
>> +                          [readline/readline.h],
>>                            [editline/readline.h],
>>                            [editline/readline.h])
>>     fi
>
> Johan,
>
> This cannot be right. You've added another parameter to a macro that
> only takes four parameters. This will break something else.
>
> Also I find it odd that an editline header should be installed in
> readline/readline.h. Is it possible you have both readline and  
> editline
> available, and have managed to mix one set of headers with different
> libraries?
>
> Please follow up to boxbackup-dev@fluffy.co.uk since this doesn't  
> belong
> on the main list. Also patches as attachments please, it is impossible
> to apply them from inline due to whitespace getting munged.
>
> Cheers,
>
> Martin.


Here is the diff as an attachment.


--Apple-Mail-6-770083298
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="readline.diff"
Content-Disposition: attachment;
	filename=readline.diff

Index: infrastructure/m4/vl_lib_readline.m4
===================================================================
--- infrastructure/m4/vl_lib_readline.m4	(revision 463)
+++ infrastructure/m4/vl_lib_readline.m4	(working copy)
@@ -70,6 +70,7 @@
   if test "x$vl_cv_lib_readline_compat_found" = "xno"; then
     VL_LIB_READLINE_CHECK([editline],
                           [edit editline],
+                          [readline/readline.h],  
 	  		  [editline/readline.h],
 			  [editline/readline.h])
   fi

--Apple-Mail-6-770083298
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


What happens is that Apple has actually a pretty dodgy default  
configuration, look at this:

allard@borgcube ~ % ls -l /usr/lib/libreadline.dylib
lrwxr-xr-x   1 root  wheel  13 Jan 24 18:33 /usr/lib/ 
libreadline.dylib@ -> libedit.dylib

allard@borgcube ~ % ls -l /usr/include/editline*
zsh: no matches found: /usr/include/editline*

allard@borgcube ~ % ls -l /usr/include/readline
total 12
lrwxr-xr-x   1 root  wheel    10 Jan 25 07:06 history.h@ -> readline.h
-r--r--r--   1 root  wheel  6435 Mar 21  2005 readline.h


So what happens is that on the Mac Apple has actually only editline  
installed and it symlinks to make believe that it has readline, and  
it doesn't have the include files in the right place to use editline  
properly. Box Backup the detects libedit just fine but it doesn't  
pickup editline/readline.h because that's not where Apple has stored  
it. To get the Mac to do it properly we could: ln -s /usr/include/ 
readline /usr/include/editline (and that's what I did when testing  
it), but of course we can't get everyone to do that to get readline/ 
editline support so we'll have to update the configure script  
instead. Or does anyone have any other idea?

Cheers

//johan
--Apple-Mail-6-770083298--

From boxbackup-dev@fluffy.co.uk  Fri Feb 17 09:25:07 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 17 Feb 2006 09:25:07 +0000
Subject: [Box Backup-dev] COMMIT r464 - box/trunk/lib/backupclient
In-Reply-To: <20060217022637.88FDF95@s0g0.pems.testserver.co.uk>
References: <20060217022637.88FDF95@s0g0.pems.testserver.co.uk>
Message-ID: <17A889A7-70B8-4CD6-A6FF-C40D77DE878A@fluffy.co.uk>

Can we have a policy on this type of thing?

Any non-optimal solution or something which should be addressed in  
the future should have a comment like

   // TODO: Added errno!=EACCES for XFS, not a good solution as read  
errors not notified properly, see SVN log

The "TODO:" bit is the marker to grep for.

Ta.

Ben




On 17 Feb 2006, at 02:26, subversion@fluffy.co.uk wrote:

> Author: martin
> Date: 2006-02-17 02:26:35 +0000 (Fri, 17 Feb 2006)
> New Revision: 464
>
> Modified:
>    box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
> Log:
> On XFS the file permissions appear to apply also to the extended  
> attribute data. ie. If a file is not readable then nor is the  
> extended attribute data - even if there isn't any this is still an  
> error.
>
> This is not an ideal fix for this problem. Really we should notify  
> a read-error as we do for file read permission problems and  
> continue, but the BackupClientFileAttributes code is called from  
> multiple locations and it is not clear that it could always report  
> the error in such a way, nor even continue. This alternative is  
> better than aborting the whole run. In the case where a file isn't  
> readable this will be found and reported elsewhere anyway.
>
>
> Modified: box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
> ===================================================================
> --- box/trunk/lib/backupclient/BackupClientFileAttributes.cpp	 
> 2006-02-15 00:06:22 UTC (rev 463)
> +++ box/trunk/lib/backupclient/BackupClientFileAttributes.cpp	 
> 2006-02-17 02:26:35 UTC (rev 464)
> @@ -555,7 +555,7 @@
>
>  			outputBlock.ResizeBlock(xattrSize);
>  		}
> -		else if(listSize<0 && errno!=EOPNOTSUPP)
> +		else if(listSize<0 && errno!=EOPNOTSUPP && errno!=EACCES)
>  		{
>  			THROW_EXCEPTION(CommonException, OSFileError);
>  		}
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:28:27 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 23:28:27 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r465 - box/chris/win32
Message-ID: <20060217232827.CA0A595@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-17 23:28:25 +0000 (Fri, 17 Feb 2006)
New Revision: 465

Removed:
   box/chris/win32/vc2005-compile-fixes/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/vc2005-compile-fixes
- Delete this branch now that it's been merged :-)



From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:30:17 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 23:30:17 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r466 - box/chris/win32
Message-ID: <20060217233017.53B4395@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-17 23:30:15 +0000 (Fri, 17 Feb 2006)
New Revision: 466

Removed:
   box/chris/win32/trunk_plus_win32_final/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/trunk_plus_win32_final
- Tidy up



From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:30:38 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 23:30:38 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r467 - box/chris/win32
Message-ID: <20060217233038.5307195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-17 23:30:35 +0000 (Fri, 17 Feb 2006)
New Revision: 467

Removed:
   box/chris/win32/0.08_bens_original/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/0.08_bens_original
- Tidy up



From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:30:55 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 23:30:55 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r468 - box/chris/win32
Message-ID: <20060217233055.79AEE95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-17 23:30:54 +0000 (Fri, 17 Feb 2006)
New Revision: 468

Removed:
   box/chris/win32/crash-test-pipes/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/crash-test-pipes
- Tidy up



From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:32:05 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 23:32:05 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r469 - box/chris/win32
Message-ID: <20060217233205.5676695@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-17 23:32:03 +0000 (Fri, 17 Feb 2006)
New Revision: 469

Removed:
   box/chris/win32/0.08_plus_win32_final/
   box/chris/win32/cygwin-compile-fixes/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/0.08_plus_win32_final
* http://bbdev.fluffy.co.uk/svn/box/chris/win32/cygwin-compile-fixes
- Deleted, tidy up



From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:34:11 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 23:34:11 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r470 - box/chris
Message-ID: <20060217233411.B221B95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-17 23:34:05 +0000 (Fri, 17 Feb 2006)
New Revision: 470

Removed:
   box/chris/bb-save-state/
   box/chris/boxbackup-0.10_rc0.2_win32/
   box/chris/diff-timeout-and-ssl-keepalive/
   box/chris/logging/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/bb-save-state
* http://bbdev.fluffy.co.uk/svn/box/chris/boxbackup-0.10_rc0.2_win32
* http://bbdev.fluffy.co.uk/svn/box/chris/diff-timeout-and-ssl-keepalive
* http://bbdev.fluffy.co.uk/svn/box/chris/logging
- Deleted, tidy up



From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:35:08 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 23:35:08 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r471 - box/chris
Message-ID: <20060217233508.B1B7095@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-17 23:35:04 +0000 (Fri, 17 Feb 2006)
New Revision: 471

Added:
   box/chris/general/
Log:
* http://bbdev.fluffy.co.uk/svn/box/chris/general
- Branch for general fixes post-0.10


Copied: box/chris/general (from rev 470, box/trunk)


From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:47:35 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Fri, 17 Feb 2006 23:47:35 +0000
Subject: [Box Backup-dev] COMMIT r464 - box/trunk/lib/backupclient
In-Reply-To: <17A889A7-70B8-4CD6-A6FF-C40D77DE878A@fluffy.co.uk>
References: <20060217022637.88FDF95@s0g0.pems.testserver.co.uk>
 <17A889A7-70B8-4CD6-A6FF-C40D77DE878A@fluffy.co.uk>
Message-ID: <1140220055.14355.10.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-17 at 09:25 +0000, Ben Summers wrote:
> Can we have a policy on this type of thing?
> 
> Any non-optimal solution or something which should be addressed in  
> the future should have a comment like
> 
>    // TODO: Added errno!=EACCES for XFS, not a good solution as read  
> errors not notified properly, see SVN log
> 
> The "TODO:" bit is the marker to grep for.

Sure, that's a sound idea. I would normally add such a thing where I
intended to revisit later and fix up something I was not happy with. In
this case I didn't think I'd realistically be able to do that because of
the structure of the code. Also I considered the change to be less than
ideal, but still a valid fix. Unless more corner cases come to light
then a correct error will always be reported for this one.

I'll still add the TODO (or a note) if you like. It's also worth noting
that "svn blame" is a very handy command for working out why things are
the way they are, as long as the log messages are descriptive. On some
projects (eg. mono) they use it very extensively.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:50:35 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Fri, 17 Feb 2006 23:50:35 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r472 - box/chris/general/bin/bbackupquery
Message-ID: <20060217235035.579F295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-17 23:50:31 +0000 (Fri, 17 Feb 2006)
New Revision: 472

Modified:
   box/chris/general/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Allow retrieving files by relative or absolute path on the store


Modified: box/chris/general/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/general/bin/bbackupquery/BackupQueries.cpp	2006-02-17 23:35:04 UTC (rev 471)
+++ box/chris/general/bin/bbackupquery/BackupQueries.cpp	2006-02-17 23:50:31 UTC (rev 472)
@@ -843,13 +843,44 @@
 	}
 
 	// Find object ID somehow
-	int64_t id;
+	int64_t fileId;
+	int64_t dirId = GetCurrentDirectoryID();
 	std::string localName;
+
 	// BLOCK
 	{
+#ifdef WIN32
+		std::string fileName;
+		if(!ConvertConsoleToUtf8(args[0].c_str(), fileName))
+			return;
+#else
+		const std::string& fileName(args[0]);
+#endif
+
+		if(!opts['i'])
+		{
+			// does this remote filename include a path?
+			int index = fileName.rfind('/');
+			if(index != std::string::npos)
+			{
+				std::string dirName(fileName.substr(0, index));
+				fileName = fileName.substr(index + 1);
+
+				dirId = FindDirectoryObjectID(dirName);
+				if(dirId == 0)
+				{
+					printf("Directory '%s' not found\n", 
+						dirName.c_str());
+					return;
+				}
+			}
+		}
+
+		BackupStoreFilenameClear fn(fileName);
+
 		// Need to look it up in the current directory
 		mrConnection.QueryListDirectory(
-				GetCurrentDirectoryID(),
+				dirId,
 				BackupProtocolClientListDirectory::Flags_File,	// just files
 				(opts['i'])?(BackupProtocolClientListDirectory::Flags_EXCLUDE_NOTHING):(BackupProtocolClientListDirectory::Flags_OldVersion | BackupProtocolClientListDirectory::Flags_Deleted), // only current versions
 				false /* don't want attributes */);
@@ -862,17 +893,22 @@
 		if(opts['i'])
 		{
 			// Specified as ID. 
-			id = ::strtoll(args[0].c_str(), 0, 16);
-			if(id == LLONG_MIN || id == LLONG_MAX || id == 0)
+			fileId = ::strtoll(args[0].c_str(), 0, 16);
+			if(fileId == LLONG_MIN || fileId == LLONG_MAX || 
+				fileId == 0)
 			{
 				printf("Not a valid object ID (specified in hex)\n");
 				return;
 			}
 			
 			// Check that the item is actually in the directory
-			if(dir.FindEntryByID(id) == 0)
+			if(dir.FindEntryByID(fileId) == 0)
 			{
-				printf("ID '%08llx' not found in current directory on store.\n(You can only download objects by ID from the current directory.)\n", id);
+				printf("ID '%08llx' not found in current "
+					"directory on store.\n"
+					"(You can only download objects by ID "
+					"from the current directory.)\n", 
+					fileId);
 				return;
 			}
 			
@@ -883,26 +919,22 @@
 		{				
 			// Specified by name, find the object in the directory to get the ID
 			BackupStoreDirectory::Iterator i(dir);
-#ifdef WIN32
-			std::string fileName;
-			if(!ConvertConsoleToUtf8(args[0].c_str(), fileName))
-				return;
-			BackupStoreFilenameClear fn(fileName);
-#else
-			BackupStoreFilenameClear fn(args[0]);
-#endif
 			BackupStoreDirectory::Entry *en = i.FindMatchingClearName(fn);
 			
 			if(en == 0)
 			{
-				printf("Filename '%s' not found in current directory on store.\n(Subdirectories in path not searched.)\n", args[0].c_str());
+				printf("Filename '%s' not found in current "
+					"directory on store.\n"
+					"(Subdirectories in path not "
+					"searched.)\n", args[0].c_str());
 				return;
 			}
 			
-			id = en->GetObjectID();
+			fileId = en->GetObjectID();
 			
-			// Local name is the last argument, which is either the looked up filename, or
-			// a filename specified by the user.
+			// Local name is the last argument, which is either 
+			// the looked up filename, or a filename specified 
+			// by the user.
 			localName = args[args.size() - 1];
 		}
 	}
@@ -919,7 +951,7 @@
 	try
 	{
 		// Request object
-		mrConnection.QueryGetFile(GetCurrentDirectoryID(), id);
+		mrConnection.QueryGetFile(dirId, fileId);
 
 		// Stream containing encoded file
 		std::auto_ptr<IOStream> objectStream(mrConnection.ReceiveStream());
@@ -928,7 +960,7 @@
 		BackupStoreFile::DecodeFile(*objectStream, localName.c_str(), mrConnection.GetTimeout());
 
 		// Done.
-		printf("Object ID %08llx fetched sucessfully.\n", id);
+		printf("Object ID %08llx fetched sucessfully.\n", fileId);
 	}
 	catch(...)
 	{


From boxbackup-dev@fluffy.co.uk  Fri Feb 17 23:58:30 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Fri, 17 Feb 2006 23:58:30 +0000
Subject: [Box Backup-dev] Re: [Box Backup] readline support on OS X
In-Reply-To: <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu>
References: <C1F981F1-2816-4C10-8AC4-EB76CDFE9FE3@allard.nu>
 <1140133313.6545.8.camel@avenin.ebourne.me.uk>
 <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu>
Message-ID: <1140220710.14355.21.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-17 at 12:09 +1100, Johan Allard wrote:
> So what happens is that on the Mac Apple has actually only editline  
> installed and it symlinks to make believe that it has readline, and  
> it doesn't have the include files in the right place to use editline  
> properly. Box Backup the detects libedit just fine but it doesn't  
> pickup editline/readline.h because that's not where Apple has stored  
> it. To get the Mac to do it properly we could: ln -s /usr/include/ 
> readline /usr/include/editline (and that's what I did when testing  
> it), but of course we can't get everyone to do that to get readline/ 
> editline support so we'll have to update the configure script  
> instead. Or does anyone have any other idea?

Johan,

Thanks for the explanation as to what causes the problem. Here is why I
am not planning to fix this issue (unless a safer fix can be found):

i) The suggested fix is a hack around Apple's hack. It is not at all
unlikely that some other system could have only the libraries installed
for editline, but have both headers and libraries for GNU readline. In
this case your fix is likely to cause Box to try and compile against
readline but link against editline. The resulting mess is unlikely to
work properly, and quite likely to create a support burden.

ii) Given that Apple is trying to emulate GNU readline then simply
giving --enable-gnu-readline to ./configure should get it working
correctly.

Which brings up an interesting point - what is happening about the
documentation for the new release? Since the documentation isn't in svn
we can't version it properly, so I guess it'll need to be updated at the
same time as the release is made. Should the people who made user
visible changes go and edit the wiki instructions to bring them up to
date? Before or after the release?

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 03:31:46 2006
From: boxbackup-dev@fluffy.co.uk (Johan Allard)
Date: Sat, 18 Feb 2006 14:31:46 +1100
Subject: [Box Backup-dev] Re: [Box Backup] readline support on OS X
In-Reply-To: <1140220710.14355.21.camel@avenin.ebourne.me.uk>
References: <C1F981F1-2816-4C10-8AC4-EB76CDFE9FE3@allard.nu> <1140133313.6545.8.camel@avenin.ebourne.me.uk> <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu> <1140220710.14355.21.camel@avenin.ebourne.me.uk>
Message-ID: <5550CDC2-F4A1-4FFD-938C-5A4E6B8D107D@allard.nu>

On 18/02/2006, at 10:58 AM, Martin Ebourne wrote:

> On Fri, 2006-02-17 at 12:09 +1100, Johan Allard wrote:
>> So what happens is that on the Mac Apple has actually only editline
>> installed and it symlinks to make believe that it has readline, and
>> it doesn't have the include files in the right place to use editline
>> properly. Box Backup the detects libedit just fine but it doesn't
>> pickup editline/readline.h because that's not where Apple has stored
>> it. To get the Mac to do it properly we could: ln -s /usr/include/
>> readline /usr/include/editline (and that's what I did when testing
>> it), but of course we can't get everyone to do that to get readline/
>> editline support so we'll have to update the configure script
>> instead. Or does anyone have any other idea?
>
> Johan,
>
> Thanks for the explanation as to what causes the problem. Here is  
> why I
> am not planning to fix this issue (unless a safer fix can be found):
>
> i) The suggested fix is a hack around Apple's hack. It is not at all
> unlikely that some other system could have only the libraries  
> installed
> for editline, but have both headers and libraries for GNU readline. In
> this case your fix is likely to cause Box to try and compile against
> readline but link against editline. The resulting mess is unlikely to
> work properly, and quite likely to create a support burden.

hmm, maybe some #ifdef __DARWIN__ thing is what's needed.

> ii) Given that Apple is trying to emulate GNU readline then simply
> giving --enable-gnu-readline to ./configure should get it working
> correctly.

It doesn't sadly. I tried this first and regardless that I actually  
have readline compiled in /opt/local (using darwinports) I couldn't  
get readline support to be recognized by configure. That's the only  
reason I decided to patch instead.

If a fix can't be produced safely then at least document the problem  
somewhere with the optional fix for OS X as readline/editline is very  
nice.

Cheers

//johan



From boxbackup-dev@fluffy.co.uk  Sat Feb 18 09:40:42 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 18 Feb 2006 09:40:42 +0000
Subject: [Box Backup-dev] COMMIT r471 - box/chris
In-Reply-To: <20060217233508.B1B7095@s0g0.pems.testserver.co.uk>
References: <20060217233508.B1B7095@s0g0.pems.testserver.co.uk>
Message-ID: <7518EE98-C916-4816-AB72-6DCC1EC51922@fluffy.co.uk>

Isn't this a bit early?

Ben


On 17 Feb 2006, at 23:35, subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-17 23:35:04 +0000 (Fri, 17 Feb 2006)
> New Revision: 471
>
> Added:
>    box/chris/general/
> Log:
> * http://bbdev.fluffy.co.uk/svn/box/chris/general
> - Branch for general fixes post-0.10
>
>
> Copied: box/chris/general (from rev 470, box/trunk)
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 10:06:32 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 18 Feb 2006 10:06:32 +0000
Subject: [Box Backup-dev] COMMIT r464 - box/trunk/lib/backupclient
In-Reply-To: <1140220055.14355.10.camel@avenin.ebourne.me.uk>
References: <20060217022637.88FDF95@s0g0.pems.testserver.co.uk> <17A889A7-70B8-4CD6-A6FF-C40D77DE878A@fluffy.co.uk> <1140220055.14355.10.camel@avenin.ebourne.me.uk>
Message-ID: <D5170865-723D-4025-9DED-CA28DF786898@fluffy.co.uk>

On 17 Feb 2006, at 23:47, Martin Ebourne wrote:

> On Fri, 2006-02-17 at 09:25 +0000, Ben Summers wrote:
>> Can we have a policy on this type of thing?
>>
>> Any non-optimal solution or something which should be addressed in
>> the future should have a comment like
>>
>>    // TODO: Added errno!=EACCES for XFS, not a good solution as read
>> errors not notified properly, see SVN log
>>
>> The "TODO:" bit is the marker to grep for.
>
> Sure, that's a sound idea. I would normally add such a thing where I
> intended to revisit later and fix up something I was not happy  
> with. In
> this case I didn't think I'd realistically be able to do that  
> because of
> the structure of the code. Also I considered the change to be less  
> than
> ideal, but still a valid fix. Unless more corner cases come to light
> then a correct error will always be reported for this one.
>
> I'll still add the TODO (or a note) if you like. It's also worth  
> noting
> that "svn blame" is a very handy command for working out why things  
> are
> the way they are, as long as the log messages are descriptive. On some
> projects (eg. mono) they use it very extensively.

No need if you think it's a fix. I just thought that the log message  
was comprehensive, explains a little weird thing, and might have been  
better inline.

I am so picky, aren't I?

Ben





From boxbackup-dev@fluffy.co.uk  Sat Feb 18 10:08:33 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 18 Feb 2006 10:08:33 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r473 - box/trunk/distribution/boxbackup
Message-ID: <20060218100833.C8DDD95@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-18 10:08:32 +0000 (Sat, 18 Feb 2006)
New Revision: 473

Modified:
   box/trunk/distribution/boxbackup/VERSION.txt
Log:
Bump version for rc3

Modified: box/trunk/distribution/boxbackup/VERSION.txt
===================================================================
--- box/trunk/distribution/boxbackup/VERSION.txt	2006-02-17 23:50:31 UTC (rev 472)
+++ box/trunk/distribution/boxbackup/VERSION.txt	2006-02-18 10:08:32 UTC (rev 473)
@@ -1,2 +1,2 @@
-0.09_plus2
+0.09_plus3
 boxbackup


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 10:27:47 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 10:27:47 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r471 - box/chris
In-Reply-To: <7518EE98-C916-4816-AB72-6DCC1EC51922@fluffy.co.uk>
References: <20060217233508.B1B7095@s0g0.pems.testserver.co.uk>
 <7518EE98-C916-4816-AB72-6DCC1EC51922@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602181027100.14656@top.qwarx.com>

Hi Ben,

> Isn't this a bit early?

You said no new features for 0.10, I want somewhere to keep them safe for 
0.11 :-)

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 10:34:58 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 18 Feb 2006 10:34:58 +0000
Subject: [Box Backup-dev] COMMIT r471 - box/chris
In-Reply-To: <Pine.LNX.4.62.0602181027100.14656@top.qwarx.com>
References: <20060217233508.B1B7095@s0g0.pems.testserver.co.uk> <7518EE98-C916-4816-AB72-6DCC1EC51922@fluffy.co.uk> <Pine.LNX.4.62.0602181027100.14656@top.qwarx.com>
Message-ID: <B96706A9-9D2E-4B28-897E-4AB08F51B2C8@fluffy.co.uk>

On 18 Feb 2006, at 10:27, Chris Wilson wrote:

> Hi Ben,
>
>> Isn't this a bit early?
>
> You said no new features for 0.10, I want somewhere to keep them  
> safe for 0.11 :-)

Oh, I see. That all makes sense then.

Can you compile a Win32 binary for rc3 from the distribution archive  
(not SVN)?

Thanks,

Ben




From boxbackup-dev@fluffy.co.uk  Sat Feb 18 11:59:19 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 18 Feb 2006 11:59:19 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r474 - box/chris/win32/releases
Message-ID: <20060218115919.8C01395@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-18 11:45:01 +0000 (Sat, 18 Feb 2006)
New Revision: 474

Added:
   box/chris/win32/releases/boxbackup-0.09_plus3-backup-client-mingw32.zip
Log:
* boxbackup-0.09_plus3-backup-client-mingw32.zip
- Added a release candidate 3 build for Windows native


Added: box/chris/win32/releases/boxbackup-0.09_plus3-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.09_plus3-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 12:04:50 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 12:04:50 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r471 - box/chris
In-Reply-To: <B96706A9-9D2E-4B28-897E-4AB08F51B2C8@fluffy.co.uk>
References: <20060217233508.B1B7095@s0g0.pems.testserver.co.uk>
 <7518EE98-C916-4816-AB72-6DCC1EC51922@fluffy.co.uk>
 <Pine.LNX.4.62.0602181027100.14656@top.qwarx.com>
 <B96706A9-9D2E-4B28-897E-4AB08F51B2C8@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602181204270.14656@top.qwarx.com>

Hi Ben,

> Can you compile a Win32 binary for rc3 from the distribution archive 
> (not SVN)?

Done, it's the version I just posted. No problems at all.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 12:10:42 2006
From: boxbackup-dev@fluffy.co.uk (Jonathan Morton)
Date: Sat, 18 Feb 2006 14:10:42 +0200
Subject: [Box Backup-dev] COMMIT r473 - box/trunk/distribution/boxbackup
In-Reply-To: <20060218100833.C8DDD95@s0g0.pems.testserver.co.uk>
References: <20060218100833.C8DDD95@s0g0.pems.testserver.co.uk>
Message-ID: <16A3BA5C-D039-45D7-A65E-2EF4C3BD5245@chromatix.org.uk>

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-2-896169390
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

> Modified:
>    box/trunk/distribution/boxbackup/VERSION.txt
> Log:
> Bump version for rc3

It's not precisely rc3, but I ran tests on SVN checkouts in the past  
few days and everything passed - on PPC32/64.  This includes  
raidfile, with my "unionised" version of the fix.

No xattr checks though - I don't have it in my filesystem, and as I'm  
presently recovering from a fever, I don't feel like looking it up  
just for this.

--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     chromi@chromatix.org.uk
website:  http://www.chromatix.uklinux.net/
tagline:  The key to knowledge is not to rely on people to teach you it.



--Apple-Mail-2-896169390
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iEYEARECAAYFAkP3DsIACgkQ6xAxI1ofIwpxsQCgtxrAN4q1LQwafIkiUSF99CdG
n7AAoLCMGdvLBWGFlXsgAZrOzcO6UtcX
=PctL
-----END PGP SIGNATURE-----

--Apple-Mail-2-896169390--

From boxbackup-dev@fluffy.co.uk  Sat Feb 18 12:18:35 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 18 Feb 2006 12:18:35 +0000
Subject: [Box Backup-dev] COMMIT r473 - box/trunk/distribution/boxbackup
In-Reply-To: <16A3BA5C-D039-45D7-A65E-2EF4C3BD5245@chromatix.org.uk>
References: <20060218100833.C8DDD95@s0g0.pems.testserver.co.uk>
 <16A3BA5C-D039-45D7-A65E-2EF4C3BD5245@chromatix.org.uk>
Message-ID: <1140265115.14355.23.camel@avenin.ebourne.me.uk>

On Sat, 2006-02-18 at 14:10 +0200, Jonathan Morton wrote:
> > Modified:
> >    box/trunk/distribution/boxbackup/VERSION.txt
> > Log:
> > Bump version for rc3
> 
> It's not precisely rc3, but I ran tests on SVN checkouts in the past  
> few days and everything passed - on PPC32/64.  This includes  
> raidfile, with my "unionised" version of the fix.
> 
> No xattr checks though - I don't have it in my filesystem, and as I'm  
> presently recovering from a fever, I don't feel like looking it up  
> just for this.

If you're running ext3 then simply remount with '-o acl,user_xattr'.

If you're running xfs you already get xattr support.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 13:00:34 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 13:00:34 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r473 - box/trunk/distribution/boxbackup
In-Reply-To: <1140265115.14355.23.camel@avenin.ebourne.me.uk>
References: <20060218100833.C8DDD95@s0g0.pems.testserver.co.uk>
 <16A3BA5C-D039-45D7-A65E-2EF4C3BD5245@chromatix.org.uk>
 <1140265115.14355.23.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602181257271.14656@top.qwarx.com>

Hi Martin,

> If you're running ext3 then simply remount with '-o acl,user_xattr'.

I'm trying to test this on Fedora Core 2. I think the xattr tests are 
running, but I don't see any output to confirm it.

BoxConfig.h has "#define HAVE_SYS_XATTR_H 1", and I have no output line 
that says "Your platform supports xattr, but your filesystem does not". 
The start of the bbackupd test log, in debug mode, is:

TEST: test/bbackupd
Removing old test files...
Copying new test files...
Account 1234567 created

Does this mean that it successfully ran the xattr tests? Perhaps some more 
verbose logging would be useful here?

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 13:24:25 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 18 Feb 2006 13:24:25 +0000
Subject: [Box Backup-dev] COMMIT r473 - box/trunk/distribution/boxbackup
In-Reply-To: <Pine.LNX.4.62.0602181257271.14656@top.qwarx.com>
References: <20060218100833.C8DDD95@s0g0.pems.testserver.co.uk>
 <16A3BA5C-D039-45D7-A65E-2EF4C3BD5245@chromatix.org.uk>
 <1140265115.14355.23.camel@avenin.ebourne.me.uk>
 <Pine.LNX.4.62.0602181257271.14656@top.qwarx.com>
Message-ID: <1140269065.14355.28.camel@avenin.ebourne.me.uk>

On Sat, 2006-02-18 at 13:00 +0000, Chris Wilson wrote:
> Hi Martin,
> 
> > If you're running ext3 then simply remount with '-o acl,user_xattr'.
> 
> I'm trying to test this on Fedora Core 2. I think the xattr tests are 
> running, but I don't see any output to confirm it.
> 
> BoxConfig.h has "#define HAVE_SYS_XATTR_H 1", and I have no output line 
> that says "Your platform supports xattr, but your filesystem does not". 
> The start of the bbackupd test log, in debug mode, is:
> 
> TEST: test/bbackupd
> Removing old test files...
> Copying new test files...
> Account 1234567 created
> 
> Does this mean that it successfully ran the xattr tests? Perhaps some more 
> verbose logging would be useful here?

Yes, you ran xattr tests and they passed.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 13:38:51 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 18 Feb 2006 13:38:51 +0000
Subject: [Box Backup-dev] Re: [Box Backup] readline support on OS X
In-Reply-To: <5550CDC2-F4A1-4FFD-938C-5A4E6B8D107D@allard.nu>
References: <C1F981F1-2816-4C10-8AC4-EB76CDFE9FE3@allard.nu>
 <1140133313.6545.8.camel@avenin.ebourne.me.uk>
 <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu>
 <1140220710.14355.21.camel@avenin.ebourne.me.uk>
 <5550CDC2-F4A1-4FFD-938C-5A4E6B8D107D@allard.nu>
Message-ID: <1140269931.14355.32.camel@avenin.ebourne.me.uk>

On Sat, 2006-02-18 at 14:31 +1100, Johan Allard wrote:
> On 18/02/2006, at 10:58 AM, Martin Ebourne wrote:
> > ii) Given that Apple is trying to emulate GNU readline then simply
> > giving --enable-gnu-readline to ./configure should get it working
> > correctly.
> 
> It doesn't sadly. I tried this first and regardless that I actually  
> have readline compiled in /opt/local (using darwinports) I couldn't  
> get readline support to be recognized by configure. That's the only  
> reason I decided to patch instead.

In which case we should try and fix that then.

Can you run configure with readline as above and post the config.log
output compressed?

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 13:39:19 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 13:39:19 +0000 (GMT)
Subject: [Box Backup-dev] RC3 compile problems on NetBSD
Message-ID: <Pine.LNX.4.62.0602181333590.14656@top.qwarx.com>

Hi all,

Trying to test on NetBSD 2.0.2 (GENERIC) i386, I get some compile 
failures:

g++ -g -Wall   -DBOX_VERSION="\"0.09_plus3\""   -g -Wall -c
    EventWatchFilesystemObject.cpp -o
    ../../debug/lib/common/EventWatchFilesystemObject.o
EventWatchFilesystemObject.cpp: In member function `void
    EventWatchFilesystemObject::FillInKEvent(kevent&, int) const':
EventWatchFilesystemObject.cpp:132: error: invalid conversion from `void*'
    to `int'
*** Error code 1

g++ -g -Wall   -DBOX_VERSION="\"0.09_plus3\""   -g -Wall -c
     WaitForEvent.cpp -o ../../debug/lib/common/WaitForEvent.o
WaitForEvent.cpp: In member function `void* WaitForEvent::Wait()':
WaitForEvent.cpp:164: error: invalid conversion from `__intptr_t' to
     `void*'
*** Error code 1

I'm testing after adding explicit type casts to the required type.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 13:46:58 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 18 Feb 2006 13:46:58 +0000
Subject: [Box Backup-dev] Re: [Box Backup] readline support on OS X
In-Reply-To: <1140269931.14355.32.camel@avenin.ebourne.me.uk>
References: <C1F981F1-2816-4C10-8AC4-EB76CDFE9FE3@allard.nu> <1140133313.6545.8.camel@avenin.ebourne.me.uk> <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu> <1140220710.14355.21.camel@avenin.ebourne.me.uk> <5550CDC2-F4A1-4FFD-938C-5A4E6B8D107D@allard.nu> <1140269931.14355.32.camel@avenin.ebourne.me.uk>
Message-ID: <36597FC9-E4AC-4659-BB78-03A0AC5B48BC@fluffy.co.uk>

On 18 Feb 2006, at 13:38, Martin Ebourne wrote:

> On Sat, 2006-02-18 at 14:31 +1100, Johan Allard wrote:
>> On 18/02/2006, at 10:58 AM, Martin Ebourne wrote:
>>> ii) Given that Apple is trying to emulate GNU readline then simply
>>> giving --enable-gnu-readline to ./configure should get it working
>>> correctly.
>>
>> It doesn't sadly. I tried this first and regardless that I actually
>> have readline compiled in /opt/local (using darwinports) I couldn't
>> get readline support to be recognized by configure. That's the only
>> reason I decided to patch instead.
>
> In which case we should try and fix that then.
>
> Can you run configure with readline as above and post the config.log
> output compressed?

Works on my Mac OS X installation with -enable-gnu-readline -- but I  
have fink installed, and the BoxPlatform.pm module detects and uses  
this.

Ben






From boxbackup-dev@fluffy.co.uk  Sat Feb 18 13:50:49 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 18 Feb 2006 13:50:49 +0000
Subject: [Box Backup-dev] RC3 compile problems on NetBSD
In-Reply-To: <Pine.LNX.4.62.0602181333590.14656@top.qwarx.com>
References: <Pine.LNX.4.62.0602181333590.14656@top.qwarx.com>
Message-ID: <C469AC7E-F079-4CCF-BC1D-14EDCF5FBE65@fluffy.co.uk>

On 18 Feb 2006, at 13:39, Chris Wilson wrote:

> Hi all,
>
> Trying to test on NetBSD 2.0.2 (GENERIC) i386, I get some compile  
> failures:
>
> g++ -g -Wall   -DBOX_VERSION="\"0.09_plus3\""   -g -Wall -c
>    EventWatchFilesystemObject.cpp -o
>    ../../debug/lib/common/EventWatchFilesystemObject.o
> EventWatchFilesystemObject.cpp: In member function `void
>    EventWatchFilesystemObject::FillInKEvent(kevent&, int) const':
> EventWatchFilesystemObject.cpp:132: error: invalid conversion from  
> `void*'
>    to `int'
> *** Error code 1
>
> g++ -g -Wall   -DBOX_VERSION="\"0.09_plus3\""   -g -Wall -c
>     WaitForEvent.cpp -o ../../debug/lib/common/WaitForEvent.o
> WaitForEvent.cpp: In member function `void* WaitForEvent::Wait()':
> WaitForEvent.cpp:164: error: invalid conversion from `__intptr_t' to
>     `void*'
> *** Error code 1
>
> I'm testing after adding explicit type casts to the required type.


Careful with that -- sounds like a potential API difference.

Ben





From boxbackup-dev@fluffy.co.uk  Sat Feb 18 13:59:38 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 13:59:38 +0000 (GMT)
Subject: [Box Backup-dev] RC3 compile problems on NetBSD
In-Reply-To: <C469AC7E-F079-4CCF-BC1D-14EDCF5FBE65@fluffy.co.uk>
References: <Pine.LNX.4.62.0602181333590.14656@top.qwarx.com>
 <C469AC7E-F079-4CCF-BC1D-14EDCF5FBE65@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602181357300.14656@top.qwarx.com>

Hi Ben,

> Careful with that -- sounds like a potential API difference.

The kqueue man page (on this NetBSD box) says:

      int
      kevent(int kq, const struct kevent *changelist, size_t nchanges,
              struct kevent *eventlist, size_t nevents,
              const struct timespec *timeout);

      EV_SET(&kev, ident, filter, flags, fflags, data, udata);

      [...]

      The kevent structure is defined as:

      struct kevent {
              uintptr_t ident;        /* identifier for this event */
              uint32_t  filter;       /* filter for event */
              uint32_t  flags;        /* action flags for kqueue */
              uint32_t  fflags;       /* filter flag value */
              int64_t   data;         /* filter data value */
              intptr_t  udata;        /* opaque user data identifier */
      };

Does that help? I don't have a kqueue man page on my Linux box to compare 
with.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 14:03:41 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 14:03:41 +0000 (GMT)
Subject: [Box Backup-dev] RC3 test failures on SLES9 ppc64
Message-ID: <Pine.LNX.4.62.0602181343390.14656@top.qwarx.com>

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---1044231485-1194091932-1140270500=:14656
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed
Content-ID: <Pine.LNX.4.62.0602181348481.14656@top.qwarx.com>

Hi all,

Debug tests failing on SuSE Linux Enterprise Server 9, ppc64:

gcc@openpower-linux1(gcc)$ cat /etc/issue
Welcome to SUSE LINUX Enterprise Server 9 (ppc) - Kernel \r (\l).

gcc@openpower-linux1(gcc)$ uname -a
Linux openpower-linux1 2.6.5-7.97-pseries64 #1 SMP Fri Jul 2 14:21:59 UTC
2004 ppc64 ppc64 ppc64 GNU/Linux

common: PASSED
crypto: PASSED
compress: PASSED
basicserver: PASSED
raidfile: FAILED: 6 tests failed
backupstore: PASSED
backupstorefix: FAILED: 12 tests failed
backupstorepatch: PASSED
backupdiff: PASSED
bbackupd: FAILED: 23 tests failed

Logs attached.

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 |
---1044231485-1194091932-1140270500=:14656
Content-Type: APPLICATION/OCTET-STREAM; NAME=raidfile.sles9_ppc64.060218.log.gz
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.62.0602181348200.14656@top.qwarx.com>
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME=raidfile.sles9_ppc64.060218.log.gz

[encoded data, 15494 characters]
IAbIon3/9Q//+O7br1ab/S/erF6d9TDnT/4fO/TeK64LBgA=

---1044231485-1194091932-1140270500=:14656
Content-Type: APPLICATION/OCTET-STREAM; NAME=backupstorefix.sles9_ppc64.060218.log.gz
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.62.0602181403310.14656@top.qwarx.com>
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME=backupstorefix.sles9_ppc64.060218.log.gz

[encoded data, 5185 characters]
VC113H5pY2+y9C3bdfn9+mvF6rCz/wIuWyiLnWIBAA==

---1044231485-1194091932-1140270500=:14656
Content-Type: APPLICATION/OCTET-STREAM; NAME=bbackupd.sles9_ppc64.060218.log.gz
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.62.0602181403311.14656@top.qwarx.com>
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME=bbackupd.sles9_ppc64.060218.log.gz

[encoded data, 5124 characters]

---1044231485-1194091932-1140270500=:14656--

From boxbackup-dev@fluffy.co.uk  Sat Feb 18 14:07:06 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 18 Feb 2006 14:07:06 +0000
Subject: [Box Backup-dev] RC3 compile problems on NetBSD
In-Reply-To: <Pine.LNX.4.62.0602181357300.14656@top.qwarx.com>
References: <Pine.LNX.4.62.0602181333590.14656@top.qwarx.com> <C469AC7E-F079-4CCF-BC1D-14EDCF5FBE65@fluffy.co.uk> <Pine.LNX.4.62.0602181357300.14656@top.qwarx.com>
Message-ID: <7E2685DD-7DF5-41ED-8250-F70D6A5B2A4D@fluffy.co.uk>

On 18 Feb 2006, at 13:59, Chris Wilson wrote:

> Hi Ben,
>
>> Careful with that -- sounds like a potential API difference.
>
> The kqueue man page (on this NetBSD box) says:
>
>      int
>      kevent(int kq, const struct kevent *changelist, size_t nchanges,
>              struct kevent *eventlist, size_t nevents,
>              const struct timespec *timeout);
>
>      EV_SET(&kev, ident, filter, flags, fflags, data, udata);
>
>      [...]
>
>      The kevent structure is defined as:
>
>      struct kevent {
>              uintptr_t ident;        /* identifier for this event */
>              uint32_t  filter;       /* filter for event */
>              uint32_t  flags;        /* action flags for kqueue */
>              uint32_t  fflags;       /* filter flag value */
>              int64_t   data;         /* filter data value */
>              intptr_t  udata;        /* opaque user data identifier */
>      };
>
> Does that help? I don't have a kqueue man page on my Linux box to  
> compare with.

Here's OpenBSD's and Darwin's

   http://www.openbsd.org/cgi-bin/man.cgi?query=kqueue
   http://developer.apple.com/documentation/Darwin/Reference/Manpages/ 
man2/kqueue.2.html

They're all slightly different. I think we need to check we're  
handling this correctly.

Ben




From boxbackup-dev@fluffy.co.uk  Sat Feb 18 14:10:50 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 14:10:50 +0000 (GMT)
Subject: [Box Backup-dev] RC3 compile problems on NetBSD
In-Reply-To: <7E2685DD-7DF5-41ED-8250-F70D6A5B2A4D@fluffy.co.uk>
References: <Pine.LNX.4.62.0602181333590.14656@top.qwarx.com>
 <C469AC7E-F079-4CCF-BC1D-14EDCF5FBE65@fluffy.co.uk>
 <Pine.LNX.4.62.0602181357300.14656@top.qwarx.com>
 <7E2685DD-7DF5-41ED-8250-F70D6A5B2A4D@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602181409570.14656@top.qwarx.com>

Hi Ben,

> They're all slightly different. I think we need to check we're handling 
> this correctly.

NetBSD's is online here:

 	http://netbsd.gw.com/cgi-bin/man-cgi?kqueue++NetBSD-2.0.2

Sorry I don't know anything about kqueue, I would probably make a mess of 
it if I tried to fix it myself.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 15:09:30 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 15:09:30 +0000 (GMT)
Subject: [Box Backup-dev] RC3 Solaris testing
Message-ID: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>

Hi all,

I'm trying to test on Solaris 2.9 on x86, which doesn't have OpenSSL 
installed. I built it myself with the following command:

   ./Configure --openssldir=$HOME/openssl-solaris-x86 solaris-x86-cc

And tried to configure Box thus:

   ./configure --with-ssl-lib=$HOME/openssl-solaris-x86/lib \
     --with-ssl-headers=$HOME/openssl-solaris-x86/include

But configure fails to detect it, with the following error in config.log:

configure:7665: checking for SSL_read in -lssl
configure:7695: g++ -o conftest -g -O2
   -I/home/users/g/gc/gcc/openssl-solaris-x86/include
   -L/home/users/g/gc/gcc/openssl-solaris-x86/lib conftest.cc
   -lssl -lcrypto -lsocket -lnsl -lz -lrt  >&5
Undefined                       first referenced
  symbol                             in file
dlopen                          /home/users/g/gc/gcc/openssl-solaris-x86/lib
/libcrypto.a(dso_dlfcn.o)  (symbol belongs to implicit dependency 
/usr/lib/libdl
.so.1)

If I export LIBS=-ldl first, then it works. Any ideas how to fix this 
properly? Maybe add -ldl to this line in ax_check_ssl.m4?

   AC_CHECK_LIB([ssl], [SSL_read],, [ax_check_ssl_found=no], [-lcrypto])

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 15:19:50 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 15:19:50 +0000 (GMT)
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
Message-ID: <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com>

Hi all,

On Sat, 18 Feb 2006, Chris Wilson wrote:

> If I export LIBS=-ldl first, then it works.

Same on sparc-sun-solaris2.9.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 15:24:31 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 18 Feb 2006 15:24:31 +0000
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
Message-ID: <1140276271.24936.1.camel@avenin.ebourne.me.uk>

On Sat, 2006-02-18 at 15:09 +0000, Chris Wilson wrote:
> Hi all,
> 
> I'm trying to test on Solaris 2.9 on x86, which doesn't have OpenSSL 
> installed. I built it myself with the following command:

Try installing the openssl binary package from the sun package site.
(Sorry, can't remember what it's called.)

I built openssl in my homedir on solaris 2.8 and could only get it to
work linked statically, even then it was still half broke.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 15:27:48 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 15:27:48 +0000 (GMT)
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <1140276271.24936.1.camel@avenin.ebourne.me.uk>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <1140276271.24936.1.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602181527170.14656@top.qwarx.com>

Hi Martin,

> Try installing the openssl binary package from the sun package site.
> (Sorry, can't remember what it's called.)

Can I do that without root access? (which I don't have on these boxes).

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 15:28:19 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Sat, 18 Feb 2006 16:28:19 +0100
Subject: [Box Backup-dev] RC3 Solaris testing
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com> <1140276271.24936.1.camel@avenin.ebourne.me.uk>
Message-ID: <00a201c6349f$f24b1890$0301050a@stenorhem>

>> I'm trying to test on Solaris 2.9 on x86, which doesn't have OpenSSL 
>> installed. I built it myself with the following command:
> 
> Try installing the openssl binary package from the sun package site.
> (Sorry, can't remember what it's called.)

All Sun packages can (and should) be downloaded from www.sunfreeware.com
or one of its mirrors.

Stefan



From boxbackup-dev@fluffy.co.uk  Sat Feb 18 15:43:09 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Sat, 18 Feb 2006 16:43:09 +0100
Subject: [Box Backup-dev] RC3 Solaris testing
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com> <1140276271.24936.1.camel@avenin.ebourne.me.uk> <Pine.LNX.4.62.0602181527170.14656@top.qwarx.com>
Message-ID: <00b501c634a2$04ec7730$0301050a@stenorhem>

> Can I do that without root access? (which I don't have on these boxes).

Oooops, no, do not think that is possible though... since you need to
install them using pkgadd. However, sunfreeware is indeed the "official"
place for Sun freeware so those packages are the ones that should be
used. At least for pre-release testing... /me thinks.

Stefan


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 18:54:43 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 18:54:43 +0000 (GMT)
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <00b501c634a2$04ec7730$0301050a@stenorhem>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <1140276271.24936.1.camel@avenin.ebourne.me.uk> <Pine.LNX.4.62.0602181527170.14656@top.qwarx.com>
 <00b501c634a2$04ec7730$0301050a@stenorhem>
Message-ID: <Pine.LNX.4.62.0602181854000.14656@top.qwarx.com>

Hi all,

>>  Can I do that without root access? (which I don't have on these boxes).
>
> Oooops, no, do not think that is possible though... since you need to
> install them using pkgadd. However, sunfreeware is indeed the "official"
> place for Sun freeware so those packages are the ones that should be
> used. At least for pre-release testing... /me thinks.

Sorry, I have no choice, I don't have root access to this machine. Are the 
test results useful or not? Some tests do fail on Solaris.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 19:00:08 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Sat, 18 Feb 2006 20:00:08 +0100
Subject: [Box Backup-dev] RC3 Solaris testing
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com> <1140276271.24936.1.camel@avenin.ebourne.me.uk> <Pine.LNX.4.62.0602181527170.14656@top.qwarx.com> <00b501c634a2$04ec7730$0301050a@stenorhem> <Pine.LNX.4.62.0602181854000.14656@top.qwarx.com>
Message-ID: <001a01c634bd$89512e60$0301050a@stenorhem>

> Sorry, I have no choice, I don't have root access to this machine. Are the 
> test results useful or not? Some tests do fail on Solaris.

Do not know.

I have run the tests successfully a week ago or so and I will
redo them on Solaris 9 (Sparc), 10 (Sparc) and 10 (x86)
within a day or so.

Stefan


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 19:01:36 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 18 Feb 2006 19:01:36 +0000 (GMT)
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <001a01c634bd$89512e60$0301050a@stenorhem>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <1140276271.24936.1.camel@avenin.ebourne.me.uk> <Pine.LNX.4.62.0602181527170.14656@top.qwarx.com>
 <00b501c634a2$04ec7730$0301050a@stenorhem> <Pine.LNX.4.62.0602181854000.14656@top.qwarx.com>
 <001a01c634bd$89512e60$0301050a@stenorhem>
Message-ID: <Pine.LNX.4.62.0602181900510.14656@top.qwarx.com>

Hi Stefan,

> I have run the tests successfully a week ago or so and I will redo them 
> on Solaris 9 (Sparc), 10 (Sparc) and 10 (x86) within a day or so.

Please do, it's more likely to be representative than my tests, assuming 
you have the official SUNfreeware packages installed.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 18 19:46:05 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Sat, 18 Feb 2006 20:46:05 +0100
Subject: [Box Backup-dev] RC3 Solaris testing
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com> <1140276271.24936.1.camel@avenin.ebourne.me.uk> <Pine.LNX.4.62.0602181527170.14656@top.qwarx.com> <00b501c634a2$04ec7730$0301050a@stenorhem> <Pine.LNX.4.62.0602181854000.14656@top.qwarx.com> <001a01c634bd$89512e60$0301050a@stenorhem> <Pine.LNX.4.62.0602181900510.14656@top.qwarx.com>
Message-ID: <004701c634c3$f4d4ed60$0301050a@stenorhem>

>> I have run the tests successfully a week ago or so and I will redo them 
>> on Solaris 9 (Sparc), 10 (Sparc) and 10 (x86) within a day or so.
> 
> Please do, it's more likely to be representative than my tests, assuming 
> you have the official SUNfreeware packages installed.

My wife looked the other way for a while and I re-ran the debug tests
on Solaris 10 which passed except for the backupdiff 40 sec timeout
assertion which I am used to failing on Solaris.

So, at first glance it seems ok.

Stefan


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 05:01:22 2006
From: boxbackup-dev@fluffy.co.uk (Johan Allard)
Date: Sun, 19 Feb 2006 16:01:22 +1100
Subject: [Box Backup-dev] Re: [Box Backup] readline support on OS X
In-Reply-To: <1140269931.14355.32.camel@avenin.ebourne.me.uk>
References: <C1F981F1-2816-4C10-8AC4-EB76CDFE9FE3@allard.nu> <1140133313.6545.8.camel@avenin.ebourne.me.uk> <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu> <1140220710.14355.21.camel@avenin.ebourne.me.uk> <5550CDC2-F4A1-4FFD-938C-5A4E6B8D107D@allard.nu> <1140269931.14355.32.camel@avenin.ebourne.me.uk>
Message-ID: <8A4FBF8B-4878-478A-A088-A80C3410CACB@allard.nu>

--Apple-Mail-12-956808967
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


On 19/02/2006, at 12:38 AM, Martin Ebourne wrote:

> On Sat, 2006-02-18 at 14:31 +1100, Johan Allard wrote:
>> On 18/02/2006, at 10:58 AM, Martin Ebourne wrote:
>>> ii) Given that Apple is trying to emulate GNU readline then simply
>>> giving --enable-gnu-readline to ./configure should get it working
>>> correctly.
>>
>> It doesn't sadly. I tried this first and regardless that I actually
>> have readline compiled in /opt/local (using darwinports) I couldn't
>> get readline support to be recognized by configure. That's the only
>> reason I decided to patch instead.
>
> In which case we should try and fix that then.
>
> Can you run configure with readline as above and post the config.log
> output compressed?
>
> Cheers,
>
> Martin.
>

Absolutely, here are both the nopatched and the patched version of  
the config.log. The patched is from trunk two days ago.

Cheers

//johan



--Apple-Mail-12-956808967
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="config-nopatch.log"
Content-Disposition: attachment;
	filename=config-nopatch.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by Box Backup configure 0.09, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ ./configure --with-gnu-readline

## --------- ##
## Platform. ##
## --------- ##

hostname = borgcube.allard.nu
uname -m = Power Macintosh
uname -r = 8.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC

/usr/bin/uname -p = powerpc
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = Mach kernel version:
	 Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC
Kernel configured for a single processor only.
1 processor is physically available.
Processor type: ppc7450 (PowerPC 7450)
Processor active: 0
Primary memory available: 1.50 gigabytes
Default processor set: 110 tasks, 396 threads, 1 processors
Load average: 1.80, Mach factor: 0.17
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Users/allard/local/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Volumes/home/local/php/bin
PATH: /Volumes/home/local/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/X11R6/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1401: checking build system type
configure:1419: result: powerpc-apple-darwin8.5.0
configure:1427: checking host system type
configure:1441: result: powerpc-apple-darwin8.5.0
configure:1449: checking target system type
configure:1463: result: powerpc-apple-darwin8.5.0
configure:1539: checking for g++
configure:1555: found /usr/bin/g++
configure:1565: result: g++
configure:1581: checking for C++ compiler version
configure:1584: g++ --version </dev/null >&5
powerpc-apple-darwin8-g++-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc. build 4061)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:1587: $? = 0
configure:1589: g++ -v </dev/null >&5
Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
configure:1592: $? = 0
configure:1594: g++ -V </dev/null >&5
g++: argument to `-V' is missing
configure:1597: $? = 1
configure:1620: checking for C++ compiler default output file name
configure:1623: g++    conftest.cc  >&5
configure:1626: $? = 0
configure:1672: result: a.out
configure:1677: checking whether the C++ compiler works
configure:1683: ./a.out
configure:1686: $? = 0
configure:1703: result: yes
configure:1710: checking whether we are cross compiling
configure:1712: result: no
configure:1715: checking for suffix of executables
configure:1717: g++ -o conftest    conftest.cc  >&5
configure:1720: $? = 0
configure:1745: result: 
configure:1751: checking for suffix of object files
configure:1772: g++ -c   conftest.cc >&5
configure:1775: $? = 0
configure:1797: result: o
configure:1801: checking whether we are using the GNU C++ compiler
configure:1825: g++ -c   conftest.cc >&5
configure:1831: $? = 0
configure:1835: test -z 
			 || test ! -s conftest.err
configure:1838: $? = 0
configure:1841: test -s conftest.o
configure:1844: $? = 0
configure:1857: result: yes
configure:1863: checking whether g++ accepts -g
configure:1884: g++ -c -g  conftest.cc >&5
configure:1890: $? = 0
configure:1894: test -z 
			 || test ! -s conftest.err
configure:1897: $? = 0
configure:1900: test -s conftest.o
configure:1903: $? = 0
configure:1914: result: yes
configure:1956: g++ -c -g -O2  conftest.cc >&5
configure:1962: $? = 0
configure:1966: test -z 
			 || test ! -s conftest.err
configure:1969: $? = 0
configure:1972: test -s conftest.o
configure:1975: $? = 0
configure:2001: g++ -c -g -O2  conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:13: error: 'exit' was not declared in this scope
configure:2007: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:1956: g++ -c -g -O2  conftest.cc >&5
/usr/include/stdlib.h:158: error: 'void exit(int)' conflicts with previous using declaration 'void std::exit(int)'
/usr/include/stdlib.h:158: error: 'void exit(int)' conflicts with used function
conftest.cc:9: error: 'void std::exit(int)' previously declared here
configure:1962: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| /* end confdefs.h.  */
| extern "C" void std::exit (int) throw (); using std::exit;
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:1956: g++ -c -g -O2  conftest.cc >&5
/usr/include/stdlib.h:158: error: 'void exit(int)' conflicts with previous using declaration 'void std::exit(int)'
/usr/include/stdlib.h:158: error: 'void exit(int)' conflicts with used function
conftest.cc:9: error: 'void std::exit(int)' previously declared here
configure:1962: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| /* end confdefs.h.  */
| extern "C" void std::exit (int); using std::exit;
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:1956: g++ -c -g -O2  conftest.cc >&5
/usr/include/stdlib.h:158: error: declaration of 'void exit(int)' throws different exceptions
conftest.cc:9: error: than previous declaration 'void exit(int) throw ()'
configure:1962: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| /* end confdefs.h.  */
| extern "C" void exit (int) throw ();
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:1956: g++ -c -g -O2  conftest.cc >&5
configure:1962: $? = 0
configure:1966: test -z 
			 || test ! -s conftest.err
configure:1969: $? = 0
configure:1972: test -s conftest.o
configure:1975: $? = 0
configure:2001: g++ -c -g -O2  conftest.cc >&5
configure:2007: $? = 0
configure:2011: test -z 
			 || test ! -s conftest.err
configure:2014: $? = 0
configure:2017: test -s conftest.o
configure:2020: $? = 0
configure:2044: checking whether the compiler supports exceptions
configure:2073: g++ -c -g -O2  conftest.cc >&5
configure:2079: $? = 0
configure:2083: test -z 
			 || test ! -s conftest.err
configure:2086: $? = 0
configure:2089: test -s conftest.o
configure:2092: $? = 0
configure:2110: result: yes
configure:2120: checking whether the compiler implements namespaces
configure:2149: g++ -c -g -O2  conftest.cc >&5
configure:2155: $? = 0
configure:2159: test -z 
			 || test ! -s conftest.err
configure:2162: $? = 0
configure:2165: test -s conftest.o
configure:2168: $? = 0
configure:2186: result: yes
configure:2215: checking for library containing nanosleep
configure:2245: g++ -o conftest -g -O2   conftest.cc  >&5
configure:2251: $? = 0
configure:2255: test -z 
			 || test ! -s conftest.err
configure:2258: $? = 0
configure:2261: test -s conftest
configure:2264: $? = 0
configure:2334: result: none required
configure:2347: checking for zlibVersion in -lz
configure:2377: g++ -o conftest -g -O2   conftest.cc -lz   >&5
configure:2383: $? = 0
configure:2387: test -z 
			 || test ! -s conftest.err
configure:2390: $? = 0
configure:2393: test -s conftest
configure:2396: $? = 0
configure:2409: result: yes
configure:2429: checking how to run the C++ preprocessor
configure:2460: g++ -E  conftest.cc
configure:2466: $? = 0
configure:2498: g++ -E  conftest.cc
conftest.cc:15:28: error: ac_nonexistent.h: No such file or directory
configure:2504: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:2543: result: g++ -E
configure:2567: g++ -E  conftest.cc
configure:2573: $? = 0
configure:2605: g++ -E  conftest.cc
conftest.cc:15:28: error: ac_nonexistent.h: No such file or directory
configure:2611: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:2655: checking for egrep
configure:2665: result: grep -E
configure:2670: checking for ANSI C header files
configure:2695: g++ -c -g -O2  conftest.cc >&5
configure:2701: $? = 0
configure:2705: test -z 
			 || test ! -s conftest.err
configure:2708: $? = 0
configure:2711: test -s conftest.o
configure:2714: $? = 0
configure:2800: g++ -o conftest -g -O2   conftest.cc -lz  >&5
configure:2803: $? = 0
configure:2805: ./conftest
configure:2808: $? = 0
configure:2823: result: yes
configure:2847: checking for sys/types.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:2847: checking for sys/stat.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:2847: checking for stdlib.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:2847: checking for string.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:2847: checking for memory.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:2847: checking for strings.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:2847: checking for inttypes.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:2847: checking for stdint.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:2847: checking for unistd.h
configure:2863: g++ -c -g -O2  conftest.cc >&5
configure:2869: $? = 0
configure:2873: test -z 
			 || test ! -s conftest.err
configure:2876: $? = 0
configure:2879: test -s conftest.o
configure:2882: $? = 0
configure:2893: result: yes
configure:3389: checking for editline library
configure:3428: g++ -o conftest -g -O2   conftest.cc -lz  -ledit >&5
configure:3434: $? = 0
configure:3438: test -z 
			 || test ! -s conftest.err
configure:3441: $? = 0
configure:3444: test -s conftest
configure:3447: $? = 0
configure:3471: result: -ledit
configure:3490: checking editline/readline.h usability
configure:3502: g++ -c -g -O2  conftest.cc >&5
conftest.cc:59:31: error: editline/readline.h: No such file or directory
configure:3508: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <editline/readline.h>
configure:3531: result: no
configure:3535: checking editline/readline.h presence
configure:3545: g++ -E  conftest.cc
conftest.cc:25:31: error: editline/readline.h: No such file or directory
configure:3551: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
| #include <editline/readline.h>
configure:3571: result: no
configure:3606: checking for editline/readline.h
configure:3613: result: no
configure:4149: checking for db.h
configure:4184: g++ -o conftest -g -O2   conftest.cc -lz  >&5
configure:4187: $? = 0
configure:4189: ./conftest
configure:4192: $? = 0
configure:4197: result: 1.0.0
configure:4218: checking for library containing Berkeley DB 1.0.0
configure:4282: g++ -o conftest -g -O2   conftest.cc -lz   >&5
configure:4285: $? = 0
configure:4287: ./conftest
configure:4290: $? = 0
configure:5150: result: none required
configure:5480: using Berkeley DB version 1.0.0
configure:7245: checking for library containing gethostbyname
configure:7275: g++ -o conftest -g -O2     conftest.cc  -lz  >&5
configure:7281: $? = 0
configure:7285: test -z 
			 || test ! -s conftest.err
configure:7288: $? = 0
configure:7291: test -s conftest
configure:7294: $? = 0
configure:7364: result: none required
configure:7371: checking for library containing shutdown
configure:7401: g++ -o conftest -g -O2     conftest.cc  -lz  >&5
configure:7407: $? = 0
configure:7411: test -z 
			 || test ! -s conftest.err
configure:7414: $? = 0
configure:7417: test -s conftest
configure:7420: $? = 0
configure:7490: result: none required
configure:7526: checking openssl/ssl.h usability
configure:7538: g++ -c -g -O2   conftest.cc >&5
configure:7544: $? = 0
configure:7548: test -z 
			 || test ! -s conftest.err
configure:7551: $? = 0
configure:7554: test -s conftest.o
configure:7557: $? = 0
configure:7567: result: yes
configure:7571: checking openssl/ssl.h presence
configure:7581: g++ -E   conftest.cc
configure:7587: $? = 0
configure:7607: result: yes
configure:7642: checking for openssl/ssl.h
configure:7649: result: yes
configure:7665: checking for SSL_read in -lssl
configure:7695: g++ -o conftest -g -O2     conftest.cc -lssl -lcrypto  -lz  >&5
configure:7701: $? = 0
configure:7705: test -z 
			 || test ! -s conftest.err
configure:7708: $? = 0
configure:7711: test -s conftest
configure:7714: $? = 0
configure:7727: result: yes
configure:7759: checking for EVP_CipherInit_ex in -lcrypto
configure:7789: g++ -o conftest -g -O2     conftest.cc -lcrypto  -lssl  -lz  >&5
configure:7795: $? = 0
configure:7799: test -z 
			 || test ! -s conftest.err
configure:7802: $? = 0
configure:7805: test -s conftest
configure:7808: $? = 0
configure:7821: result: yes
configure:7861: checking for dirent.h that defines DIR
configure:7885: g++ -c -g -O2   conftest.cc >&5
configure:7891: $? = 0
configure:7895: test -z 
			 || test ! -s conftest.err
configure:7898: $? = 0
configure:7901: test -s conftest.o
configure:7904: $? = 0
configure:7915: result: yes
configure:7928: checking for library containing opendir
configure:7958: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:7964: $? = 0
configure:7968: test -z 
			 || test ! -s conftest.err
configure:7971: $? = 0
configure:7974: test -s conftest
configure:7977: $? = 0
configure:8047: result: none required
configure:8185: checking for ANSI C header files
configure:8338: result: yes
configure:8348: checking for sys/wait.h that is POSIX.1 compatible
configure:8379: g++ -c -g -O2   conftest.cc >&5
configure:8385: $? = 0
configure:8389: test -z 
			 || test ! -s conftest.err
configure:8392: $? = 0
configure:8395: test -s conftest.o
configure:8398: $? = 0
configure:8409: result: yes
configure:8437: checking execinfo.h usability
configure:8449: g++ -c -g -O2   conftest.cc >&5
conftest.cc:70:22: error: execinfo.h: No such file or directory
configure:8455: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <execinfo.h>
configure:8478: result: no
configure:8482: checking execinfo.h presence
configure:8492: g++ -E   conftest.cc
conftest.cc:36:22: error: execinfo.h: No such file or directory
configure:8498: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| /* end confdefs.h.  */
| #include <execinfo.h>
configure:8518: result: no
configure:8553: checking for execinfo.h
configure:8560: result: no
configure:8437: checking process.h usability
configure:8449: g++ -c -g -O2   conftest.cc >&5
conftest.cc:70:21: error: process.h: No such file or directory
configure:8455: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <process.h>
configure:8478: result: no
configure:8482: checking process.h presence
configure:8492: g++ -E   conftest.cc
conftest.cc:36:21: error: process.h: No such file or directory
configure:8498: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| /* end confdefs.h.  */
| #include <process.h>
configure:8518: result: no
configure:8553: checking for process.h
configure:8560: result: no
configure:8437: checking pwd.h usability
configure:8449: g++ -c -g -O2   conftest.cc >&5
configure:8455: $? = 0
configure:8459: test -z 
			 || test ! -s conftest.err
configure:8462: $? = 0
configure:8465: test -s conftest.o
configure:8468: $? = 0
configure:8478: result: yes
configure:8482: checking pwd.h presence
configure:8492: g++ -E   conftest.cc
configure:8498: $? = 0
configure:8518: result: yes
configure:8553: checking for pwd.h
configure:8560: result: yes
configure:8437: checking regex.h usability
configure:8449: g++ -c -g -O2   conftest.cc >&5
configure:8455: $? = 0
configure:8459: test -z 
			 || test ! -s conftest.err
configure:8462: $? = 0
configure:8465: test -s conftest.o
configure:8468: $? = 0
configure:8478: result: yes
configure:8482: checking regex.h presence
configure:8492: g++ -E   conftest.cc
configure:8498: $? = 0
configure:8518: result: yes
configure:8553: checking for regex.h
configure:8560: result: yes
configure:8437: checking signal.h usability
configure:8449: g++ -c -g -O2   conftest.cc >&5
configure:8455: $? = 0
configure:8459: test -z 
			 || test ! -s conftest.err
configure:8462: $? = 0
configure:8465: test -s conftest.o
configure:8468: $? = 0
configure:8478: result: yes
configure:8482: checking signal.h presence
configure:8492: g++ -E   conftest.cc
configure:8498: $? = 0
configure:8518: result: yes
configure:8553: checking for signal.h
configure:8560: result: yes
configure:8588: checking syslog.h usability
configure:8600: g++ -c -g -O2   conftest.cc >&5
configure:8606: $? = 0
configure:8610: test -z 
			 || test ! -s conftest.err
configure:8613: $? = 0
configure:8616: test -s conftest.o
configure:8619: $? = 0
configure:8629: result: yes
configure:8633: checking syslog.h presence
configure:8643: g++ -E   conftest.cc
configure:8649: $? = 0
configure:8669: result: yes
configure:8704: checking for syslog.h
configure:8711: result: yes
configure:8588: checking time.h usability
configure:8600: g++ -c -g -O2   conftest.cc >&5
configure:8606: $? = 0
configure:8610: test -z 
			 || test ! -s conftest.err
configure:8613: $? = 0
configure:8616: test -s conftest.o
configure:8619: $? = 0
configure:8629: result: yes
configure:8633: checking time.h presence
configure:8643: g++ -E   conftest.cc
configure:8649: $? = 0
configure:8669: result: yes
configure:8704: checking for time.h
configure:8711: result: yes
configure:8738: checking netinet/in.h usability
configure:8750: g++ -c -g -O2   conftest.cc >&5
configure:8756: $? = 0
configure:8760: test -z 
			 || test ! -s conftest.err
configure:8763: $? = 0
configure:8766: test -s conftest.o
configure:8769: $? = 0
configure:8779: result: yes
configure:8783: checking netinet/in.h presence
configure:8793: g++ -E   conftest.cc
configure:8799: $? = 0
configure:8819: result: yes
configure:8854: checking for netinet/in.h
configure:8861: result: yes
configure:8892: checking sys/param.h usability
configure:8904: g++ -c -g -O2   conftest.cc >&5
configure:8910: $? = 0
configure:8914: test -z 
			 || test ! -s conftest.err
configure:8917: $? = 0
configure:8920: test -s conftest.o
configure:8923: $? = 0
configure:8933: result: yes
configure:8937: checking sys/param.h presence
configure:8947: g++ -E   conftest.cc
configure:8953: $? = 0
configure:8973: result: yes
configure:9008: checking for sys/param.h
configure:9015: result: yes
configure:8892: checking sys/socket.h usability
configure:8904: g++ -c -g -O2   conftest.cc >&5
configure:8910: $? = 0
configure:8914: test -z 
			 || test ! -s conftest.err
configure:8917: $? = 0
configure:8920: test -s conftest.o
configure:8923: $? = 0
configure:8933: result: yes
configure:8937: checking sys/socket.h presence
configure:8947: g++ -E   conftest.cc
configure:8953: $? = 0
configure:8973: result: yes
configure:9008: checking for sys/socket.h
configure:9015: result: yes
configure:8892: checking sys/time.h usability
configure:8904: g++ -c -g -O2   conftest.cc >&5
configure:8910: $? = 0
configure:8914: test -z 
			 || test ! -s conftest.err
configure:8917: $? = 0
configure:8920: test -s conftest.o
configure:8923: $? = 0
configure:8933: result: yes
configure:8937: checking sys/time.h presence
configure:8947: g++ -E   conftest.cc
configure:8953: $? = 0
configure:8973: result: yes
configure:9008: checking for sys/time.h
configure:9015: result: yes
configure:8883: checking for sys/types.h
configure:8888: result: yes
configure:8883: checking for sys/wait.h
configure:8888: result: yes
configure:9042: checking sys/xattr.h usability
configure:9054: g++ -c -g -O2   conftest.cc >&5
configure:9060: $? = 0
configure:9064: test -z 
			 || test ! -s conftest.err
configure:9067: $? = 0
configure:9070: test -s conftest.o
configure:9073: $? = 0
configure:9083: result: yes
configure:9087: checking sys/xattr.h presence
configure:9097: g++ -E   conftest.cc
configure:9103: $? = 0
configure:9123: result: yes
configure:9158: checking for sys/xattr.h
configure:9165: result: yes
configure:9180: checking for library containing regcomp
configure:9210: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:9216: $? = 0
configure:9220: test -z 
			 || test ! -s conftest.err
configure:9223: $? = 0
configure:9226: test -s conftest
configure:9229: $? = 0
configure:9299: result: none required
configure:9310: checking for u_int8_t
configure:9334: g++ -c -g -O2   conftest.cc >&5
configure:9340: $? = 0
configure:9344: test -z 
			 || test ! -s conftest.err
configure:9347: $? = 0
configure:9350: test -s conftest.o
configure:9353: $? = 0
configure:9364: result: yes
configure:9374: checking for u_int16_t
configure:9398: g++ -c -g -O2   conftest.cc >&5
configure:9404: $? = 0
configure:9408: test -z 
			 || test ! -s conftest.err
configure:9411: $? = 0
configure:9414: test -s conftest.o
configure:9417: $? = 0
configure:9428: result: yes
configure:9438: checking for u_int32_t
configure:9462: g++ -c -g -O2   conftest.cc >&5
configure:9468: $? = 0
configure:9472: test -z 
			 || test ! -s conftest.err
configure:9475: $? = 0
configure:9478: test -s conftest.o
configure:9481: $? = 0
configure:9492: result: yes
configure:9502: checking for u_int64_t
configure:9526: g++ -c -g -O2   conftest.cc >&5
configure:9532: $? = 0
configure:9536: test -z 
			 || test ! -s conftest.err
configure:9539: $? = 0
configure:9542: test -s conftest.o
configure:9545: $? = 0
configure:9556: result: yes
configure:9567: checking for uint8_t
configure:9591: g++ -c -g -O2   conftest.cc >&5
configure:9597: $? = 0
configure:9601: test -z 
			 || test ! -s conftest.err
configure:9604: $? = 0
configure:9607: test -s conftest.o
configure:9610: $? = 0
configure:9621: result: yes
configure:9631: checking for uint16_t
configure:9655: g++ -c -g -O2   conftest.cc >&5
configure:9661: $? = 0
configure:9665: test -z 
			 || test ! -s conftest.err
configure:9668: $? = 0
configure:9671: test -s conftest.o
configure:9674: $? = 0
configure:9685: result: yes
configure:9695: checking for uint32_t
configure:9719: g++ -c -g -O2   conftest.cc >&5
configure:9725: $? = 0
configure:9729: test -z 
			 || test ! -s conftest.err
configure:9732: $? = 0
configure:9735: test -s conftest.o
configure:9738: $? = 0
configure:9749: result: yes
configure:9759: checking for uint64_t
configure:9783: g++ -c -g -O2   conftest.cc >&5
configure:9789: $? = 0
configure:9793: test -z 
			 || test ! -s conftest.err
configure:9796: $? = 0
configure:9799: test -s conftest.o
configure:9802: $? = 0
configure:9813: result: yes
configure:9824: checking for stdbool.h that conforms to C99
configure:9877: g++ -c -g -O2   conftest.cc >&5
configure:9883: $? = 0
configure:9887: test -z 
			 || test ! -s conftest.err
configure:9890: $? = 0
configure:9893: test -s conftest.o
configure:9896: $? = 0
configure:9907: result: yes
configure:9909: checking for _Bool
configure:9933: g++ -c -g -O2   conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:93: error: '_Bool' was not declared in this scope
conftest.cc:93: error: expected primary-expression before ')' token
conftest.cc:93: error: expected `)' before numeric constant
conftest.cc:95: error: '_Bool' was not declared in this scope
configure:9939: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| if ((_Bool *) 0)
|   return 0;
| if (sizeof (_Bool))
|   return 0;
|   ;
|   return 0;
| }
configure:9963: result: no
configure:9982: checking for an ANSI C-conforming const
configure:10049: g++ -c -g -O2   conftest.cc >&5
configure:10055: $? = 0
configure:10059: test -z 
			 || test ! -s conftest.err
configure:10062: $? = 0
configure:10065: test -s conftest.o
configure:10068: $? = 0
configure:10079: result: yes
configure:10089: checking whether byte ordering is bigendian
configure:10116: g++ -c -g -O2   conftest.cc >&5
configure:10122: $? = 0
configure:10126: test -z 
			 || test ! -s conftest.err
configure:10129: $? = 0
configure:10132: test -s conftest.o
configure:10135: $? = 0
configure:10159: g++ -c -g -O2   conftest.cc >&5
configure:10165: $? = 0
configure:10169: test -z 
			 || test ! -s conftest.err
configure:10172: $? = 0
configure:10175: test -s conftest.o
configure:10178: $? = 0
configure:10300: result: yes
configure:10320: checking if non-aligned 16 bit word accesses fail
configure:10355: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:10358: $? = 0
configure:10360: ./conftest
configure:10363: $? = 0
configure:10378: result: no
configure:10387: checking if non-aligned 32 bit word accesses fail
configure:10422: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:10425: $? = 0
configure:10427: ./conftest
configure:10430: $? = 0
configure:10445: result: no
configure:10454: checking if non-aligned 64 bit word accesses fail
configure:10489: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:10492: $? = 0
configure:10494: ./conftest
configure:10497: $? = 0
configure:10512: result: no
configure:10522: checking for uid_t in sys/types.h
configure:10545: result: yes
configure:10560: checking for mode_t
configure:10584: g++ -c -g -O2   conftest.cc >&5
configure:10590: $? = 0
configure:10594: test -z 
			 || test ! -s conftest.err
configure:10597: $? = 0
configure:10600: test -s conftest.o
configure:10603: $? = 0
configure:10614: result: yes
configure:10626: checking for off_t
configure:10650: g++ -c -g -O2   conftest.cc >&5
configure:10656: $? = 0
configure:10660: test -z 
			 || test ! -s conftest.err
configure:10663: $? = 0
configure:10666: test -s conftest.o
configure:10669: $? = 0
configure:10680: result: yes
configure:10692: checking for pid_t
configure:10716: g++ -c -g -O2   conftest.cc >&5
configure:10722: $? = 0
configure:10726: test -z 
			 || test ! -s conftest.err
configure:10729: $? = 0
configure:10732: test -s conftest.o
configure:10735: $? = 0
configure:10746: result: yes
configure:10758: checking for size_t
configure:10782: g++ -c -g -O2   conftest.cc >&5
configure:10788: $? = 0
configure:10792: test -z 
			 || test ! -s conftest.err
configure:10795: $? = 0
configure:10798: test -s conftest.o
configure:10801: $? = 0
configure:10812: result: yes
configure:10824: checking for struct stat.st_flags
configure:10847: g++ -c -g -O2   conftest.cc >&5
configure:10853: $? = 0
configure:10857: test -z 
			 || test ! -s conftest.err
configure:10860: $? = 0
configure:10863: test -s conftest.o
configure:10866: $? = 0
configure:10923: result: yes
configure:10934: checking for struct stat.st_mtimespec
configure:10957: g++ -c -g -O2   conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:97: error: could not convert 'ac_aggr.stat::st_mtimespec' to 'bool'
configure:10963: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| static struct stat ac_aggr;
| if (ac_aggr.st_mtimespec)
| return 0;
|   ;
|   return 0;
| }
configure:11001: g++ -c -g -O2   conftest.cc >&5
configure:11007: $? = 0
configure:11011: test -z 
			 || test ! -s conftest.err
configure:11014: $? = 0
configure:11017: test -s conftest.o
configure:11020: $? = 0
configure:11033: result: yes
configure:11044: checking for struct sockaddr_in.sin_len
configure:11071: g++ -c -g -O2   conftest.cc >&5
configure:11077: $? = 0
configure:11081: test -z 
			 || test ! -s conftest.err
configure:11084: $? = 0
configure:11087: test -s conftest.o
configure:11090: $? = 0
configure:11151: result: yes
configure:11162: checking whether INFTIM is declared
configure:11187: g++ -c -g -O2   conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:67: error: 'INFTIM' was not declared in this scope
configure:11193: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| /* end confdefs.h.  */
| #include <poll.h>
| 
| int
| main ()
| {
| #ifndef INFTIM
|   char *p = (char *) INFTIM;
| #endif
| 
|   ;
|   return 0;
| }
configure:11217: result: no
configure:11235: checking whether SO_PEERCRED is declared
configure:11260: g++ -c -g -O2   conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:68: error: 'SO_PEERCRED' was not declared in this scope
configure:11266: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| /* end confdefs.h.  */
| #include <sys/socket.h>
| 
| int
| main ()
| {
| #ifndef SO_PEERCRED
|   char *p = (char *) SO_PEERCRED;
| #endif
| 
|   ;
|   return 0;
| }
configure:11290: result: no
configure:11308: checking whether time.h and sys/time.h may both be included
configure:11333: g++ -c -g -O2   conftest.cc >&5
configure:11339: $? = 0
configure:11343: test -z 
			 || test ! -s conftest.err
configure:11346: $? = 0
configure:11349: test -s conftest.o
configure:11352: $? = 0
configure:11363: result: yes
configure:11373: checking whether struct tm is in sys/time.h or time.h
configure:11396: g++ -c -g -O2   conftest.cc >&5
configure:11402: $? = 0
configure:11406: test -z 
			 || test ! -s conftest.err
configure:11409: $? = 0
configure:11412: test -s conftest.o
configure:11415: $? = 0
configure:11426: result: time.h
configure:11437: checking for struct dirent.d_type
configure:11461: g++ -c -g -O2   conftest.cc >&5
configure:11467: $? = 0
configure:11471: test -z 
			 || test ! -s conftest.err
configure:11474: $? = 0
configure:11477: test -s conftest.o
configure:11480: $? = 0
configure:11538: result: yes
configure:11550: checking whether struct dirent.d_type is valid
configure:11586: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:11589: $? = 0
configure:11591: ./conftest
configure:11594: $? = 0
configure:11609: result: yes
configure:11632: checking for special C compiler options needed for large files
configure:11667: g++ -c -g -O2   conftest.cc >&5
configure:11673: $? = 0
configure:11677: test -z 
			 || test ! -s conftest.err
configure:11680: $? = 0
configure:11683: test -s conftest.o
configure:11686: $? = 0
configure:11731: result: no
configure:11737: checking for _FILE_OFFSET_BITS value needed for large files
configure:11768: g++ -c -g -O2   conftest.cc >&5
configure:11774: $? = 0
configure:11778: test -z 
			 || test ! -s conftest.err
configure:11781: $? = 0
configure:11784: test -s conftest.o
configure:11787: $? = 0
configure:11852: result: no
configure:11862: checking for _LARGE_FILES value needed for large files
configure:11893: g++ -c -g -O2   conftest.cc >&5
configure:11899: $? = 0
configure:11903: test -z 
			 || test ! -s conftest.err
configure:11906: $? = 0
configure:11909: test -s conftest.o
configure:11912: $? = 0
configure:11977: result: no
configure:11990: checking whether LLONG_MAX is declared
configure:12015: g++ -c -g -O2   conftest.cc >&5
configure:12021: $? = 0
configure:12025: test -z 
			 || test ! -s conftest.err
configure:12028: $? = 0
configure:12031: test -s conftest.o
configure:12034: $? = 0
configure:12045: result: yes
configure:12149: checking for pre-processor pragma defines
configure:12166: g++ -c -g -O2   conftest.cc >&5
conftest.cc:68: error: invalid token
conftest.cc:68: error: 'pragma' does not name a type
configure:12172: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| /* end confdefs.h.  */
| 
|         #define TEST_DEFINE #pragma pack(1)
|         TEST_DEFINE
| 
configure:12197: result: no
configure:12516: checking for "/dev/urandom"
configure:12531: result: yes
configure:12605: checking for getmntent
configure:12662: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
/usr/bin/ld: Undefined symbols:
_getmntent
collect2: ld returned 1 exit status
configure:12668: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| /* end confdefs.h.  */
| /* Define getmntent to an innocuous variant, in case <limits.h> declares getmntent.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define getmntent innocuous_getmntent
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char getmntent (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef getmntent
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char getmntent ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_getmntent) || defined (__stub___getmntent)
| choke me
| #else
| char (*f) () = getmntent;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != getmntent;
|   ;
|   return 0;
| }
configure:12693: result: no
configure:12605: checking for statfs
configure:12662: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:12668: $? = 0
configure:12672: test -z 
			 || test ! -s conftest.err
configure:12675: $? = 0
configure:12678: test -s conftest
configure:12681: $? = 0
configure:12693: result: yes
configure:12708: checking for sys/param.h
configure:12713: result: yes
configure:12859: checking for mntent.h
configure:12880: g++ -c -g -O2   conftest.cc >&5
conftest.cc:77:20: error: mntent.h: No such file or directory
configure:12886: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| /* end confdefs.h.  */
| 
|     #include <stdio.h>
|     #ifdef HAVE_SYS_PARAM_H
|       #include <sys/param.h>
|     #endif
| 
| 
| #include <mntent.h>
configure:12910: result: no
configure:12859: checking for sys/mnttab.h
configure:12880: g++ -c -g -O2   conftest.cc >&5
conftest.cc:77:24: error: sys/mnttab.h: No such file or directory
configure:12886: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| /* end confdefs.h.  */
| 
|     #include <stdio.h>
|     #ifdef HAVE_SYS_PARAM_H
|       #include <sys/param.h>
|     #endif
| 
| 
| #include <sys/mnttab.h>
configure:12910: result: no
configure:12859: checking for sys/mount.h
configure:12880: g++ -c -g -O2   conftest.cc >&5
configure:12886: $? = 0
configure:12890: test -z 
			 || test ! -s conftest.err
configure:12893: $? = 0
configure:12896: test -s conftest.o
configure:12899: $? = 0
configure:12910: result: yes
configure:12922: checking for struct statfs.f_mntonname
configure:12951: g++ -c -g -O2   conftest.cc >&5
configure:12957: $? = 0
configure:12961: test -z 
			 || test ! -s conftest.err
configure:12964: $? = 0
configure:12967: test -s conftest.o
configure:12970: $? = 0
configure:13033: result: yes
configure:13045: checking for struct mntent.mnt_dir
configure:13069: g++ -c -g -O2   conftest.cc >&5
conftest.cc:72:20: error: mntent.h: No such file or directory
conftest.cc: In function `int main()':
conftest.cc:77: error: aggregate 'mntent ac_aggr' has incomplete type and cannot be defined
conftest.cc:77: error: storage size of 'ac_aggr' isn't known
configure:13075: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| /* end confdefs.h.  */
| #include <mntent.h>
| 
| int
| main ()
| {
| static struct mntent ac_aggr;
| if (ac_aggr.mnt_dir)
| return 0;
|   ;
|   return 0;
| }
configure:13114: g++ -c -g -O2   conftest.cc >&5
conftest.cc:72:20: error: mntent.h: No such file or directory
conftest.cc: In function `int main()':
conftest.cc:77: error: aggregate 'mntent ac_aggr' has incomplete type and cannot be defined
conftest.cc:77: error: storage size of 'ac_aggr' isn't known
configure:13120: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| /* end confdefs.h.  */
| #include <mntent.h>
| 
| int
| main ()
| {
| static struct mntent ac_aggr;
| if (sizeof ac_aggr.mnt_dir)
| return 0;
|   ;
|   return 0;
| }
configure:13146: result: no
configure:13158: checking for struct mnttab.mnt_mountp
configure:13185: g++ -c -g -O2   conftest.cc >&5
conftest.cc:74:28: error: sys/mnttab.h: No such file or directory
conftest.cc: In function `int main()':
conftest.cc:80: error: aggregate 'mnttab ac_aggr' has incomplete type and cannot be defined
conftest.cc:80: error: storage size of 'ac_aggr' isn't known
configure:13191: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| /* end confdefs.h.  */
| 
|     #include <stdio.h>
|     #include <sys/mnttab.h>
| 
| 
| int
| main ()
| {
| static struct mnttab ac_aggr;
| if (ac_aggr.mnt_mountp)
| return 0;
|   ;
|   return 0;
| }
configure:13233: g++ -c -g -O2   conftest.cc >&5
conftest.cc:74:28: error: sys/mnttab.h: No such file or directory
conftest.cc: In function `int main()':
conftest.cc:80: error: aggregate 'mnttab ac_aggr' has incomplete type and cannot be defined
conftest.cc:80: error: storage size of 'ac_aggr' isn't known
configure:13239: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| /* end confdefs.h.  */
| 
|     #include <stdio.h>
|     #include <sys/mnttab.h>
| 
| 
| int
| main ()
| {
| static struct mnttab ac_aggr;
| if (sizeof ac_aggr.mnt_mountp)
| return 0;
|   ;
|   return 0;
| }
configure:13265: result: no
configure:13297: checking for gcc version 3 or later
configure:13315: g++ -c -g -O2   conftest.cc >&5
configure:13321: $? = 0
configure:13325: test -z 
			 || test ! -s conftest.err
configure:13328: $? = 0
configure:13331: test -s conftest.o
configure:13334: $? = 0
configure:13346: result: yes
configure:13423: checking whether closedir returns void
configure:13452: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:13455: $? = 0
configure:13457: ./conftest
configure:13460: $? = 0
configure:13474: result: no
configure:13484: checking for error_at_line
configure:13505: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
conftest.cc: In function `int main()':
conftest.cc:110: error: 'error_at_line' was not declared in this scope
configure:13511: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| error_at_line (0, 0, "", 0, "");
|   ;
|   return 0;
| }
configure:13536: result: no
configure:13549: checking return type of signal handlers
configure:13580: g++ -c -g -O2   conftest.cc >&5
configure:13586: $? = 0
configure:13590: test -z 
			 || test ! -s conftest.err
configure:13593: $? = 0
configure:13596: test -s conftest.o
configure:13599: $? = 0
configure:13610: result: void
configure:13618: checking whether lstat dereferences a symlink specified with a trailing slash
configure:13649: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:13652: $? = 0
configure:13654: ./conftest
configure:13657: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| struct stat sbuf;
|      /* Linux will dereference the symlink and fail.
| 	That is better in the sense that it means we will not
| 	have to compile and use the lstat wrapper.  */
|      exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);
|   ;
|   return 0;
| }
configure:13678: result: no
configure:13699: checking whether stat accepts an empty string
configure:13724: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:13727: $? = 0
configure:13729: ./conftest
configure:13732: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| struct stat sbuf;
|   exit (stat ("", &sbuf) ? 1 : 0);
|   ;
|   return 0;
| }
configure:13746: result: no
configure:13772: checking for getpeereid
configure:13829: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:13835: $? = 0
configure:13839: test -z 
			 || test ! -s conftest.err
configure:13842: $? = 0
configure:13845: test -s conftest
configure:13848: $? = 0
configure:13860: result: yes
configure:13772: checking for kqueue
configure:13829: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:13835: $? = 0
configure:13839: test -z 
			 || test ! -s conftest.err
configure:13842: $? = 0
configure:13845: test -s conftest
configure:13848: $? = 0
configure:13860: result: yes
configure:13772: checking for lchown
configure:13829: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:13835: $? = 0
configure:13839: test -z 
			 || test ! -s conftest.err
configure:13842: $? = 0
configure:13845: test -s conftest
configure:13848: $? = 0
configure:13860: result: yes
configure:13772: checking for setproctitle
configure:13829: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
/usr/bin/ld: Undefined symbols:
_setproctitle
collect2: ld returned 1 exit status
configure:13835: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| /* end confdefs.h.  */
| /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define setproctitle innocuous_setproctitle
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char setproctitle (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef setproctitle
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char setproctitle ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
| choke me
| #else
| char (*f) () = setproctitle;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != setproctitle;
|   ;
|   return 0;
| }
configure:13860: result: no
configure:13772: checking for getpid
configure:13829: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:13835: $? = 0
configure:13839: test -z 
			 || test ! -s conftest.err
configure:13842: $? = 0
configure:13845: test -s conftest
configure:13848: $? = 0
configure:13860: result: yes
configure:13886: checking sys/syscall.h usability
configure:13898: g++ -c -g -O2   conftest.cc >&5
configure:13904: $? = 0
configure:13908: test -z 
			 || test ! -s conftest.err
configure:13911: $? = 0
configure:13914: test -s conftest.o
configure:13917: $? = 0
configure:13927: result: yes
configure:13931: checking sys/syscall.h presence
configure:13941: g++ -E   conftest.cc
configure:13947: $? = 0
configure:13967: result: yes
configure:14002: checking for sys/syscall.h
configure:14009: result: yes
configure:13877: checking for unistd.h
configure:13882: result: yes
configure:14027: checking for syscall
configure:14084: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:14090: $? = 0
configure:14094: test -z 
			 || test ! -s conftest.err
configure:14097: $? = 0
configure:14100: test -s conftest
configure:14103: $? = 0
configure:14115: result: yes
configure:14027: checking for __syscall
configure:14084: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
/usr/bin/ld: Undefined symbols:
___syscall
collect2: ld returned 1 exit status
configure:14090: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| #define HAVE_GETPID 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYSCALL 1
| /* end confdefs.h.  */
| /* Define __syscall to an innocuous variant, in case <limits.h> declares __syscall.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define __syscall innocuous___syscall
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char __syscall (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef __syscall
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char __syscall ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub___syscall) || defined (__stub_____syscall)
| choke me
| #else
| char (*f) () = __syscall;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != __syscall;
|   ;
|   return 0;
| }
configure:14115: result: no
configure:14200: checking whether syscall lseek requires dummy parameter
configure:14249: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:14252: $? = 0
configure:14254: ./conftest
configure:14257: $? = 0
configure:14272: result: yes
configure:14296: checking for listxattr
configure:14353: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:14359: $? = 0
configure:14363: test -z 
			 || test ! -s conftest.err
configure:14366: $? = 0
configure:14369: test -s conftest
configure:14372: $? = 0
configure:14384: result: yes
configure:14296: checking for llistxattr
configure:14353: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
/usr/bin/ld: Undefined symbols:
_llistxattr
collect2: ld returned 1 exit status
configure:14359: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| #define HAVE_GETPID 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYSCALL 1
| #define HAVE_LSEEK_DUMMY_PARAM 1
| #define HAVE_LISTXATTR 1
| /* end confdefs.h.  */
| /* Define llistxattr to an innocuous variant, in case <limits.h> declares llistxattr.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define llistxattr innocuous_llistxattr
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char llistxattr (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef llistxattr
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char llistxattr ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_llistxattr) || defined (__stub___llistxattr)
| choke me
| #else
| char (*f) () = llistxattr;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != llistxattr;
|   ;
|   return 0;
| }
configure:14384: result: no
configure:14296: checking for getxattr
configure:14353: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:14359: $? = 0
configure:14363: test -z 
			 || test ! -s conftest.err
configure:14366: $? = 0
configure:14369: test -s conftest
configure:14372: $? = 0
configure:14384: result: yes
configure:14296: checking for lgetxattr
configure:14353: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
/usr/bin/ld: Undefined symbols:
_lgetxattr
collect2: ld returned 1 exit status
configure:14359: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| #define HAVE_GETPID 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYSCALL 1
| #define HAVE_LSEEK_DUMMY_PARAM 1
| #define HAVE_LISTXATTR 1
| #define HAVE_GETXATTR 1
| /* end confdefs.h.  */
| /* Define lgetxattr to an innocuous variant, in case <limits.h> declares lgetxattr.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define lgetxattr innocuous_lgetxattr
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char lgetxattr (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef lgetxattr
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char lgetxattr ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_lgetxattr) || defined (__stub___lgetxattr)
| choke me
| #else
| char (*f) () = lgetxattr;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != lgetxattr;
|   ;
|   return 0;
| }
configure:14384: result: no
configure:14296: checking for setxattr
configure:14353: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:14359: $? = 0
configure:14363: test -z 
			 || test ! -s conftest.err
configure:14366: $? = 0
configure:14369: test -s conftest
configure:14372: $? = 0
configure:14384: result: yes
configure:14296: checking for lsetxattr
configure:14353: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
/usr/bin/ld: Undefined symbols:
_lsetxattr
collect2: ld returned 1 exit status
configure:14359: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| #define HAVE_GETPID 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYSCALL 1
| #define HAVE_LSEEK_DUMMY_PARAM 1
| #define HAVE_LISTXATTR 1
| #define HAVE_GETXATTR 1
| #define HAVE_SETXATTR 1
| /* end confdefs.h.  */
| /* Define lsetxattr to an innocuous variant, in case <limits.h> declares lsetxattr.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define lsetxattr innocuous_lsetxattr
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char lsetxattr (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef lsetxattr
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char lsetxattr ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_lsetxattr) || defined (__stub___lsetxattr)
| choke me
| #else
| char (*f) () = lsetxattr;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != lsetxattr;
|   ;
|   return 0;
| }
configure:14384: result: no
configure:14394: checking whether XATTR_NOFOLLOW is declared
configure:14419: g++ -c -g -O2   conftest.cc >&5
configure:14425: $? = 0
configure:14429: test -z 
			 || test ! -s conftest.err
configure:14432: $? = 0
configure:14435: test -s conftest.o
configure:14438: $? = 0
configure:14449: result: yes
configure:14473: checking if we have large file support enabled
configure:14503: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:14506: $? = 0
configure:14508: ./conftest
configure:14511: $? = 0
configure:14526: result: yes
configure:14534: checking for flock
configure:14591: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  >&5
configure:14597: $? = 0
configure:14601: test -z 
			 || test ! -s conftest.err
configure:14604: $? = 0
configure:14607: test -s conftest
configure:14610: $? = 0
configure:14622: result: yes
configure:14632: checking whether O_EXLOCK is declared
configure:14657: g++ -c -g -O2   conftest.cc >&5
configure:14663: $? = 0
configure:14667: test -z 
			 || test ! -s conftest.err
configure:14670: $? = 0
configure:14673: test -s conftest.o
configure:14676: $? = 0
configure:14687: result: yes
configure:14705: checking whether F_SETLK is declared
configure:14730: g++ -c -g -O2   conftest.cc >&5
configure:14736: $? = 0
configure:14740: test -z 
			 || test ! -s conftest.err
configure:14743: $? = 0
configure:14746: test -s conftest.o
configure:14749: $? = 0
configure:14760: result: yes
configure:14997: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by Box Backup config.status 0.09, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = 
  CONFIG_HEADERS  = 
  CONFIG_LINKS    = 
  CONFIG_COMMANDS = 
  $ ./config.status 

on borgcube.allard.nu

config.status:657: creating infrastructure/BoxPlatform.pm
config.status:760: creating lib/common/BoxConfig.h

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=powerpc-apple-darwin8.5.0
ac_cv_build_alias=powerpc-apple-darwin8.5.0
ac_cv_c_bigendian=yes
ac_cv_c_const=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_cxx_exceptions=yes
ac_cv_cxx_namespaces=yes
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_file___dev_urandom_=yes
ac_cv_func___syscall=no
ac_cv_func_closedir_void=no
ac_cv_func_flock=yes
ac_cv_func_getmntent=no
ac_cv_func_getpeereid=yes
ac_cv_func_getpid=yes
ac_cv_func_getxattr=yes
ac_cv_func_kqueue=yes
ac_cv_func_lchown=yes
ac_cv_func_lgetxattr=no
ac_cv_func_listxattr=yes
ac_cv_func_llistxattr=no
ac_cv_func_lsetxattr=no
ac_cv_func_lstat_dereferences_slashed_symlink=no
ac_cv_func_setproctitle=no
ac_cv_func_setxattr=yes
ac_cv_func_stat_empty_string_bug=no
ac_cv_func_statfs=yes
ac_cv_func_syscall=yes
ac_cv_have_decl_F_SETLK=yes
ac_cv_have_decl_INFTIM=no
ac_cv_have_decl_LLONG_MAX=yes
ac_cv_have_decl_O_EXLOCK=yes
ac_cv_have_decl_SO_PEERCRED=no
ac_cv_have_decl_XATTR_NOFOLLOW=yes
ac_cv_header_dirent_dirent_h=yes
ac_cv_header_editline_readline_h=no
ac_cv_header_execinfo_h=no
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_mntent_h=no
ac_cv_header_netinet_in_h=yes
ac_cv_header_openssl_ssl_h=yes
ac_cv_header_process_h=no
ac_cv_header_pwd_h=yes
ac_cv_header_regex_h=yes
ac_cv_header_signal_h=yes
ac_cv_header_stdbool_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_mnttab_h=no
ac_cv_header_sys_mount_h=yes
ac_cv_header_sys_param_h=yes
ac_cv_header_sys_socket_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_syscall_h=yes
ac_cv_header_sys_time_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_sys_wait_h=yes
ac_cv_header_sys_xattr_h=yes
ac_cv_header_syslog_h=yes
ac_cv_header_time=yes
ac_cv_header_time_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=powerpc-apple-darwin8.5.0
ac_cv_host_alias=powerpc-apple-darwin8.5.0
ac_cv_lib_crypto_EVP_CipherInit_ex=yes
ac_cv_lib_error_at_line=no
ac_cv_lib_ssl_SSL_read=yes
ac_cv_lib_z_zlibVersion=yes
ac_cv_member_struct_dirent_d_type=yes
ac_cv_member_struct_mntent_mnt_dir=no
ac_cv_member_struct_mnttab_mnt_mountp=no
ac_cv_member_struct_sockaddr_in_sin_len=yes
ac_cv_member_struct_stat_st_flags=yes
ac_cv_member_struct_stat_st_mtimespec=yes
ac_cv_member_struct_statfs_f_mntonname=yes
ac_cv_objext=o
ac_cv_prog_CXXCPP='g++ -E'
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_cxx_g=yes
ac_cv_prog_egrep='grep -E'
ac_cv_search_gethostbyname='none required'
ac_cv_search_nanosleep='none required'
ac_cv_search_opendir='none required'
ac_cv_search_regcomp='none required'
ac_cv_search_shutdown='none required'
ac_cv_struct_tm=time.h
ac_cv_sys_file_offset_bits=no
ac_cv_sys_large_files=no
ac_cv_sys_largefile_CC=no
ac_cv_target=powerpc-apple-darwin8.5.0
ac_cv_target_alias=powerpc-apple-darwin8.5.0
ac_cv_type__Bool=no
ac_cv_type_mode_t=yes
ac_cv_type_off_t=yes
ac_cv_type_pid_t=yes
ac_cv_type_signal=void
ac_cv_type_size_t=yes
ac_cv_type_u_int16_t=yes
ac_cv_type_u_int32_t=yes
ac_cv_type_u_int64_t=yes
ac_cv_type_u_int8_t=yes
ac_cv_type_uid_t=yes
ac_cv_type_uint16_t=yes
ac_cv_type_uint32_t=yes
ac_cv_type_uint64_t=yes
ac_cv_type_uint8_t=yes
vl_cv_lib_editline=-ledit
vl_cv_lib_readline_compat_found=no

## ----------------- ##
## Output variables. ##
## ----------------- ##

CPPFLAGS=' '
CXX='g++'
CXXCPP='g++ -E'
CXXFLAGS='-g -O2'
CXXFLAGS_STRICT='-Wall'
DEFS='-DHAVE_CONFIG_H'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='grep -E'
EXEEXT=''
LDADD_RDYNAMIC='-rdynamic'
LDFLAGS=' '
LIBOBJS=' error$U.o lstat$U.o'
LIBS='-lcrypto -lssl  -lz '
LTLIBOBJS=' error$U.lo lstat$U.lo'
OBJEXT='o'
PACKAGE_BUGREPORT='box@fluffy.co.uk'
PACKAGE_NAME='Box Backup'
PACKAGE_STRING='Box Backup 0.09'
PACKAGE_TARNAME='box-backup'
PACKAGE_VERSION='0.09'
PATH_SEPARATOR=':'
RANDOM_DEVICE='/dev/urandom'
SHELL='/bin/sh'
ac_ct_CXX='g++'
bindir='${exec_prefix}/bin'
bindir_expanded='/usr/local/bin'
build='powerpc-apple-darwin8.5.0'
build_alias=''
build_cpu='powerpc'
build_os='darwin8.5.0'
build_vendor='apple'
datadir='${prefix}/share'
exec_prefix='${prefix}'
host='powerpc-apple-darwin8.5.0'
host_alias=''
host_cpu='powerpc'
host_os='darwin8.5.0'
host_vendor='apple'
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/usr/local'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='powerpc-apple-darwin8.5.0'
target_alias=''
target_cpu='powerpc'
target_os='darwin8.5.0'
target_vendor='apple'

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define BDB_VERSION_MAJOR 1
#define BDB_VERSION_MINOR 0
#define BDB_VERSION_POINT 0
#define HAVE_DB_H 1
#define HAVE_DECL_F_SETLK 1
#define HAVE_DECL_INFTIM 0
#define HAVE_DECL_O_EXLOCK 1
#define HAVE_DECL_SO_PEERCRED 0
#define HAVE_DECL_XATTR_NOFOLLOW 1
#define HAVE_DIRENT_H 1
#define HAVE_EXCEPTIONS
#define HAVE_FLOCK 1
#define HAVE_GETPEEREID 1
#define HAVE_GETPID 1
#define HAVE_GETXATTR 1
#define HAVE_INTTYPES_H 1
#define HAVE_KQUEUE 1
#define HAVE_LCHOWN 1
#define HAVE_LIBCRYPTO 1
#define HAVE_LIBSSL 1
#define HAVE_LIBZ 1
#define HAVE_LISTXATTR 1
#define HAVE_LSEEK_DUMMY_PARAM 1
#define HAVE_MEMORY_H 1
#define HAVE_MOUNTS 1
#define HAVE_NAMESPACES
#define HAVE_NETINET_IN_H 1
#define HAVE_OPENSSL_SSL_H 1
#define HAVE_PWD_H 1
#define HAVE_RANDOM_DEVICE 1
#define HAVE_REGEX_H 1
#define HAVE_SETXATTR 1
#define HAVE_SIGNAL_H 1
#define HAVE_SSL 1
#define HAVE_STATFS 1
#define HAVE_STDBOOL_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_STRUCT_DIRENT_D_TYPE 1
#define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
#define HAVE_STRUCT_STATFS_F_MNTONNAME 1
#define HAVE_STRUCT_STAT_ST_FLAGS 1
#define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
#define HAVE_SYSCALL 1
#define HAVE_SYSLOG_H 1
#define HAVE_SYS_MOUNT_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_SYSCALL_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_SYS_XATTR_H 1
#define HAVE_TIME_H 1
#define HAVE_UINT16_T 1
#define HAVE_UINT32_T 1
#define HAVE_UINT64_T 1
#define HAVE_UINT8_T 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define HAVE_U_INT16_T 1
#define HAVE_U_INT32_T 1
#define HAVE_U_INT64_T 1
#define HAVE_U_INT8_T 1
#define HAVE_VALID_DIRENT_D_TYPE 1
#define PACKAGE_BUGREPORT "box@fluffy.co.uk"
#define PACKAGE_NAME "Box Backup"
#define PACKAGE_STRING "Box Backup 0.09"
#define PACKAGE_TARNAME "box-backup"
#define PACKAGE_VERSION "0.09"
#define RANDOM_DEVICE "/dev/urandom"
#define RETSIGTYPE void
#define STDC_HEADERS 1
#define STDC_HEADERS 1
#define TEMP_DIRECTORY_NAME "/tmp"
#define TIME_WITH_SYS_TIME 1
#define WORDS_BIGENDIAN 1
#endif
#ifdef __cplusplus
extern "C" void exit (int);

configure: exit 0

--Apple-Mail-12-956808967
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="config.log"
Content-Disposition: attachment;
	filename=config.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by Box Backup configure 0.09, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = borgcube.allard.nu
uname -m = Power Macintosh
uname -r = 8.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC

/usr/bin/uname -p = powerpc
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = Mach kernel version:
	 Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC
Kernel configured for a single processor only.
1 processor is physically available.
Processor type: ppc7450 (PowerPC 7450)
Processor active: 0
Primary memory available: 1.50 gigabytes
Default processor set: 104 tasks, 309 threads, 1 processors
Load average: 1.72, Mach factor: 0.47
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Users/allard/local/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Volumes/home/local/php/bin
PATH: /Volumes/home/local/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/X11R6/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1363: checking build system type
configure:1381: result: powerpc-apple-darwin8.5.0
configure:1389: checking host system type
configure:1403: result: powerpc-apple-darwin8.5.0
configure:1411: checking target system type
configure:1425: result: powerpc-apple-darwin8.5.0
configure:1501: checking for g++
configure:1517: found /usr/bin/g++
configure:1527: result: g++
configure:1543: checking for C++ compiler version
configure:1546: g++ --version </dev/null >&5
powerpc-apple-darwin8-g++-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc. build 4061)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:1549: $? = 0
configure:1551: g++ -v </dev/null >&5
Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
configure:1554: $? = 0
configure:1556: g++ -V </dev/null >&5
g++: argument to `-V' is missing
configure:1559: $? = 1
configure:1582: checking for C++ compiler default output file name
configure:1585: g++    conftest.cc  >&5
configure:1588: $? = 0
configure:1634: result: a.out
configure:1639: checking whether the C++ compiler works
configure:1645: ./a.out
configure:1648: $? = 0
configure:1665: result: yes
configure:1672: checking whether we are cross compiling
configure:1674: result: no
configure:1677: checking for suffix of executables
configure:1679: g++ -o conftest    conftest.cc  >&5
configure:1682: $? = 0
configure:1707: result: 
configure:1713: checking for suffix of object files
configure:1734: g++ -c   conftest.cc >&5
configure:1737: $? = 0
configure:1759: result: o
configure:1763: checking whether we are using the GNU C++ compiler
configure:1787: g++ -c   conftest.cc >&5
configure:1793: $? = 0
configure:1797: test -z 
			 || test ! -s conftest.err
configure:1800: $? = 0
configure:1803: test -s conftest.o
configure:1806: $? = 0
configure:1819: result: yes
configure:1825: checking whether g++ accepts -g
configure:1846: g++ -c -g  conftest.cc >&5
configure:1852: $? = 0
configure:1856: test -z 
			 || test ! -s conftest.err
configure:1859: $? = 0
configure:1862: test -s conftest.o
configure:1865: $? = 0
configure:1876: result: yes
configure:1918: g++ -c -g -O2  conftest.cc >&5
configure:1924: $? = 0
configure:1928: test -z 
			 || test ! -s conftest.err
configure:1931: $? = 0
configure:1934: test -s conftest.o
configure:1937: $? = 0
configure:1963: g++ -c -g -O2  conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:13: error: 'exit' was not declared in this scope
configure:1969: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:1918: g++ -c -g -O2  conftest.cc >&5
/usr/include/stdlib.h:158: error: 'void exit(int)' conflicts with previous using declaration 'void std::exit(int)'
/usr/include/stdlib.h:158: error: 'void exit(int)' conflicts with used function
conftest.cc:9: error: 'void std::exit(int)' previously declared here
configure:1924: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| /* end confdefs.h.  */
| extern "C" void std::exit (int) throw (); using std::exit;
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:1918: g++ -c -g -O2  conftest.cc >&5
/usr/include/stdlib.h:158: error: 'void exit(int)' conflicts with previous using declaration 'void std::exit(int)'
/usr/include/stdlib.h:158: error: 'void exit(int)' conflicts with used function
conftest.cc:9: error: 'void std::exit(int)' previously declared here
configure:1924: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| /* end confdefs.h.  */
| extern "C" void std::exit (int); using std::exit;
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:1918: g++ -c -g -O2  conftest.cc >&5
/usr/include/stdlib.h:158: error: declaration of 'void exit(int)' throws different exceptions
conftest.cc:9: error: than previous declaration 'void exit(int) throw ()'
configure:1924: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| /* end confdefs.h.  */
| extern "C" void exit (int) throw ();
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:1918: g++ -c -g -O2  conftest.cc >&5
configure:1924: $? = 0
configure:1928: test -z 
			 || test ! -s conftest.err
configure:1931: $? = 0
configure:1934: test -s conftest.o
configure:1937: $? = 0
configure:1963: g++ -c -g -O2  conftest.cc >&5
configure:1969: $? = 0
configure:1973: test -z 
			 || test ! -s conftest.err
configure:1976: $? = 0
configure:1979: test -s conftest.o
configure:1982: $? = 0
configure:2006: checking whether the compiler supports exceptions
configure:2035: g++ -c -g -O2  conftest.cc >&5
configure:2041: $? = 0
configure:2045: test -z 
			 || test ! -s conftest.err
configure:2048: $? = 0
configure:2051: test -s conftest.o
configure:2054: $? = 0
configure:2072: result: yes
configure:2082: checking whether the compiler implements namespaces
configure:2111: g++ -c -g -O2  conftest.cc >&5
configure:2117: $? = 0
configure:2121: test -z 
			 || test ! -s conftest.err
configure:2124: $? = 0
configure:2127: test -s conftest.o
configure:2130: $? = 0
configure:2148: result: yes
configure:2177: checking for library containing nanosleep
configure:2207: g++ -o conftest -g -O2   conftest.cc  >&5
configure:2213: $? = 0
configure:2217: test -z 
			 || test ! -s conftest.err
configure:2220: $? = 0
configure:2223: test -s conftest
configure:2226: $? = 0
configure:2296: result: none required
configure:2309: checking for zlibVersion in -lz
configure:2339: g++ -o conftest -g -O2   conftest.cc -lz   >&5
configure:2345: $? = 0
configure:2349: test -z 
			 || test ! -s conftest.err
configure:2352: $? = 0
configure:2355: test -s conftest
configure:2358: $? = 0
configure:2371: result: yes
configure:2391: checking how to run the C++ preprocessor
configure:2422: g++ -E  conftest.cc
configure:2428: $? = 0
configure:2460: g++ -E  conftest.cc
conftest.cc:15:28: error: ac_nonexistent.h: No such file or directory
configure:2466: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:2505: result: g++ -E
configure:2529: g++ -E  conftest.cc
configure:2535: $? = 0
configure:2567: g++ -E  conftest.cc
conftest.cc:15:28: error: ac_nonexistent.h: No such file or directory
configure:2573: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:2617: checking for egrep
configure:2627: result: grep -E
configure:2632: checking for ANSI C header files
configure:2657: g++ -c -g -O2  conftest.cc >&5
configure:2663: $? = 0
configure:2667: test -z 
			 || test ! -s conftest.err
configure:2670: $? = 0
configure:2673: test -s conftest.o
configure:2676: $? = 0
configure:2762: g++ -o conftest -g -O2   conftest.cc -lz  >&5
configure:2765: $? = 0
configure:2767: ./conftest
configure:2770: $? = 0
configure:2785: result: yes
configure:2809: checking for sys/types.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:2809: checking for sys/stat.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:2809: checking for stdlib.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:2809: checking for string.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:2809: checking for memory.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:2809: checking for strings.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:2809: checking for inttypes.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:2809: checking for stdint.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:2809: checking for unistd.h
configure:2825: g++ -c -g -O2  conftest.cc >&5
configure:2831: $? = 0
configure:2835: test -z 
			 || test ! -s conftest.err
configure:2838: $? = 0
configure:2841: test -s conftest.o
configure:2844: $? = 0
configure:2855: result: yes
configure:3351: checking for editline library
configure:3390: g++ -o conftest -g -O2   conftest.cc -lz  -ledit >&5
configure:3396: $? = 0
configure:3400: test -z 
			 || test ! -s conftest.err
configure:3403: $? = 0
configure:3406: test -s conftest
configure:3409: $? = 0
configure:3433: result: -ledit
configure:3452: checking readline/readline.h usability
configure:3464: g++ -c -g -O2  conftest.cc >&5
configure:3470: $? = 0
configure:3474: test -z 
			 || test ! -s conftest.err
configure:3477: $? = 0
configure:3480: test -s conftest.o
configure:3483: $? = 0
configure:3493: result: yes
configure:3497: checking readline/readline.h presence
configure:3507: g++ -E  conftest.cc
configure:3513: $? = 0
configure:3533: result: yes
configure:3568: checking for readline/readline.h
configure:3575: result: yes
configure:3597: checking whether editline supports history
configure:3627: g++ -o conftest -g -O2   conftest.cc -lz  -ledit >&5
configure:3633: $? = 0
configure:3637: test -z 
			 || test ! -s conftest.err
configure:3640: $? = 0
configure:3643: test -s conftest
configure:3646: $? = 0
configure:3658: result: yes
configure:3676: checking editline/readline.h usability
configure:3688: g++ -c -g -O2  conftest.cc >&5
conftest.cc:61:31: error: editline/readline.h: No such file or directory
configure:3694: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <editline/readline.h>
configure:3717: result: no
configure:3721: checking editline/readline.h presence
configure:3731: g++ -E  conftest.cc
conftest.cc:27:31: error: editline/readline.h: No such file or directory
configure:3737: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| /* end confdefs.h.  */
| #include <editline/readline.h>
configure:3757: result: no
configure:3792: checking for editline/readline.h
configure:3799: result: no
configure:4111: checking for db.h
configure:4146: g++ -o conftest -g -O2   conftest.cc -lz  -ledit >&5
configure:4149: $? = 0
configure:4151: ./conftest
configure:4154: $? = 0
configure:4159: result: 1.0.0
configure:4180: checking for library containing Berkeley DB 1.0.0
configure:4244: g++ -o conftest -g -O2   conftest.cc -lz  -ledit  >&5
configure:4247: $? = 0
configure:4249: ./conftest
configure:4252: $? = 0
configure:5112: result: none required
configure:5442: using Berkeley DB version 1.0.0
configure:7207: checking for library containing gethostbyname
configure:7237: g++ -o conftest -g -O2     conftest.cc  -lz  -ledit >&5
configure:7243: $? = 0
configure:7247: test -z 
			 || test ! -s conftest.err
configure:7250: $? = 0
configure:7253: test -s conftest
configure:7256: $? = 0
configure:7326: result: none required
configure:7333: checking for library containing shutdown
configure:7363: g++ -o conftest -g -O2     conftest.cc  -lz  -ledit >&5
configure:7369: $? = 0
configure:7373: test -z 
			 || test ! -s conftest.err
configure:7376: $? = 0
configure:7379: test -s conftest
configure:7382: $? = 0
configure:7452: result: none required
configure:7488: checking openssl/ssl.h usability
configure:7500: g++ -c -g -O2   conftest.cc >&5
configure:7506: $? = 0
configure:7510: test -z 
			 || test ! -s conftest.err
configure:7513: $? = 0
configure:7516: test -s conftest.o
configure:7519: $? = 0
configure:7529: result: yes
configure:7533: checking openssl/ssl.h presence
configure:7543: g++ -E   conftest.cc
configure:7549: $? = 0
configure:7569: result: yes
configure:7604: checking for openssl/ssl.h
configure:7611: result: yes
configure:7627: checking for SSL_read in -lssl
configure:7657: g++ -o conftest -g -O2     conftest.cc -lssl -lcrypto  -lz  -ledit >&5
configure:7663: $? = 0
configure:7667: test -z 
			 || test ! -s conftest.err
configure:7670: $? = 0
configure:7673: test -s conftest
configure:7676: $? = 0
configure:7689: result: yes
configure:7721: checking for EVP_CipherInit_ex in -lcrypto
configure:7751: g++ -o conftest -g -O2     conftest.cc -lcrypto  -lssl  -lz  -ledit >&5
configure:7757: $? = 0
configure:7761: test -z 
			 || test ! -s conftest.err
configure:7764: $? = 0
configure:7767: test -s conftest
configure:7770: $? = 0
configure:7783: result: yes
configure:7823: checking for dirent.h that defines DIR
configure:7847: g++ -c -g -O2   conftest.cc >&5
configure:7853: $? = 0
configure:7857: test -z 
			 || test ! -s conftest.err
configure:7860: $? = 0
configure:7863: test -s conftest.o
configure:7866: $? = 0
configure:7877: result: yes
configure:7890: checking for library containing opendir
configure:7920: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:7926: $? = 0
configure:7930: test -z 
			 || test ! -s conftest.err
configure:7933: $? = 0
configure:7936: test -s conftest
configure:7939: $? = 0
configure:8009: result: none required
configure:8147: checking for ANSI C header files
configure:8300: result: yes
configure:8310: checking for sys/wait.h that is POSIX.1 compatible
configure:8341: g++ -c -g -O2   conftest.cc >&5
configure:8347: $? = 0
configure:8351: test -z 
			 || test ! -s conftest.err
configure:8354: $? = 0
configure:8357: test -s conftest.o
configure:8360: $? = 0
configure:8371: result: yes
configure:8399: checking execinfo.h usability
configure:8411: g++ -c -g -O2   conftest.cc >&5
conftest.cc:72:22: error: execinfo.h: No such file or directory
configure:8417: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <execinfo.h>
configure:8440: result: no
configure:8444: checking execinfo.h presence
configure:8454: g++ -E   conftest.cc
conftest.cc:38:22: error: execinfo.h: No such file or directory
configure:8460: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| /* end confdefs.h.  */
| #include <execinfo.h>
configure:8480: result: no
configure:8515: checking for execinfo.h
configure:8522: result: no
configure:8399: checking process.h usability
configure:8411: g++ -c -g -O2   conftest.cc >&5
conftest.cc:72:21: error: process.h: No such file or directory
configure:8417: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <process.h>
configure:8440: result: no
configure:8444: checking process.h presence
configure:8454: g++ -E   conftest.cc
conftest.cc:38:21: error: process.h: No such file or directory
configure:8460: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| /* end confdefs.h.  */
| #include <process.h>
configure:8480: result: no
configure:8515: checking for process.h
configure:8522: result: no
configure:8399: checking pwd.h usability
configure:8411: g++ -c -g -O2   conftest.cc >&5
configure:8417: $? = 0
configure:8421: test -z 
			 || test ! -s conftest.err
configure:8424: $? = 0
configure:8427: test -s conftest.o
configure:8430: $? = 0
configure:8440: result: yes
configure:8444: checking pwd.h presence
configure:8454: g++ -E   conftest.cc
configure:8460: $? = 0
configure:8480: result: yes
configure:8515: checking for pwd.h
configure:8522: result: yes
configure:8399: checking regex.h usability
configure:8411: g++ -c -g -O2   conftest.cc >&5
configure:8417: $? = 0
configure:8421: test -z 
			 || test ! -s conftest.err
configure:8424: $? = 0
configure:8427: test -s conftest.o
configure:8430: $? = 0
configure:8440: result: yes
configure:8444: checking regex.h presence
configure:8454: g++ -E   conftest.cc
configure:8460: $? = 0
configure:8480: result: yes
configure:8515: checking for regex.h
configure:8522: result: yes
configure:8399: checking signal.h usability
configure:8411: g++ -c -g -O2   conftest.cc >&5
configure:8417: $? = 0
configure:8421: test -z 
			 || test ! -s conftest.err
configure:8424: $? = 0
configure:8427: test -s conftest.o
configure:8430: $? = 0
configure:8440: result: yes
configure:8444: checking signal.h presence
configure:8454: g++ -E   conftest.cc
configure:8460: $? = 0
configure:8480: result: yes
configure:8515: checking for signal.h
configure:8522: result: yes
configure:8550: checking syslog.h usability
configure:8562: g++ -c -g -O2   conftest.cc >&5
configure:8568: $? = 0
configure:8572: test -z 
			 || test ! -s conftest.err
configure:8575: $? = 0
configure:8578: test -s conftest.o
configure:8581: $? = 0
configure:8591: result: yes
configure:8595: checking syslog.h presence
configure:8605: g++ -E   conftest.cc
configure:8611: $? = 0
configure:8631: result: yes
configure:8666: checking for syslog.h
configure:8673: result: yes
configure:8550: checking time.h usability
configure:8562: g++ -c -g -O2   conftest.cc >&5
configure:8568: $? = 0
configure:8572: test -z 
			 || test ! -s conftest.err
configure:8575: $? = 0
configure:8578: test -s conftest.o
configure:8581: $? = 0
configure:8591: result: yes
configure:8595: checking time.h presence
configure:8605: g++ -E   conftest.cc
configure:8611: $? = 0
configure:8631: result: yes
configure:8666: checking for time.h
configure:8673: result: yes
configure:8700: checking netinet/in.h usability
configure:8712: g++ -c -g -O2   conftest.cc >&5
configure:8718: $? = 0
configure:8722: test -z 
			 || test ! -s conftest.err
configure:8725: $? = 0
configure:8728: test -s conftest.o
configure:8731: $? = 0
configure:8741: result: yes
configure:8745: checking netinet/in.h presence
configure:8755: g++ -E   conftest.cc
configure:8761: $? = 0
configure:8781: result: yes
configure:8816: checking for netinet/in.h
configure:8823: result: yes
configure:8854: checking sys/param.h usability
configure:8866: g++ -c -g -O2   conftest.cc >&5
configure:8872: $? = 0
configure:8876: test -z 
			 || test ! -s conftest.err
configure:8879: $? = 0
configure:8882: test -s conftest.o
configure:8885: $? = 0
configure:8895: result: yes
configure:8899: checking sys/param.h presence
configure:8909: g++ -E   conftest.cc
configure:8915: $? = 0
configure:8935: result: yes
configure:8970: checking for sys/param.h
configure:8977: result: yes
configure:8854: checking sys/socket.h usability
configure:8866: g++ -c -g -O2   conftest.cc >&5
configure:8872: $? = 0
configure:8876: test -z 
			 || test ! -s conftest.err
configure:8879: $? = 0
configure:8882: test -s conftest.o
configure:8885: $? = 0
configure:8895: result: yes
configure:8899: checking sys/socket.h presence
configure:8909: g++ -E   conftest.cc
configure:8915: $? = 0
configure:8935: result: yes
configure:8970: checking for sys/socket.h
configure:8977: result: yes
configure:8854: checking sys/time.h usability
configure:8866: g++ -c -g -O2   conftest.cc >&5
configure:8872: $? = 0
configure:8876: test -z 
			 || test ! -s conftest.err
configure:8879: $? = 0
configure:8882: test -s conftest.o
configure:8885: $? = 0
configure:8895: result: yes
configure:8899: checking sys/time.h presence
configure:8909: g++ -E   conftest.cc
configure:8915: $? = 0
configure:8935: result: yes
configure:8970: checking for sys/time.h
configure:8977: result: yes
configure:8845: checking for sys/types.h
configure:8850: result: yes
configure:8845: checking for sys/wait.h
configure:8850: result: yes
configure:9004: checking sys/xattr.h usability
configure:9016: g++ -c -g -O2   conftest.cc >&5
configure:9022: $? = 0
configure:9026: test -z 
			 || test ! -s conftest.err
configure:9029: $? = 0
configure:9032: test -s conftest.o
configure:9035: $? = 0
configure:9045: result: yes
configure:9049: checking sys/xattr.h presence
configure:9059: g++ -E   conftest.cc
configure:9065: $? = 0
configure:9085: result: yes
configure:9120: checking for sys/xattr.h
configure:9127: result: yes
configure:9142: checking for library containing regcomp
configure:9172: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:9178: $? = 0
configure:9182: test -z 
			 || test ! -s conftest.err
configure:9185: $? = 0
configure:9188: test -s conftest
configure:9191: $? = 0
configure:9261: result: none required
configure:9272: checking for u_int8_t
configure:9296: g++ -c -g -O2   conftest.cc >&5
configure:9302: $? = 0
configure:9306: test -z 
			 || test ! -s conftest.err
configure:9309: $? = 0
configure:9312: test -s conftest.o
configure:9315: $? = 0
configure:9326: result: yes
configure:9336: checking for u_int16_t
configure:9360: g++ -c -g -O2   conftest.cc >&5
configure:9366: $? = 0
configure:9370: test -z 
			 || test ! -s conftest.err
configure:9373: $? = 0
configure:9376: test -s conftest.o
configure:9379: $? = 0
configure:9390: result: yes
configure:9400: checking for u_int32_t
configure:9424: g++ -c -g -O2   conftest.cc >&5
configure:9430: $? = 0
configure:9434: test -z 
			 || test ! -s conftest.err
configure:9437: $? = 0
configure:9440: test -s conftest.o
configure:9443: $? = 0
configure:9454: result: yes
configure:9464: checking for u_int64_t
configure:9488: g++ -c -g -O2   conftest.cc >&5
configure:9494: $? = 0
configure:9498: test -z 
			 || test ! -s conftest.err
configure:9501: $? = 0
configure:9504: test -s conftest.o
configure:9507: $? = 0
configure:9518: result: yes
configure:9529: checking for uint8_t
configure:9553: g++ -c -g -O2   conftest.cc >&5
configure:9559: $? = 0
configure:9563: test -z 
			 || test ! -s conftest.err
configure:9566: $? = 0
configure:9569: test -s conftest.o
configure:9572: $? = 0
configure:9583: result: yes
configure:9593: checking for uint16_t
configure:9617: g++ -c -g -O2   conftest.cc >&5
configure:9623: $? = 0
configure:9627: test -z 
			 || test ! -s conftest.err
configure:9630: $? = 0
configure:9633: test -s conftest.o
configure:9636: $? = 0
configure:9647: result: yes
configure:9657: checking for uint32_t
configure:9681: g++ -c -g -O2   conftest.cc >&5
configure:9687: $? = 0
configure:9691: test -z 
			 || test ! -s conftest.err
configure:9694: $? = 0
configure:9697: test -s conftest.o
configure:9700: $? = 0
configure:9711: result: yes
configure:9721: checking for uint64_t
configure:9745: g++ -c -g -O2   conftest.cc >&5
configure:9751: $? = 0
configure:9755: test -z 
			 || test ! -s conftest.err
configure:9758: $? = 0
configure:9761: test -s conftest.o
configure:9764: $? = 0
configure:9775: result: yes
configure:9786: checking for stdbool.h that conforms to C99
configure:9839: g++ -c -g -O2   conftest.cc >&5
configure:9845: $? = 0
configure:9849: test -z 
			 || test ! -s conftest.err
configure:9852: $? = 0
configure:9855: test -s conftest.o
configure:9858: $? = 0
configure:9869: result: yes
configure:9871: checking for _Bool
configure:9895: g++ -c -g -O2   conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:95: error: '_Bool' was not declared in this scope
conftest.cc:95: error: expected primary-expression before ')' token
conftest.cc:95: error: expected `)' before numeric constant
conftest.cc:97: error: '_Bool' was not declared in this scope
configure:9901: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| if ((_Bool *) 0)
|   return 0;
| if (sizeof (_Bool))
|   return 0;
|   ;
|   return 0;
| }
configure:9925: result: no
configure:9944: checking for an ANSI C-conforming const
configure:10011: g++ -c -g -O2   conftest.cc >&5
configure:10017: $? = 0
configure:10021: test -z 
			 || test ! -s conftest.err
configure:10024: $? = 0
configure:10027: test -s conftest.o
configure:10030: $? = 0
configure:10041: result: yes
configure:10051: checking whether byte ordering is bigendian
configure:10078: g++ -c -g -O2   conftest.cc >&5
configure:10084: $? = 0
configure:10088: test -z 
			 || test ! -s conftest.err
configure:10091: $? = 0
configure:10094: test -s conftest.o
configure:10097: $? = 0
configure:10121: g++ -c -g -O2   conftest.cc >&5
configure:10127: $? = 0
configure:10131: test -z 
			 || test ! -s conftest.err
configure:10134: $? = 0
configure:10137: test -s conftest.o
configure:10140: $? = 0
configure:10262: result: yes
configure:10282: checking if non-aligned 16 bit word accesses fail
configure:10317: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:10320: $? = 0
configure:10322: ./conftest
configure:10325: $? = 0
configure:10340: result: no
configure:10349: checking if non-aligned 32 bit word accesses fail
configure:10384: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:10387: $? = 0
configure:10389: ./conftest
configure:10392: $? = 0
configure:10407: result: no
configure:10416: checking if non-aligned 64 bit word accesses fail
configure:10451: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:10454: $? = 0
configure:10456: ./conftest
configure:10459: $? = 0
configure:10474: result: no
configure:10484: checking for uid_t in sys/types.h
configure:10507: result: yes
configure:10522: checking for mode_t
configure:10546: g++ -c -g -O2   conftest.cc >&5
configure:10552: $? = 0
configure:10556: test -z 
			 || test ! -s conftest.err
configure:10559: $? = 0
configure:10562: test -s conftest.o
configure:10565: $? = 0
configure:10576: result: yes
configure:10588: checking for off_t
configure:10612: g++ -c -g -O2   conftest.cc >&5
configure:10618: $? = 0
configure:10622: test -z 
			 || test ! -s conftest.err
configure:10625: $? = 0
configure:10628: test -s conftest.o
configure:10631: $? = 0
configure:10642: result: yes
configure:10654: checking for pid_t
configure:10678: g++ -c -g -O2   conftest.cc >&5
configure:10684: $? = 0
configure:10688: test -z 
			 || test ! -s conftest.err
configure:10691: $? = 0
configure:10694: test -s conftest.o
configure:10697: $? = 0
configure:10708: result: yes
configure:10720: checking for size_t
configure:10744: g++ -c -g -O2   conftest.cc >&5
configure:10750: $? = 0
configure:10754: test -z 
			 || test ! -s conftest.err
configure:10757: $? = 0
configure:10760: test -s conftest.o
configure:10763: $? = 0
configure:10774: result: yes
configure:10786: checking for struct stat.st_flags
configure:10809: g++ -c -g -O2   conftest.cc >&5
configure:10815: $? = 0
configure:10819: test -z 
			 || test ! -s conftest.err
configure:10822: $? = 0
configure:10825: test -s conftest.o
configure:10828: $? = 0
configure:10885: result: yes
configure:10896: checking for struct stat.st_mtimespec
configure:10919: g++ -c -g -O2   conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:99: error: could not convert 'ac_aggr.stat::st_mtimespec' to 'bool'
configure:10925: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| static struct stat ac_aggr;
| if (ac_aggr.st_mtimespec)
| return 0;
|   ;
|   return 0;
| }
configure:10963: g++ -c -g -O2   conftest.cc >&5
configure:10969: $? = 0
configure:10973: test -z 
			 || test ! -s conftest.err
configure:10976: $? = 0
configure:10979: test -s conftest.o
configure:10982: $? = 0
configure:10995: result: yes
configure:11006: checking for struct sockaddr_in.sin_len
configure:11033: g++ -c -g -O2   conftest.cc >&5
configure:11039: $? = 0
configure:11043: test -z 
			 || test ! -s conftest.err
configure:11046: $? = 0
configure:11049: test -s conftest.o
configure:11052: $? = 0
configure:11113: result: yes
configure:11124: checking whether INFTIM is declared
configure:11149: g++ -c -g -O2   conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:69: error: 'INFTIM' was not declared in this scope
configure:11155: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| /* end confdefs.h.  */
| #include <poll.h>
| 
| int
| main ()
| {
| #ifndef INFTIM
|   char *p = (char *) INFTIM;
| #endif
| 
|   ;
|   return 0;
| }
configure:11179: result: no
configure:11197: checking whether SO_PEERCRED is declared
configure:11222: g++ -c -g -O2   conftest.cc >&5
conftest.cc: In function `int main()':
conftest.cc:70: error: 'SO_PEERCRED' was not declared in this scope
configure:11228: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| /* end confdefs.h.  */
| #include <sys/socket.h>
| 
| int
| main ()
| {
| #ifndef SO_PEERCRED
|   char *p = (char *) SO_PEERCRED;
| #endif
| 
|   ;
|   return 0;
| }
configure:11252: result: no
configure:11270: checking whether time.h and sys/time.h may both be included
configure:11295: g++ -c -g -O2   conftest.cc >&5
configure:11301: $? = 0
configure:11305: test -z 
			 || test ! -s conftest.err
configure:11308: $? = 0
configure:11311: test -s conftest.o
configure:11314: $? = 0
configure:11325: result: yes
configure:11335: checking whether struct tm is in sys/time.h or time.h
configure:11358: g++ -c -g -O2   conftest.cc >&5
configure:11364: $? = 0
configure:11368: test -z 
			 || test ! -s conftest.err
configure:11371: $? = 0
configure:11374: test -s conftest.o
configure:11377: $? = 0
configure:11388: result: time.h
configure:11399: checking for struct dirent.d_type
configure:11423: g++ -c -g -O2   conftest.cc >&5
configure:11429: $? = 0
configure:11433: test -z 
			 || test ! -s conftest.err
configure:11436: $? = 0
configure:11439: test -s conftest.o
configure:11442: $? = 0
configure:11500: result: yes
configure:11512: checking whether struct dirent.d_type is valid
configure:11548: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:11551: $? = 0
configure:11553: ./conftest
configure:11556: $? = 0
configure:11571: result: yes
configure:11594: checking for special C compiler options needed for large files
configure:11629: g++ -c -g -O2   conftest.cc >&5
configure:11635: $? = 0
configure:11639: test -z 
			 || test ! -s conftest.err
configure:11642: $? = 0
configure:11645: test -s conftest.o
configure:11648: $? = 0
configure:11693: result: no
configure:11699: checking for _FILE_OFFSET_BITS value needed for large files
configure:11730: g++ -c -g -O2   conftest.cc >&5
configure:11736: $? = 0
configure:11740: test -z 
			 || test ! -s conftest.err
configure:11743: $? = 0
configure:11746: test -s conftest.o
configure:11749: $? = 0
configure:11814: result: no
configure:11824: checking for _LARGE_FILES value needed for large files
configure:11855: g++ -c -g -O2   conftest.cc >&5
configure:11861: $? = 0
configure:11865: test -z 
			 || test ! -s conftest.err
configure:11868: $? = 0
configure:11871: test -s conftest.o
configure:11874: $? = 0
configure:11939: result: no
configure:11952: checking whether LLONG_MAX is declared
configure:11977: g++ -c -g -O2   conftest.cc >&5
configure:11983: $? = 0
configure:11987: test -z 
			 || test ! -s conftest.err
configure:11990: $? = 0
configure:11993: test -s conftest.o
configure:11996: $? = 0
configure:12007: result: yes
configure:12111: checking for pre-processor pragma defines
configure:12128: g++ -c -g -O2   conftest.cc >&5
conftest.cc:70: error: invalid token
conftest.cc:70: error: 'pragma' does not name a type
configure:12134: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| /* end confdefs.h.  */
| 
|         #define TEST_DEFINE #pragma pack(1)
|         TEST_DEFINE
| 
configure:12159: result: no
configure:12478: checking for "/dev/urandom"
configure:12493: result: yes
configure:12567: checking for getmntent
configure:12624: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
/usr/bin/ld: Undefined symbols:
_getmntent
collect2: ld returned 1 exit status
configure:12630: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| /* end confdefs.h.  */
| /* Define getmntent to an innocuous variant, in case <limits.h> declares getmntent.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define getmntent innocuous_getmntent
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char getmntent (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef getmntent
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char getmntent ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_getmntent) || defined (__stub___getmntent)
| choke me
| #else
| char (*f) () = getmntent;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != getmntent;
|   ;
|   return 0;
| }
configure:12655: result: no
configure:12567: checking for statfs
configure:12624: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:12630: $? = 0
configure:12634: test -z 
			 || test ! -s conftest.err
configure:12637: $? = 0
configure:12640: test -s conftest
configure:12643: $? = 0
configure:12655: result: yes
configure:12670: checking for sys/param.h
configure:12675: result: yes
configure:12821: checking for mntent.h
configure:12842: g++ -c -g -O2   conftest.cc >&5
conftest.cc:79:20: error: mntent.h: No such file or directory
configure:12848: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| /* end confdefs.h.  */
| 
|     #include <stdio.h>
|     #ifdef HAVE_SYS_PARAM_H
|       #include <sys/param.h>
|     #endif
| 
| 
| #include <mntent.h>
configure:12872: result: no
configure:12821: checking for sys/mnttab.h
configure:12842: g++ -c -g -O2   conftest.cc >&5
conftest.cc:79:24: error: sys/mnttab.h: No such file or directory
configure:12848: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| /* end confdefs.h.  */
| 
|     #include <stdio.h>
|     #ifdef HAVE_SYS_PARAM_H
|       #include <sys/param.h>
|     #endif
| 
| 
| #include <sys/mnttab.h>
configure:12872: result: no
configure:12821: checking for sys/mount.h
configure:12842: g++ -c -g -O2   conftest.cc >&5
configure:12848: $? = 0
configure:12852: test -z 
			 || test ! -s conftest.err
configure:12855: $? = 0
configure:12858: test -s conftest.o
configure:12861: $? = 0
configure:12872: result: yes
configure:12884: checking for struct statfs.f_mntonname
configure:12913: g++ -c -g -O2   conftest.cc >&5
configure:12919: $? = 0
configure:12923: test -z 
			 || test ! -s conftest.err
configure:12926: $? = 0
configure:12929: test -s conftest.o
configure:12932: $? = 0
configure:12995: result: yes
configure:13007: checking for struct mntent.mnt_dir
configure:13031: g++ -c -g -O2   conftest.cc >&5
conftest.cc:74:20: error: mntent.h: No such file or directory
conftest.cc: In function `int main()':
conftest.cc:79: error: aggregate 'mntent ac_aggr' has incomplete type and cannot be defined
conftest.cc:79: error: storage size of 'ac_aggr' isn't known
configure:13037: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| /* end confdefs.h.  */
| #include <mntent.h>
| 
| int
| main ()
| {
| static struct mntent ac_aggr;
| if (ac_aggr.mnt_dir)
| return 0;
|   ;
|   return 0;
| }
configure:13076: g++ -c -g -O2   conftest.cc >&5
conftest.cc:74:20: error: mntent.h: No such file or directory
conftest.cc: In function `int main()':
conftest.cc:79: error: aggregate 'mntent ac_aggr' has incomplete type and cannot be defined
conftest.cc:79: error: storage size of 'ac_aggr' isn't known
configure:13082: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| /* end confdefs.h.  */
| #include <mntent.h>
| 
| int
| main ()
| {
| static struct mntent ac_aggr;
| if (sizeof ac_aggr.mnt_dir)
| return 0;
|   ;
|   return 0;
| }
configure:13108: result: no
configure:13120: checking for struct mnttab.mnt_mountp
configure:13147: g++ -c -g -O2   conftest.cc >&5
conftest.cc:76:28: error: sys/mnttab.h: No such file or directory
conftest.cc: In function `int main()':
conftest.cc:82: error: aggregate 'mnttab ac_aggr' has incomplete type and cannot be defined
conftest.cc:82: error: storage size of 'ac_aggr' isn't known
configure:13153: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| /* end confdefs.h.  */
| 
|     #include <stdio.h>
|     #include <sys/mnttab.h>
| 
| 
| int
| main ()
| {
| static struct mnttab ac_aggr;
| if (ac_aggr.mnt_mountp)
| return 0;
|   ;
|   return 0;
| }
configure:13195: g++ -c -g -O2   conftest.cc >&5
conftest.cc:76:28: error: sys/mnttab.h: No such file or directory
conftest.cc: In function `int main()':
conftest.cc:82: error: aggregate 'mnttab ac_aggr' has incomplete type and cannot be defined
conftest.cc:82: error: storage size of 'ac_aggr' isn't known
configure:13201: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| /* end confdefs.h.  */
| 
|     #include <stdio.h>
|     #include <sys/mnttab.h>
| 
| 
| int
| main ()
| {
| static struct mnttab ac_aggr;
| if (sizeof ac_aggr.mnt_mountp)
| return 0;
|   ;
|   return 0;
| }
configure:13227: result: no
configure:13259: checking for gcc version 3 or later
configure:13277: g++ -c -g -O2   conftest.cc >&5
configure:13283: $? = 0
configure:13287: test -z 
			 || test ! -s conftest.err
configure:13290: $? = 0
configure:13293: test -s conftest.o
configure:13296: $? = 0
configure:13308: result: yes
configure:13385: checking whether closedir returns void
configure:13414: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:13417: $? = 0
configure:13419: ./conftest
configure:13422: $? = 0
configure:13436: result: no
configure:13446: checking for error_at_line
configure:13467: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
conftest.cc: In function `int main()':
conftest.cc:112: error: 'error_at_line' was not declared in this scope
configure:13473: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| error_at_line (0, 0, "", 0, "");
|   ;
|   return 0;
| }
configure:13498: result: no
configure:13511: checking return type of signal handlers
configure:13542: g++ -c -g -O2   conftest.cc >&5
configure:13548: $? = 0
configure:13552: test -z 
			 || test ! -s conftest.err
configure:13555: $? = 0
configure:13558: test -s conftest.o
configure:13561: $? = 0
configure:13572: result: void
configure:13580: checking whether lstat dereferences a symlink specified with a trailing slash
configure:13611: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:13614: $? = 0
configure:13616: ./conftest
configure:13619: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| struct stat sbuf;
|      /* Linux will dereference the symlink and fail.
| 	That is better in the sense that it means we will not
| 	have to compile and use the lstat wrapper.  */
|      exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);
|   ;
|   return 0;
| }
configure:13640: result: no
configure:13661: checking whether stat accepts an empty string
configure:13686: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:13689: $? = 0
configure:13691: ./conftest
configure:13694: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| struct stat sbuf;
|   exit (stat ("", &sbuf) ? 1 : 0);
|   ;
|   return 0;
| }
configure:13708: result: no
configure:13734: checking for getpeereid
configure:13791: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:13797: $? = 0
configure:13801: test -z 
			 || test ! -s conftest.err
configure:13804: $? = 0
configure:13807: test -s conftest
configure:13810: $? = 0
configure:13822: result: yes
configure:13734: checking for kqueue
configure:13791: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:13797: $? = 0
configure:13801: test -z 
			 || test ! -s conftest.err
configure:13804: $? = 0
configure:13807: test -s conftest
configure:13810: $? = 0
configure:13822: result: yes
configure:13734: checking for lchown
configure:13791: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:13797: $? = 0
configure:13801: test -z 
			 || test ! -s conftest.err
configure:13804: $? = 0
configure:13807: test -s conftest
configure:13810: $? = 0
configure:13822: result: yes
configure:13734: checking for setproctitle
configure:13791: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
/usr/bin/ld: Undefined symbols:
_setproctitle
collect2: ld returned 1 exit status
configure:13797: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| /* end confdefs.h.  */
| /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define setproctitle innocuous_setproctitle
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char setproctitle (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef setproctitle
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char setproctitle ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
| choke me
| #else
| char (*f) () = setproctitle;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != setproctitle;
|   ;
|   return 0;
| }
configure:13822: result: no
configure:13734: checking for getpid
configure:13791: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:13797: $? = 0
configure:13801: test -z 
			 || test ! -s conftest.err
configure:13804: $? = 0
configure:13807: test -s conftest
configure:13810: $? = 0
configure:13822: result: yes
configure:13848: checking sys/syscall.h usability
configure:13860: g++ -c -g -O2   conftest.cc >&5
configure:13866: $? = 0
configure:13870: test -z 
			 || test ! -s conftest.err
configure:13873: $? = 0
configure:13876: test -s conftest.o
configure:13879: $? = 0
configure:13889: result: yes
configure:13893: checking sys/syscall.h presence
configure:13903: g++ -E   conftest.cc
configure:13909: $? = 0
configure:13929: result: yes
configure:13964: checking for sys/syscall.h
configure:13971: result: yes
configure:13839: checking for unistd.h
configure:13844: result: yes
configure:13989: checking for syscall
configure:14046: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:14052: $? = 0
configure:14056: test -z 
			 || test ! -s conftest.err
configure:14059: $? = 0
configure:14062: test -s conftest
configure:14065: $? = 0
configure:14077: result: yes
configure:13989: checking for __syscall
configure:14046: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
/usr/bin/ld: Undefined symbols:
___syscall
collect2: ld returned 1 exit status
configure:14052: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| #define HAVE_GETPID 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYSCALL 1
| /* end confdefs.h.  */
| /* Define __syscall to an innocuous variant, in case <limits.h> declares __syscall.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define __syscall innocuous___syscall
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char __syscall (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef __syscall
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char __syscall ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub___syscall) || defined (__stub_____syscall)
| choke me
| #else
| char (*f) () = __syscall;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != __syscall;
|   ;
|   return 0;
| }
configure:14077: result: no
configure:14162: checking whether syscall lseek requires dummy parameter
configure:14211: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:14214: $? = 0
configure:14216: ./conftest
configure:14219: $? = 0
configure:14234: result: yes
configure:14258: checking for listxattr
configure:14315: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:14321: $? = 0
configure:14325: test -z 
			 || test ! -s conftest.err
configure:14328: $? = 0
configure:14331: test -s conftest
configure:14334: $? = 0
configure:14346: result: yes
configure:14258: checking for llistxattr
configure:14315: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
/usr/bin/ld: Undefined symbols:
_llistxattr
collect2: ld returned 1 exit status
configure:14321: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| #define HAVE_GETPID 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYSCALL 1
| #define HAVE_LSEEK_DUMMY_PARAM 1
| #define HAVE_LISTXATTR 1
| /* end confdefs.h.  */
| /* Define llistxattr to an innocuous variant, in case <limits.h> declares llistxattr.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define llistxattr innocuous_llistxattr
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char llistxattr (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef llistxattr
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char llistxattr ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_llistxattr) || defined (__stub___llistxattr)
| choke me
| #else
| char (*f) () = llistxattr;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != llistxattr;
|   ;
|   return 0;
| }
configure:14346: result: no
configure:14258: checking for getxattr
configure:14315: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:14321: $? = 0
configure:14325: test -z 
			 || test ! -s conftest.err
configure:14328: $? = 0
configure:14331: test -s conftest
configure:14334: $? = 0
configure:14346: result: yes
configure:14258: checking for lgetxattr
configure:14315: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
/usr/bin/ld: Undefined symbols:
_lgetxattr
collect2: ld returned 1 exit status
configure:14321: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| #define HAVE_GETPID 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYSCALL 1
| #define HAVE_LSEEK_DUMMY_PARAM 1
| #define HAVE_LISTXATTR 1
| #define HAVE_GETXATTR 1
| /* end confdefs.h.  */
| /* Define lgetxattr to an innocuous variant, in case <limits.h> declares lgetxattr.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define lgetxattr innocuous_lgetxattr
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char lgetxattr (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef lgetxattr
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char lgetxattr ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_lgetxattr) || defined (__stub___lgetxattr)
| choke me
| #else
| char (*f) () = lgetxattr;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != lgetxattr;
|   ;
|   return 0;
| }
configure:14346: result: no
configure:14258: checking for setxattr
configure:14315: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:14321: $? = 0
configure:14325: test -z 
			 || test ! -s conftest.err
configure:14328: $? = 0
configure:14331: test -s conftest
configure:14334: $? = 0
configure:14346: result: yes
configure:14258: checking for lsetxattr
configure:14315: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
/usr/bin/ld: Undefined symbols:
_lsetxattr
collect2: ld returned 1 exit status
configure:14321: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "Box Backup"
| #define PACKAGE_TARNAME "box-backup"
| #define PACKAGE_VERSION "0.09"
| #define PACKAGE_STRING "Box Backup 0.09"
| #define PACKAGE_BUGREPORT "box@fluffy.co.uk"
| #ifdef __cplusplus
| extern "C" void exit (int);
| #endif
| #define HAVE_EXCEPTIONS
| #define HAVE_NAMESPACES
| #define HAVE_LIBZ 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_DB_H 1
| #define BDB_VERSION_MAJOR 1
| #define BDB_VERSION_MINOR 0
| #define BDB_VERSION_POINT 0
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_LIBSSL 1
| #define HAVE_SSL 1
| #define HAVE_LIBCRYPTO 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_XATTR_H 1
| #define HAVE_U_INT8_T 1
| #define HAVE_U_INT16_T 1
| #define HAVE_U_INT32_T 1
| #define HAVE_U_INT64_T 1
| #define HAVE_UINT8_T 1
| #define HAVE_UINT16_T 1
| #define HAVE_UINT32_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_STDBOOL_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_STRUCT_STAT_ST_FLAGS 1
| #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
| #define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
| #define HAVE_DECL_INFTIM 0
| #define HAVE_DECL_SO_PEERCRED 0
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_STRUCT_DIRENT_D_TYPE 1
| #define HAVE_VALID_DIRENT_D_TYPE 1
| #define HAVE_RANDOM_DEVICE 1
| #define RANDOM_DEVICE "/dev/urandom"
| #define HAVE_STATFS 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_STRUCT_STATFS_F_MNTONNAME 1
| #define HAVE_MOUNTS 1
| #define RETSIGTYPE void
| #define HAVE_GETPEEREID 1
| #define HAVE_KQUEUE 1
| #define HAVE_LCHOWN 1
| #define HAVE_GETPID 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYSCALL 1
| #define HAVE_LSEEK_DUMMY_PARAM 1
| #define HAVE_LISTXATTR 1
| #define HAVE_GETXATTR 1
| #define HAVE_SETXATTR 1
| /* end confdefs.h.  */
| /* Define lsetxattr to an innocuous variant, in case <limits.h> declares lsetxattr.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define lsetxattr innocuous_lsetxattr
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char lsetxattr (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef lsetxattr
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char lsetxattr ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_lsetxattr) || defined (__stub___lsetxattr)
| choke me
| #else
| char (*f) () = lsetxattr;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != lsetxattr;
|   ;
|   return 0;
| }
configure:14346: result: no
configure:14356: checking whether XATTR_NOFOLLOW is declared
configure:14381: g++ -c -g -O2   conftest.cc >&5
configure:14387: $? = 0
configure:14391: test -z 
			 || test ! -s conftest.err
configure:14394: $? = 0
configure:14397: test -s conftest.o
configure:14400: $? = 0
configure:14411: result: yes
configure:14435: checking if we have large file support enabled
configure:14465: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:14468: $? = 0
configure:14470: ./conftest
configure:14473: $? = 0
configure:14488: result: yes
configure:14496: checking for flock
configure:14553: g++ -o conftest -g -O2     conftest.cc -lcrypto -lssl  -lz  -ledit >&5
configure:14559: $? = 0
configure:14563: test -z 
			 || test ! -s conftest.err
configure:14566: $? = 0
configure:14569: test -s conftest
configure:14572: $? = 0
configure:14584: result: yes
configure:14594: checking whether O_EXLOCK is declared
configure:14619: g++ -c -g -O2   conftest.cc >&5
configure:14625: $? = 0
configure:14629: test -z 
			 || test ! -s conftest.err
configure:14632: $? = 0
configure:14635: test -s conftest.o
configure:14638: $? = 0
configure:14649: result: yes
configure:14667: checking whether F_SETLK is declared
configure:14692: g++ -c -g -O2   conftest.cc >&5
configure:14698: $? = 0
configure:14702: test -z 
			 || test ! -s conftest.err
configure:14705: $? = 0
configure:14708: test -s conftest.o
configure:14711: $? = 0
configure:14722: result: yes
configure:14959: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by Box Backup config.status 0.09, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  CONFIG_FILES    = 
  CONFIG_HEADERS  = 
  CONFIG_LINKS    = 
  CONFIG_COMMANDS = 
  $ ./config.status 

on borgcube.allard.nu

config.status:657: creating infrastructure/BoxPlatform.pm
config.status:760: creating lib/common/BoxConfig.h

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=powerpc-apple-darwin8.5.0
ac_cv_build_alias=powerpc-apple-darwin8.5.0
ac_cv_c_bigendian=yes
ac_cv_c_const=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_cxx_exceptions=yes
ac_cv_cxx_namespaces=yes
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_file___dev_urandom_=yes
ac_cv_func___syscall=no
ac_cv_func_closedir_void=no
ac_cv_func_flock=yes
ac_cv_func_getmntent=no
ac_cv_func_getpeereid=yes
ac_cv_func_getpid=yes
ac_cv_func_getxattr=yes
ac_cv_func_kqueue=yes
ac_cv_func_lchown=yes
ac_cv_func_lgetxattr=no
ac_cv_func_listxattr=yes
ac_cv_func_llistxattr=no
ac_cv_func_lsetxattr=no
ac_cv_func_lstat_dereferences_slashed_symlink=no
ac_cv_func_setproctitle=no
ac_cv_func_setxattr=yes
ac_cv_func_stat_empty_string_bug=no
ac_cv_func_statfs=yes
ac_cv_func_syscall=yes
ac_cv_have_decl_F_SETLK=yes
ac_cv_have_decl_INFTIM=no
ac_cv_have_decl_LLONG_MAX=yes
ac_cv_have_decl_O_EXLOCK=yes
ac_cv_have_decl_SO_PEERCRED=no
ac_cv_have_decl_XATTR_NOFOLLOW=yes
ac_cv_header_dirent_dirent_h=yes
ac_cv_header_editline_readline_h=no
ac_cv_header_execinfo_h=no
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_mntent_h=no
ac_cv_header_netinet_in_h=yes
ac_cv_header_openssl_ssl_h=yes
ac_cv_header_process_h=no
ac_cv_header_pwd_h=yes
ac_cv_header_readline_readline_h=yes
ac_cv_header_regex_h=yes
ac_cv_header_signal_h=yes
ac_cv_header_stdbool_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_mnttab_h=no
ac_cv_header_sys_mount_h=yes
ac_cv_header_sys_param_h=yes
ac_cv_header_sys_socket_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_syscall_h=yes
ac_cv_header_sys_time_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_sys_wait_h=yes
ac_cv_header_sys_xattr_h=yes
ac_cv_header_syslog_h=yes
ac_cv_header_time=yes
ac_cv_header_time_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=powerpc-apple-darwin8.5.0
ac_cv_host_alias=powerpc-apple-darwin8.5.0
ac_cv_lib_crypto_EVP_CipherInit_ex=yes
ac_cv_lib_error_at_line=no
ac_cv_lib_ssl_SSL_read=yes
ac_cv_lib_z_zlibVersion=yes
ac_cv_member_struct_dirent_d_type=yes
ac_cv_member_struct_mntent_mnt_dir=no
ac_cv_member_struct_mnttab_mnt_mountp=no
ac_cv_member_struct_sockaddr_in_sin_len=yes
ac_cv_member_struct_stat_st_flags=yes
ac_cv_member_struct_stat_st_mtimespec=yes
ac_cv_member_struct_statfs_f_mntonname=yes
ac_cv_objext=o
ac_cv_prog_CXXCPP='g++ -E'
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_cxx_g=yes
ac_cv_prog_egrep='grep -E'
ac_cv_search_gethostbyname='none required'
ac_cv_search_nanosleep='none required'
ac_cv_search_opendir='none required'
ac_cv_search_regcomp='none required'
ac_cv_search_shutdown='none required'
ac_cv_struct_tm=time.h
ac_cv_sys_file_offset_bits=no
ac_cv_sys_large_files=no
ac_cv_sys_largefile_CC=no
ac_cv_target=powerpc-apple-darwin8.5.0
ac_cv_target_alias=powerpc-apple-darwin8.5.0
ac_cv_type__Bool=no
ac_cv_type_mode_t=yes
ac_cv_type_off_t=yes
ac_cv_type_pid_t=yes
ac_cv_type_signal=void
ac_cv_type_size_t=yes
ac_cv_type_u_int16_t=yes
ac_cv_type_u_int32_t=yes
ac_cv_type_u_int64_t=yes
ac_cv_type_u_int8_t=yes
ac_cv_type_uid_t=yes
ac_cv_type_uint16_t=yes
ac_cv_type_uint32_t=yes
ac_cv_type_uint64_t=yes
ac_cv_type_uint8_t=yes
vl_cv_lib_editline=-ledit
vl_cv_lib_editline_history=no
vl_cv_lib_readline_compat_found=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

CPPFLAGS=' '
CXX='g++'
CXXCPP='g++ -E'
CXXFLAGS='-g -O2'
CXXFLAGS_STRICT='-Wall'
DEFS='-DHAVE_CONFIG_H'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='grep -E'
EXEEXT=''
LDADD_RDYNAMIC='-rdynamic'
LDFLAGS=' '
LIBOBJS=' error$U.o lstat$U.o'
LIBS='-lcrypto -lssl  -lz  -ledit'
LTLIBOBJS=' error$U.lo lstat$U.lo'
OBJEXT='o'
PACKAGE_BUGREPORT='box@fluffy.co.uk'
PACKAGE_NAME='Box Backup'
PACKAGE_STRING='Box Backup 0.09'
PACKAGE_TARNAME='box-backup'
PACKAGE_VERSION='0.09'
PATH_SEPARATOR=':'
RANDOM_DEVICE='/dev/urandom'
SHELL='/bin/sh'
ac_ct_CXX='g++'
bindir='${exec_prefix}/bin'
bindir_expanded='/usr/local/bin'
build='powerpc-apple-darwin8.5.0'
build_alias=''
build_cpu='powerpc'
build_os='darwin8.5.0'
build_vendor='apple'
datadir='${prefix}/share'
exec_prefix='${prefix}'
host='powerpc-apple-darwin8.5.0'
host_alias=''
host_cpu='powerpc'
host_os='darwin8.5.0'
host_vendor='apple'
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/usr/local'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='powerpc-apple-darwin8.5.0'
target_alias=''
target_cpu='powerpc'
target_os='darwin8.5.0'
target_vendor='apple'

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define BDB_VERSION_MAJOR 1
#define BDB_VERSION_MINOR 0
#define BDB_VERSION_POINT 0
#define HAVE_DB_H 1
#define HAVE_DECL_F_SETLK 1
#define HAVE_DECL_INFTIM 0
#define HAVE_DECL_O_EXLOCK 1
#define HAVE_DECL_SO_PEERCRED 0
#define HAVE_DECL_XATTR_NOFOLLOW 1
#define HAVE_DIRENT_H 1
#define HAVE_EXCEPTIONS
#define HAVE_FLOCK 1
#define HAVE_GETPEEREID 1
#define HAVE_GETPID 1
#define HAVE_GETXATTR 1
#define HAVE_INTTYPES_H 1
#define HAVE_KQUEUE 1
#define HAVE_LCHOWN 1
#define HAVE_LIBCRYPTO 1
#define HAVE_LIBREADLINE 1
#define HAVE_LIBSSL 1
#define HAVE_LIBZ 1
#define HAVE_LISTXATTR 1
#define HAVE_LSEEK_DUMMY_PARAM 1
#define HAVE_MEMORY_H 1
#define HAVE_MOUNTS 1
#define HAVE_NAMESPACES
#define HAVE_NETINET_IN_H 1
#define HAVE_OPENSSL_SSL_H 1
#define HAVE_PWD_H 1
#define HAVE_RANDOM_DEVICE 1
#define HAVE_READLINE_READLINE_H 1
#define HAVE_REGEX_H 1
#define HAVE_SETXATTR 1
#define HAVE_SIGNAL_H 1
#define HAVE_SSL 1
#define HAVE_STATFS 1
#define HAVE_STDBOOL_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_STRUCT_DIRENT_D_TYPE 1
#define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
#define HAVE_STRUCT_STATFS_F_MNTONNAME 1
#define HAVE_STRUCT_STAT_ST_FLAGS 1
#define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
#define HAVE_SYSCALL 1
#define HAVE_SYSLOG_H 1
#define HAVE_SYS_MOUNT_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_SYSCALL_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_SYS_XATTR_H 1
#define HAVE_TIME_H 1
#define HAVE_UINT16_T 1
#define HAVE_UINT32_T 1
#define HAVE_UINT64_T 1
#define HAVE_UINT8_T 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define HAVE_U_INT16_T 1
#define HAVE_U_INT32_T 1
#define HAVE_U_INT64_T 1
#define HAVE_U_INT8_T 1
#define HAVE_VALID_DIRENT_D_TYPE 1
#define PACKAGE_BUGREPORT "box@fluffy.co.uk"
#define PACKAGE_NAME "Box Backup"
#define PACKAGE_STRING "Box Backup 0.09"
#define PACKAGE_TARNAME "box-backup"
#define PACKAGE_VERSION "0.09"
#define RANDOM_DEVICE "/dev/urandom"
#define RETSIGTYPE void
#define STDC_HEADERS 1
#define STDC_HEADERS 1
#define TEMP_DIRECTORY_NAME "/tmp"
#define TIME_WITH_SYS_TIME 1
#define WORDS_BIGENDIAN 1
#endif
#ifdef __cplusplus
extern "C" void exit (int);

configure: exit 0

--Apple-Mail-12-956808967--

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 05:04:36 2006
From: boxbackup-dev@fluffy.co.uk (Johan Allard)
Date: Sun, 19 Feb 2006 16:04:36 +1100
Subject: [Box Backup-dev] Re: [Box Backup] readline support on OS X
In-Reply-To: <36597FC9-E4AC-4659-BB78-03A0AC5B48BC@fluffy.co.uk>
References: <C1F981F1-2816-4C10-8AC4-EB76CDFE9FE3@allard.nu> <1140133313.6545.8.camel@avenin.ebourne.me.uk> <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu> <1140220710.14355.21.camel@avenin.ebourne.me.uk> <5550CDC2-F4A1-4FFD-938C-5A4E6B8D107D@allard.nu> <1140269931.14355.32.camel@avenin.ebourne.me.uk> <36597FC9-E4AC-4659-BB78-03A0AC5B48BC@fluffy.co.uk>
Message-ID: <C727E8C7-4E23-44BE-8FCA-B11BDDFBDE9E@allard.nu>

On 19/02/2006, at 12:46 AM, Ben Summers wrote:

>
> On 18 Feb 2006, at 13:38, Martin Ebourne wrote:
>
>> On Sat, 2006-02-18 at 14:31 +1100, Johan Allard wrote:
>>> On 18/02/2006, at 10:58 AM, Martin Ebourne wrote:
>>>> ii) Given that Apple is trying to emulate GNU readline then simply
>>>> giving --enable-gnu-readline to ./configure should get it working
>>>> correctly.
>>>
>>> It doesn't sadly. I tried this first and regardless that I actually
>>> have readline compiled in /opt/local (using darwinports) I couldn't
>>> get readline support to be recognized by configure. That's the only
>>> reason I decided to patch instead.
>>
>> In which case we should try and fix that then.
>>
>> Can you run configure with readline as above and post the config.log
>> output compressed?
>
> Works on my Mac OS X installation with -enable-gnu-readline -- but  
> I have fink installed, and the BoxPlatform.pm module detects and  
> uses this.

And if we can make this work with the default OS X installation,  
surely that must be preferable. I tried again with beta3 and it still  
wouldn't pick up readline in darwinports.

Cheers

//johan

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 10:32:14 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Sun, 19 Feb 2006 02:32:14 -0800
Subject: [Box Backup-dev] RC3 test: FreeBSD 6.0 Failures
Message-ID: <43F8492E.7000603@reedtz.com>

This is a multi-part message in MIME format.
--------------030702060106000001050008
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Here are the results of the debug tests on FreeBSD 6.0:

common: PASSED
crypto: PASSED
compress: PASSED
basicserver: PASSED
raidfile: PASSED
backupstore: FAILED: 6 tests failed
backupstorefix: PASSED
backupstorepatch: PASSED
backupdiff: PASSED
bbackupd: PASSED               

And here are the errors in question:

FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
failed at testbackupstore.cpp(1282)
FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
testbackupstore.cpp(1284)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1360)
FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1361)
FAILED: 6 tests failed
backupstore: FAILED: 6 tests
failed                                               

These errors appear to be the same that James O'Gorman found on FreeBSD
5.0 earlier in the week.

I have attached test output and config.log.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


--------------030702060106000001050008
Content-Type: application/x-gzip; x-mac-type="0"; x-mac-creator="0";
 name="noxa-debug.out.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="noxa-debug.out.gz"

[encoded data, 355875 characters]
1S9uX959+hWAePbLPzp/9uYP/j/mxhM8uKsmAA==
--------------030702060106000001050008
Content-Type: application/x-gzip; x-mac-type="0"; x-mac-creator="0";
 name="config.log.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="config.log.gz"

[encoded data, 17735 characters]
--------------030702060106000001050008--

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 11:17:48 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Sun, 19 Feb 2006 03:17:48 -0800
Subject: [Box Backup-dev] RC3 test: FreeBSD 6.0 Failures
In-Reply-To: <43F84FC7.4060305@reedtz.com>
References: <43F84FC7.4060305@reedtz.com>
Message-ID: <43F853DC.9090507@reedtz.com>

On 2/19/06 3:00 AM, Per Thomsen wrote:
> I ran the debug test again, (./runtest.pl ALL debug) and this time I
> only got 2 failed tests:
>
> FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1360)
> FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1361)
>
> Attached is the output again.
>   
The third time I ran the debug test, I got 6 failures again. The same 6
as the initial
test:

FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
failed at testbackupstore.cpp(1282)
FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
testbackupstore.cpp(1284)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1360)
FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1361)
FAILED: 6 tests failed
backupstore: FAILED: 6 tests

Let me know if you need more output, or different tests run.

Thanks,
Per


-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 12:17:23 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Sun, 19 Feb 2006 12:17:23 +0000
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <1140143752.6545.19.camel@avenin.ebourne.me.uk>
References: <20060214143955.GM31646@netinertia.co.uk> <1139928784.3333.0.camel@avenin.ebourne.me.uk> <20060214154505.GO31646@netinertia.co.uk> <1139934391.3880.5.camel@avenin.ebourne.me.uk> <20060214194449.GP31646@netinertia.co.uk> <Pine.LNX.4.62.0602142058400.14656@top.qwarx.com> <20060215103612.GQ31646@netinertia.co.uk> <1140143752.6545.19.camel@avenin.ebourne.me.uk>
Message-ID: <20060219121723.GA12859@netinertia.co.uk>

Hi Martin,

On Fri, Feb 17, 2006 at 02:35:51AM +0000, Martin Ebourne wrote:
> Have you tried running exactly the same version a few times? Are your
> failures consistent? If not, then you'll have to be a lot more careful
> running different versions (ie. try running each version a few times).

You're right, r362 isn't consistent, however r363 does seem to be
consistent in providing the same 6 errors.

I'm running these tests on both 5.4 and 6.0 now, by the way.

Per, have you found the same?

James

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 15:43:25 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Sun, 19 Feb 2006 16:43:25 +0100
Subject: [Box Backup-dev] Problems with compilen under Windows XP with Visual Studio 2003
Message-ID: <43F8921D.4050106@hostingbrothers.nl>

This is a multi-part message in MIME format.
--------------060206080901090500020209
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I've tried to compile the trunk version on Windows XP with Visual Studio 
2003, but get a few errors and a lot of warnings.

The build log is attatched. The errors are:

Project: common:
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(135) : error C3861: 
'_beginthreadex': identifier not found, even with argument-dependent lookup
c1xx : fatal error C1083: Cannot open source file: 
'\Backup\Box\boxbackup\lib\common\LinuxWorkaround.cpp': No such file or 
directory
d:\Backup\Box\boxbackup\lib\common\DebugMemLeakFinder.cpp(278) : error 
C3861: 'getpid': identifier not found, even with argument-dependent lookup

Project: bbackupd:
c1xx : fatal error C1083: Cannot open source file: 
'\Backup\Box\boxbackup\bin\bbackupd\ServiceBackupDaemon.cpp': No such 
file or directory
c1xx : fatal error C1083: Cannot open source file: 
'\Backup\Box\boxbackup\bin\bbackupd\bbwinservice.cpp': No such file or 
directory
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(132) : error 
C3861: '_beginthreadex': identifier not found, even with 
argument-dependent lookup

Project: win32test:
c1xx : fatal error C1083: Cannot open source file: 
'\Backup\Box\boxbackup\lib\win32\win32test.cpp': No such file or directory
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(135) : error C3861: 
'_beginthreadex': identifier not found, even with argument-dependent lookup

Project: boxquery
LINK : fatal error LNK1181: cannot open input file 
'd:\Backup\Box\boxbackup\infrastructure\msvc\2003\..\..\..\Release\common.lib'

Does anyone of you know what i've done wrong?

Mark


--------------060206080901090500020209
Content-Type: text/plain;
 name="buildlog.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="buildlog.txt"

------ Rebuild All started: Project: common, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'common', configuration 'Debug|Win32'.
Compiling...
TLSContext.cpp
SSLLib.cpp
SocketStreamTLS.cpp
d:\Backup\Box\boxbackup\lib\server\SocketStreamTLS.cpp(130) : warning C4244: 'argument' : conversion from 'tOSSocketHandle' to 'int', possible loss of data
SocketStream.cpp
d:\Backup\Box\boxbackup\lib\server\SocketStream.cpp(77) : warning C4244: 'argument' : conversion from 'const tOSSocketHandle' to 'int', possible loss of data
Socket.cpp
ProtocolUncertainStream.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
ProtocolObject.cpp
Protocol.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(641) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(709) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'u_int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(713) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'u_long', possible loss of data
LocalProcessStream.cpp
Daemon.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
autogen_ServerException.cpp
autogen_ConnectionException.cpp
emu.cpp
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(135) : error C3861: '_beginthreadex': identifier not found, even with argument-dependent lookup
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1110) : warning C4018: '>' : signed/unsigned mismatch
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1196) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1226) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
RollingChecksum.cpp
Random.cpp
MD5Digest.cpp
CipherDescription.cpp
CipherContext.cpp
CipherBlowfish.cpp
CipherAES.cpp
Generating Code...
Compiling...
autogen_CipherException.cpp
BackupStoreObjectDump.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
BackupStoreFileRevDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(63) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(179) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(184) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(189) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(193) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
BackupStoreFilenameClear.cpp
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(227) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(236) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(259) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(269) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupStoreFilename.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilename.cpp(144) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilename.cpp(219) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupStoreFileEncodeStream.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(140) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(145) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(154) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(163) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(165) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(165) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(273) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(377) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(448) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(448) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(454) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(454) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(458) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(461) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(465) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(466) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(467) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(473) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(492) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
BackupStoreFileDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileDiff.cpp(325) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
BackupStoreFileCryptVar.cpp
BackupStoreFileCombine.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(99) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(255) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(267) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(397) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int32_t', possible loss of data
BackupStoreFileCmbIdx.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(177) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(244) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(259) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int', possible loss of data
BackupStoreFileCmbDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(82) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(204) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(211) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(287) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
BackupStoreFile.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(531) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(607) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(614) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(681) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(937) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(1025) : warning C4311: 'type cast' : pointer truncation from 'const void *' to 'long'
BackupStoreDirectory.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.cpp(195) : warning C4267: 'initializing' : conversion from 'size_t' to 'int32_t', possible loss of data
BackupDaemonConfigVerify.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BackupClientRestore.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientRestore.cpp(107) : warning C4267: 'initializing' : conversion from 'size_t' to 'int32_t', possible loss of data
BackupClientMakeExcludeList.cpp
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
BackupClientFileAttributes.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientFileAttributes.cpp(641) : warning C4267: '+=' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientFileAttributes.cpp(995) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupClientCryptoKeys.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
autogen_BackupStoreException.cpp
autogen_BackupProtocolClient.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
Generating Code...
Compiling...
WaitForEvent.cpp
d:\Backup\Box\boxbackup\lib\common\WaitForEvent.cpp(166) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned long', possible loss of data
Utils.cpp
d:\Backup\Box\boxbackup\lib\common\Utils.cpp(42) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data
UnixUser.cpp
StreamableMemBlock.cpp
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(118) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(127) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(144) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
ReadGatherStream.cpp
d:\Backup\Box\boxbackup\lib\common\ReadGatherStream.cpp(72) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\ReadGatherStream.cpp(148) : warning C4244: 'initializing' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
PartialReadStream.cpp
MemBlockStream.cpp
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(182) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(185) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(188) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
LinuxWorkaround.cpp
c1xx : fatal error C1083: Cannot open source file: '\Backup\Box\boxbackup\lib\common\LinuxWorkaround.cpp': No such file or directory
IOStreamGetLine.cpp
d:\Backup\Box\boxbackup\lib\common\IOStreamGetLine.cpp(155) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
IOStream.cpp
FileStream.cpp
FdGetLine.cpp
d:\Backup\Box\boxbackup\lib\common\FdGetLine.cpp(172) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
ExcludeList.cpp
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
EventWatchFilesystemObject.cpp
DebugPrintf.cpp
DebugMemLeakFinder.cpp
d:\Backup\Box\boxbackup\lib\common\DebugMemLeakFinder.cpp(278) : error C3861: 'getpid': identifier not found, even with argument-dependent lookup
DebugAssertFailed.cpp
ConversionString.cpp
Configuration.cpp
CollectInBufferStream.cpp
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(164) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(167) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(170) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
Generating Code...
Compiling...
BoxTimeToText.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BoxTime.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BoxException.cpp
autogen_ConversionException.cpp
autogen_CommonException.cpp
CompressStream.cpp
autogen_CompressException.cpp
Generating Code...

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
common - 3 error(s), 125 warning(s)


------ Rebuild All started: Project: bbackupd, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'bbackupd', configuration 'Debug|Win32'.
Compiling...
ServiceBackupDaemon.cpp
c1xx : fatal error C1083: Cannot open source file: '\Backup\Box\boxbackup\bin\bbackupd\ServiceBackupDaemon.cpp': No such file or directory
bbwinservice.cpp
c1xx : fatal error C1083: Cannot open source file: '\Backup\Box\boxbackup\bin\bbackupd\bbwinservice.cpp': No such file or directory
bbackupd.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BackupDaemon.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(132) : error C3861: '_beginthreadex': identifier not found, even with argument-dependent lookup
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(292) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(347) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(719) : warning C4244: 'argument' : conversion from 'box_time_t' to 'uint32_t', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(792) : warning C4244: 'argument' : conversion from 'box_time_t' to 'uint32_t', possible loss of data
BackupClientInodeToIDMap.cpp
BackupClientDirectoryRecord.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupClientDirectoryRecord.cpp(264) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupClientDirectoryRecord.cpp(696) : warning C4101: 'e' : unreferenced local variable
BackupClientDeleteList.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
BackupClientContext.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
Generating Code...

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
bbackupd - 3 error(s), 31 warning(s)


------ Rebuild All started: Project: win32test, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'win32test', configuration 'Debug|Win32'.
Compiling...
win32test.cpp
c1xx : fatal error C1083: Cannot open source file: '\Backup\Box\boxbackup\lib\win32\win32test.cpp': No such file or directory
emu.cpp
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(135) : error C3861: '_beginthreadex': identifier not found, even with argument-dependent lookup
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1110) : warning C4018: '>' : signed/unsigned mismatch
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1196) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1226) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
Generating Code...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '\backup\box\boxbackup\debug\win32test.sbr': No such file or directory

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
win32test - 3 error(s), 3 warning(s)


------ Rebuild All started: Project: boxquery, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'boxquery', configuration 'Debug|Win32'.
Compiling...
bbackupquery.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BackupQueries.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
autogen_Documentation.cpp
Generating Code...
Linking...
LINK : fatal error LNK1104: cannot open file 'd:\Backup\Box\boxbackup\infrastructure\msvc\2003\..\..\..\Debug\common.lib'

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
boxquery - 1 error(s), 8 warning(s)


------ Rebuild All started: Project: bbackupctl, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'bbackupctl', configuration 'Debug|Win32'.
Compiling...
bbackupctl.cpp
d:\Backup\Box\boxbackup\bin\bbackupctl\bbackupctl.cpp(218) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
Linking...
LINK : fatal error LNK1104: cannot open file 'd:\Backup\Box\boxbackup\infrastructure\msvc\2003\..\..\..\Debug\common.lib'

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
bbackupctl - 1 error(s), 1 warning(s)


---------------------- Done ----------------------

    Rebuild All: 0 succeeded, 5 failed, 0 skipped



--------------060206080901090500020209--

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 16:03:40 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Sun, 19 Feb 2006 17:03:40 +0100
Subject: [Box Backup-dev] Header warning on RedHat ES 4
Message-ID: <013d01c6356e$0cf7a9f0$0301050a@stenorhem>

This is a multi-part message in MIME format.

------=_NextPart_000_013A_01C63576.6E82D980
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

/usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel =
header; include <endian.h> instead!

However, it compiles ok and all tests pass.

If I try to replace asm/byteorder.h with endian.h I get these errors:

../../lib/common/Archive.h: In member function `void =
Archive::Write(int64_t)':
../../lib/common/Archive.h:93: error: `__cpu_to_be64' undeclared (first =
use this function)

Stefan

------=_NextPart_000_013A_01C63576.6E82D980
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>/usr/include/asm/byteorder.h:6:2: =
warning: #warning=20
using private kernel header; include &lt;endian.h&gt; =
instead!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>However, it compiles ok and all tests=20
pass.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>If I try to replace=20
asm/byteorder.h with endian.h I get these errors:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>../../lib/common/Archive.h: In member =
function=20
`void Archive::Write(int64_t)':<BR>../../lib/common/Archive.h:93: error: =

`__cpu_to_be64' undeclared (first use this function)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Stefan</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_013A_01C63576.6E82D980--


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 16:27:03 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sun, 19 Feb 2006 16:27:03 +0000
Subject: [Box Backup-dev] Header warning on RedHat ES 4
In-Reply-To: <013d01c6356e$0cf7a9f0$0301050a@stenorhem>
References: <013d01c6356e$0cf7a9f0$0301050a@stenorhem>
Message-ID: <1140366423.21015.1.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-19 at 17:03 +0100, Stefan Norlin wrote:
> /usr/include/asm/byteorder.h:6:2: warning: #warning using private
> kernel header; include <endian.h> instead!
>  
> However, it compiles ok and all tests pass.
>  
> If I try to replace asm/byteorder.h with endian.h I get these errors:
>  
> ../../lib/common/Archive.h: In member function `void
> Archive::Write(int64_t)':
> ../../lib/common/Archive.h:93: error: `__cpu_to_be64' undeclared
> (first use this function)

This is a known issue. It only applies to i386 linux and is arguably a
bug in the linux headers. Exactly the same header works fine on x86_64
and ppc linux.

This has also been covered in the archives. :)

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 16:48:18 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 19 Feb 2006 08:48:18 -0800 (PST)
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
In-Reply-To: <1140366423.21015.1.camel@avenin.ebourne.me.uk>
Message-ID: <20060219164852.3250.qmail@web36713.mail.mud.yahoo.com>

Hi,

I am trying to get the new 0.10 built under RedHad9. Since BDB upgrade is necessary for 0.10, I
built and installed it to /usr/local/BerkeleyDB.4.4. However, when I try to customize the
configure with:

./configure --with-bdb-dir=/usr/local/BerkeleyDB.4.4

... it will detect the headers, but not the lib:

checking db.h presence in /usr/local/BerkeleyDB.4.4/include... yes
checking for db.h... 4.4.20
checking for library containing Berkeley DB 4.4.20... no
configure: no Berkeley DB version  or higher found

/usr/local/BerkeleyDB.4.4/lib/libdb.a is there just fine. I guess I need a BDB equivalent of
--with-ssl-lib=DIR?

Ideas?

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 16:58:48 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sun, 19 Feb 2006 16:58:48 +0000
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
In-Reply-To: <20060219164852.3250.qmail@web36713.mail.mud.yahoo.com>
References: <20060219164852.3250.qmail@web36713.mail.mud.yahoo.com>
Message-ID: <1140368328.21015.3.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-19 at 08:48 -0800, Gary wrote:
> Hi,
> 
> I am trying to get the new 0.10 built under RedHad9. Since BDB upgrade is necessary for 0.10, I
> built and installed it to /usr/local/BerkeleyDB.4.4. However, when I try to customize the
> configure with:
> 
> ./configure --with-bdb-dir=/usr/local/BerkeleyDB.4.4
> 
> ... it will detect the headers, but not the lib:
> 
> checking db.h presence in /usr/local/BerkeleyDB.4.4/include... yes
> checking for db.h... 4.4.20
> checking for library containing Berkeley DB 4.4.20... no
> configure: no Berkeley DB version  or higher found
> 
> /usr/local/BerkeleyDB.4.4/lib/libdb.a is there just fine. I guess I need a BDB equivalent of
> --with-ssl-lib=DIR?

That's a static library. It's looking for a shared lib. You can try
--enable-static-bin but then it may not find dependencies it needs.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 17:08:20 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 19 Feb 2006 09:08:20 -0800 (PST)
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
In-Reply-To: <1140368328.21015.3.camel@avenin.ebourne.me.uk>
Message-ID: <20060219170820.9451.qmail@web36711.mail.mud.yahoo.com>

> That's a static library. It's looking for a shared lib. You can try
> --enable-static-bin but then it may not find dependencies it needs.

--enable-static-bin had the same problem, but thanks for the tip. Making a /lib/libdb-4.4.so
softlink to /usr/local/BerkeleyDB.4.4/lib/libdb-4.4.so did the trick.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 17:17:54 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sun, 19 Feb 2006 17:17:54 +0000
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
In-Reply-To: <20060219170820.9451.qmail@web36711.mail.mud.yahoo.com>
References: <20060219170820.9451.qmail@web36711.mail.mud.yahoo.com>
Message-ID: <1140369475.21015.5.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-19 at 09:08 -0800, Gary wrote:
> > That's a static library. It's looking for a shared lib. You can try
> > --enable-static-bin but then it may not find dependencies it needs.
> 
> --enable-static-bin had the same problem, but thanks for the tip. Making a /lib/libdb-4.4.so
> softlink to /usr/local/BerkeleyDB.4.4/lib/libdb-4.4.so did the trick.

Can you send a compressed config.log from a failed configure without
this extra symlink?

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 17:49:40 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Sun, 19 Feb 2006 18:49:40 +0100
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
References: <20060219164852.3250.qmail@web36713.mail.mud.yahoo.com>
Message-ID: <016b01c6357c$dbe347c0$0301050a@stenorhem>

> checking db.h presence in /usr/local/BerkeleyDB.4.4/include... yes
> checking for db.h... 4.4.20
> checking for library containing Berkeley DB 4.4.20... no
> configure: no Berkeley DB version  or higher found
>
> /usr/local/BerkeleyDB.4.4/lib/libdb.a is there just fine. I guess I need a 
> BDB equivalent of
> --with-ssl-lib=DIR?
>
> Ideas?

I had the same problem on Solaris until I realized I needed to set

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/BerkelyDB.4.4/lib

as well since configure tries to both compile and execute the program.

Maybe it will solve your problem as well... if not, post a compressed
config.log as well. I realized what the problem was from investigating
config.log in more detail.

Stefan


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 18:02:52 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 19 Feb 2006 18:02:52 +0000 (GMT)
Subject: [Box Backup-dev] Problems with compilen under Windows XP with
 Visual Studio 2003
In-Reply-To: <43F8921D.4050106@hostingbrothers.nl>
References: <43F8921D.4050106@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602191748230.14656@top.qwarx.com>

Hi Mark,

> I've tried to compile the trunk version on Windows XP with Visual Studio 
> 2003, but get a few errors and a lot of warnings.

The Visual Studio 2003 project files have not been updated since I don't 
have a copy of VS2003 to edit them with. You will need to add the missing 
files, whose names have changed slightly.

> Project: common:
> d:\Backup\Box\boxbackup\lib\win32\emu.cpp(135) : error C3861: 
> '_beginthreadex': identifier not found, even with argument-dependent lookup
> c1xx : fatal error C1083: Cannot open source file:

I really don't understand this one. Can you search your SDK header files 
for _beginthreadex and try to figure out why it's not being defined? It 
should be present on Windows XP.

> '\Backup\Box\boxbackup\lib\common\LinuxWorkaround.cpp': No such file or 
> directory

I think you can safely remove this one.

> d:\Backup\Box\boxbackup\lib\common\DebugMemLeakFinder.cpp(278) : error C3861: 
> 'getpid': identifier not found, even with argument-dependent lookup

Can you check your lib/common/BoxConfig.h to see if it says "#define 
HAVE_GETPID? If so, could you comment out that line?

> Project: bbackupd:
> c1xx : fatal error C1083: Cannot open source file: 
> '\Backup\Box\boxbackup\bin\bbackupd\ServiceBackupDaemon.cpp': No such file or 
> directory

Now called Win32BackupService.cpp.

> c1xx : fatal error C1083: Cannot open source file: 
> '\Backup\Box\boxbackup\bin\bbackupd\bbwinservice.cpp': No such file or 
> directory

Now called Win32ServiceFunctions.cpp.

> Project: win32test:
> c1xx : fatal error C1083: Cannot open source file: 
> '\Backup\Box\boxbackup\lib\win32\win32test.cpp': No such file or directory
> d:\Backup\Box\boxbackup\lib\win32\emu.cpp(135) : error C3861: 
> '_beginthreadex': identifier not found, even with argument-dependent lookup

Now in test/win32.

If you get it to build, please submit your updated project files so that I 
can update the source distribution.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 18:24:20 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 19 Feb 2006 10:24:20 -0800 (PST)
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
In-Reply-To: <1140369475.21015.5.camel@avenin.ebourne.me.uk>
Message-ID: <20060219182420.63928.qmail@web36703.mail.mud.yahoo.com>

--0-2114833990-1140373460=:50683
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Id: 
Content-Disposition: inline

> Can you send a compressed config.log from a failed configure without
> this extra symlink?

Sure, not a problem - attached config.log.gz.

BDB was installed in /usr/local/BerkeleyDB.4.4/.

OpenSSL was installed in /usr/local/openssl-0.9.8a/.

Configure was executed with:

./configure --with-bdb-dir=/usr/local/BerkeleyDB.4.4
--with-ssl-headers=/usr/local/openssl-0.9.8a/include --with-ssl-lib=/usr/local/openssl-0.9.8a

---

By the way, --with-ssl-headers needs the "include" subdirectory specification, but --with-ssl-lib
does NOT (it will fail on /usr/local/openssl-0.9.8a/lib). Thought I would mention that, since it
is a little bit inconsistent.

Hope this helps...

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--0-2114833990-1140373460=:50683
Content-Type: application/x-gzip-compressed; name="config.log.gz"
Content-Transfer-Encoding: base64
Content-Description: 1428319119-config.log.gz
Content-Disposition: attachment; filename="config.log.gz"

[encoded data, 17812 characters]
KIkBOVrAwC3fAFuG8KqecVz8B/f/Cze9XAIA

--0-2114833990-1140373460=:50683--

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 18:31:29 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 19 Feb 2006 10:31:29 -0800 (PST)
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
In-Reply-To: <016b01c6357c$dbe347c0$0301050a@stenorhem>
Message-ID: <20060219183129.98969.qmail@web36706.mail.mud.yahoo.com>

> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/BerkelyDB.4.4/lib

Good point. However, I decided to stick with a softlink, since bbstored will have the same
problem.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 18:49:23 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 19 Feb 2006 10:49:23 -0800 (PST)
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
Message-ID: <20060219184923.96974.qmail@web36715.mail.mud.yahoo.com>

> By the way, --with-ssl-headers needs the "include" subdirectory specification, but
> --with-ssl-lib
> does NOT (it will fail on /usr/local/openssl-0.9.8a/lib). Thought I would mention that, since it
> is a little bit inconsistent.

Actually, spoke too soon, there is something more going on there. If I specify
/usr/local/openssl-0.9.8a/lib, configure will fail with:

---

configure:7695: g++ -o conftest -g -O2  -I/usr/local/BerkeleyDB.4.4/include
-I/usr/local/openssl-0.9.8a/include -L/usr/local/BerkeleyDB.4.4/lib 
-L/usr/local/openssl-0.9.8a/lib conftest.cc -lssl -lcrypto -ldb -lz  >&5
/usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0x37): In function `dlfcn_load':
: undefined reference to `dlopen'
/usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0x98): In function `dlfcn_load':
: undefined reference to `dlclose'
/usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0xc0): In function `dlfcn_load':
: undefined reference to `dlerror'
/usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0x141): In function `dlfcn_bind_var':
: undefined reference to `dlsym'
/usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0x16c): In function `dlfcn_bind_var':
: undefined reference to `dlerror'
/usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0x229): In function
`dlfcn_bind_func':
: undefined reference to `dlsym'
/usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0x254): In function
`dlfcn_bind_func':
: undefined reference to `dlerror'
/usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0x50a): In function `dlfcn_unload':
: undefined reference to `dlclose'

---

Is this a problem with openssl-0.9.8a? Should I revert to 0.9.7x?

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 19:21:29 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 19 Feb 2006 19:21:29 +0000 (GMT)
Subject: [Box Backup-dev] Configuring BerkeleyDB for 0.10 build
In-Reply-To: <20060219184923.96974.qmail@web36715.mail.mud.yahoo.com>
References: <20060219184923.96974.qmail@web36715.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602191920310.14656@top.qwarx.com>

Hi Gary,

> /usr/local/openssl-0.9.8a/lib/libcrypto.a(dso_dlfcn.o)(.text+0x37): In function `dlfcn_load':
> : undefined reference to `dlopen'

I saw something similar on Solaris. Try exporting LIBS=-ldl and running 
configure again.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 19:40:34 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Sun, 19 Feb 2006 11:40:34 -0800
Subject: [Box Backup-dev] Trunk test failures on FreeBSD (5.x/i386)
In-Reply-To: <20060219121723.GA12859@netinertia.co.uk>
References: <20060214143955.GM31646@netinertia.co.uk> <1139928784.3333.0.camel@avenin.ebourne.me.uk> <20060214154505.GO31646@netinertia.co.uk> <1139934391.3880.5.camel@avenin.ebourne.me.uk> <20060214194449.GP31646@netinertia.co.uk> <Pine.LNX.4.62.0602142058400.14656@top.qwarx.com> <20060215103612.GQ31646@netinertia.co.uk> <1140143752.6545.19.camel@avenin.ebourne.me.uk> <20060219121723.GA12859@netinertia.co.uk>
Message-ID: <43F8C9B2.3030403@reedtz.com>

On 2/19/06 4:17 AM, James O'Gorman wrote:
> Hi Martin,
>
> On Fri, Feb 17, 2006 at 02:35:51AM +0000, Martin Ebourne wrote:
>   
>> Have you tried running exactly the same version a few times? Are your
>> failures consistent? If not, then you'll have to be a lot more careful
>> running different versions (ie. try running each version a few times).
>>     
>
> You're right, r362 isn't consistent, however r363 does seem to be
> consistent in providing the same 6 errors.
>
> I'm running these tests on both 5.4 and 6.0 now, by the way.
>
> Per, have you found the same?
>   
Well, my findings are a bit muddled, I fear... First off, I'm using the
release candidate, and I don't know (although I probably should) what
SVN version that is.

Secondly, I am seeing differing results when I run the debug tests. The
backupstore tests always fail, but not in a consistent manner. So far
I've run them 4 times, and the results are as follows:

Test 1: 6 failures

FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
failed at testbackupstore.cpp(1282)
FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
testbackupstore.cpp(1284)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1360)
FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1361)


Test 2: 2 failures

FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1360)
FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1361)


Test 3: 6 failures (same as test 1)

FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
failed at testbackupstore.cpp(1282)
FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
testbackupstore.cpp(1284)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [foundCurrent] failed at testbackupstore.cpp(1360)
FAILURE: Condition [foundOld] failed at testbackupstore.cpp(1361)



Test 4:  4 failures

FAILURE: Condition [dir.GetAttributesModTime() == 329483209443598LL]
failed at testbackupstore.cpp(1282)
FAILURE: Condition [dir.GetAttributes() == attrtest] failed at
testbackupstore.cpp(1284)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)
FAILURE: Condition [en->GetName() != uploads[UPLOAD_FILE_TO_MOVE].name]
failed at testbackupstore.cpp(1331)


I don't know why these differences in test results occur. Something
timing-related perhaps, but I can't tell what...

Is there some cleanup that should be done prior to each test?

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 22:41:44 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Sun, 19 Feb 2006 23:41:44 +0100
Subject: [Box Backup-dev] Problems with compilen under Windows XP with
 Visual Studio 2003
In-Reply-To: <Pine.LNX.4.62.0602191748230.14656@top.qwarx.com>
References: <43F8921D.4050106@hostingbrothers.nl> <Pine.LNX.4.62.0602191748230.14656@top.qwarx.com>
Message-ID: <43F8F428.3070404@hostingbrothers.nl>

This is a multi-part message in MIME format.
--------------000104090705090906060301
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Chris,

I've done the things you've told me to do, plus I've changed all the
project settings and set the option Runtime Library to Multi-Threaded
Debug. That solved the problem with not finding _beginthreadex'! I also
did comment #define HAVE_GETPID 1 in BoxConfig.h.

Now I've got a new problem, there are 2 .lib files not found:
boxbackup\infrastructure\msvc\2003\..\..\..\lib\win32\Debug\boost_regex.lib
boxbackup\infrastructure\msvc\2003\..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib

Do you know what to do about that?

Mark

PS: Build Log is attatched


> Hi Mark,
>
>> I've tried to compile the trunk version on Windows XP with Visual 
>> Studio 2003, but get a few errors and a lot of warnings.
>
> The Visual Studio 2003 project files have not been updated since I 
> don't have a copy of VS2003 to edit them with. You will need to add 
> the missing files, whose names have changed slightly.
>
>> Project: common:
>> d:\Backup\Box\boxbackup\lib\win32\emu.cpp(135) : error C3861: 
>> '_beginthreadex': identifier not found, even with argument-dependent 
>> lookup
>> c1xx : fatal error C1083: Cannot open source file:
>
> I really don't understand this one. Can you search your SDK header 
> files for _beginthreadex and try to figure out why it's not being 
> defined? It should be present on Windows XP.
>
>> '\Backup\Box\boxbackup\lib\common\LinuxWorkaround.cpp': No such file 
>> or directory
>
> I think you can safely remove this one.
>
>> d:\Backup\Box\boxbackup\lib\common\DebugMemLeakFinder.cpp(278) : 
>> error C3861: 'getpid': identifier not found, even with 
>> argument-dependent lookup
>
> Can you check your lib/common/BoxConfig.h to see if it says "#define 
> HAVE_GETPID? If so, could you comment out that line?
>
>> Project: bbackupd:
>> c1xx : fatal error C1083: Cannot open source file: 
>> '\Backup\Box\boxbackup\bin\bbackupd\ServiceBackupDaemon.cpp': No such 
>> file or directory
>
> Now called Win32BackupService.cpp.
>
>> c1xx : fatal error C1083: Cannot open source file: 
>> '\Backup\Box\boxbackup\bin\bbackupd\bbwinservice.cpp': No such file 
>> or directory
>
> Now called Win32ServiceFunctions.cpp.
>
>> Project: win32test:
>> c1xx : fatal error C1083: Cannot open source file: 
>> '\Backup\Box\boxbackup\lib\win32\win32test.cpp': No such file or 
>> directory
>> d:\Backup\Box\boxbackup\lib\win32\emu.cpp(135) : error C3861: 
>> '_beginthreadex': identifier not found, even with argument-dependent 
>> lookup
>
> Now in test/win32.
>
> If you get it to build, please submit your updated project files so 
> that I can update the source distribution.
>
> Cheers, Chris.



--------------000104090705090906060301
Content-Type: text/plain;
 name="buildlog.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="buildlog.txt"

------ Rebuild All started: Project: common, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'common', configuration 'Debug|Win32'.
Compiling...
TLSContext.cpp
SSLLib.cpp
SocketStreamTLS.cpp
d:\Backup\Box\boxbackup\lib\server\SocketStreamTLS.cpp(130) : warning C4244: 'argument' : conversion from 'tOSSocketHandle' to 'int', possible loss of data
SocketStream.cpp
d:\Backup\Box\boxbackup\lib\server\SocketStream.cpp(77) : warning C4244: 'argument' : conversion from 'const tOSSocketHandle' to 'int', possible loss of data
Socket.cpp
ProtocolUncertainStream.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
ProtocolObject.cpp
Protocol.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(641) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(709) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'u_int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(713) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'u_long', possible loss of data
LocalProcessStream.cpp
Daemon.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
autogen_ServerException.cpp
autogen_ConnectionException.cpp
emu.cpp
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1110) : warning C4018: '>' : signed/unsigned mismatch
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1196) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1226) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
RollingChecksum.cpp
Random.cpp
MD5Digest.cpp
CipherDescription.cpp
CipherContext.cpp
CipherBlowfish.cpp
CipherAES.cpp
Generating Code...
Compiling...
autogen_CipherException.cpp
BackupStoreObjectDump.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
BackupStoreFileRevDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(63) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(179) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(184) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(189) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(193) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
BackupStoreFilenameClear.cpp
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(227) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(236) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(259) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(269) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupStoreFilename.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilename.cpp(144) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilename.cpp(219) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupStoreFileEncodeStream.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(140) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(145) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(154) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(163) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(165) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(165) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(273) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(377) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(448) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(448) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(454) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(454) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(458) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(461) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(465) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(466) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(467) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(473) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(492) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
BackupStoreFileDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileDiff.cpp(325) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
BackupStoreFileCryptVar.cpp
BackupStoreFileCombine.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(99) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(255) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(267) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(397) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int32_t', possible loss of data
BackupStoreFileCmbIdx.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(177) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(244) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(259) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int', possible loss of data
BackupStoreFileCmbDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(82) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(204) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(211) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(287) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
BackupStoreFile.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(531) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(607) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(614) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(681) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(937) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(1025) : warning C4311: 'type cast' : pointer truncation from 'const void *' to 'long'
BackupStoreDirectory.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.cpp(195) : warning C4267: 'initializing' : conversion from 'size_t' to 'int32_t', possible loss of data
BackupDaemonConfigVerify.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BackupClientRestore.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientRestore.cpp(107) : warning C4267: 'initializing' : conversion from 'size_t' to 'int32_t', possible loss of data
BackupClientMakeExcludeList.cpp
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
BackupClientFileAttributes.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientFileAttributes.cpp(641) : warning C4267: '+=' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientFileAttributes.cpp(995) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupClientCryptoKeys.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
autogen_BackupStoreException.cpp
autogen_BackupProtocolClient.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
Generating Code...
Compiling...
WaitForEvent.cpp
d:\Backup\Box\boxbackup\lib\common\WaitForEvent.cpp(166) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned long', possible loss of data
Utils.cpp
d:\Backup\Box\boxbackup\lib\common\Utils.cpp(42) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data
UnixUser.cpp
StreamableMemBlock.cpp
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(118) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(127) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(144) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
ReadGatherStream.cpp
d:\Backup\Box\boxbackup\lib\common\ReadGatherStream.cpp(72) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\ReadGatherStream.cpp(148) : warning C4244: 'initializing' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
PartialReadStream.cpp
MemBlockStream.cpp
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(182) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(185) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(188) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
IOStreamGetLine.cpp
d:\Backup\Box\boxbackup\lib\common\IOStreamGetLine.cpp(155) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
IOStream.cpp
FileStream.cpp
FdGetLine.cpp
d:\Backup\Box\boxbackup\lib\common\FdGetLine.cpp(172) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
ExcludeList.cpp
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
EventWatchFilesystemObject.cpp
DebugPrintf.cpp
DebugMemLeakFinder.cpp
DebugAssertFailed.cpp
ConversionString.cpp
Configuration.cpp
CollectInBufferStream.cpp
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(164) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(167) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(170) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
BoxTimeToText.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
Generating Code...
Compiling...
BoxTime.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BoxException.cpp
autogen_ConversionException.cpp
autogen_CommonException.cpp
CompressStream.cpp
autogen_CompressException.cpp
Generating Code...
Creating library...

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
common - 0 error(s), 125 warning(s)


------ Rebuild All started: Project: win32test, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'win32test', configuration 'Debug|Win32'.
Compiling...
testlibwin32.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
emu.cpp
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1110) : warning C4018: '>' : signed/unsigned mismatch
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1196) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1226) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
Generating Code...
Linking...
LINK : fatal error LNK1104: cannot open file 'd:\Backup\Box\boxbackup\infrastructure\msvc\2003\..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib'
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
win32test - 1 error(s), 4 warning(s)


------ Rebuild All started: Project: bbackupd, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'bbackupd', configuration 'Debug|Win32'.
Compiling...
Win32ServiceFunctions.cpp
Win32BackupService.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
bbackupd.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BackupDaemon.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(292) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(347) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(719) : warning C4244: 'argument' : conversion from 'box_time_t' to 'uint32_t', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(792) : warning C4244: 'argument' : conversion from 'box_time_t' to 'uint32_t', possible loss of data
BackupClientInodeToIDMap.cpp
BackupClientDirectoryRecord.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupClientDirectoryRecord.cpp(264) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupClientDirectoryRecord.cpp(696) : warning C4101: 'e' : unreferenced local variable
BackupClientDeleteList.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
BackupClientContext.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
Generating Code...
Linking...
LINK : fatal error LNK1104: cannot open file 'd:\Backup\Box\boxbackup\infrastructure\msvc\2003\..\..\..\lib\win32\Debug\boost_regex.lib'

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
bbackupd - 1 error(s), 32 warning(s)


------ Rebuild All started: Project: bbackupctl, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'bbackupctl', configuration 'Debug|Win32'.
Compiling...
bbackupctl.cpp
d:\Backup\Box\boxbackup\bin\bbackupctl\bbackupctl.cpp(218) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
Linking...
LINK : fatal error LNK1104: cannot open file 'd:\Backup\Box\boxbackup\infrastructure\msvc\2003\..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib'

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
bbackupctl - 1 error(s), 1 warning(s)


------ Rebuild All started: Project: boxquery, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'boxquery', configuration 'Debug|Win32'.
Compiling...
bbackupquery.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BackupQueries.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
autogen_Documentation.cpp
Generating Code...
Linking...
LINK : fatal error LNK1104: cannot open file 'd:\Backup\Box\boxbackup\infrastructure\msvc\2003\..\..\..\lib\win32\Debug\boost_regex.lib'

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
boxquery - 1 error(s), 8 warning(s)


---------------------- Done ----------------------

    Rebuild All: 1 succeeded, 4 failed, 0 skipped




--------------000104090705090906060301--

From boxbackup-dev@fluffy.co.uk  Sun Feb 19 23:45:05 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 19 Feb 2006 23:45:05 +0000 (GMT)
Subject: [Box Backup-dev] Problems with compilen under Windows XP with
 Visual Studio 2003
In-Reply-To: <43F8F428.3070404@hostingbrothers.nl>
References: <43F8921D.4050106@hostingbrothers.nl> <Pine.LNX.4.62.0602191748230.14656@top.qwarx.com>
 <43F8F428.3070404@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602192343400.14656@top.qwarx.com>

Hi Mark,

> Now I've got a new problem, there are 2 .lib files not found: 
> boxbackup\infrastructure\msvc\2003\..\..\..\lib\win32\Debug\boost_regex.lib 
> boxbackup\infrastructure\msvc\2003\..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib
>
> Do you know what to do about that?

Remove them both from the libraries list, and undefine any preprocessor 
options to do with REGEX, BOOST and BDB.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 00:00:44 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 20 Feb 2006 00:00:44 +0000
Subject: [Box Backup-dev] RC3 test failures on SLES9 ppc64
In-Reply-To: <Pine.LNX.4.62.0602181343390.14656@top.qwarx.com>
References: <Pine.LNX.4.62.0602181343390.14656@top.qwarx.com>
Message-ID: <1140393644.23234.18.camel@avenin.ebourne.me.uk>

On Sat, 2006-02-18 at 14:03 +0000, Chris Wilson wrote:
> Hi all,
> 
> Debug tests failing on SuSE Linux Enterprise Server 9, ppc64:
> 
> gcc@openpower-linux1(gcc)$ cat /etc/issue
> Welcome to SUSE LINUX Enterprise Server 9 (ppc) - Kernel \r (\l).
> 
> gcc@openpower-linux1(gcc)$ uname -a
> Linux openpower-linux1 2.6.5-7.97-pseries64 #1 SMP Fri Jul 2 14:21:59 UTC
> 2004 ppc64 ppc64 ppc64 GNU/Linux
> 
> common: PASSED
> crypto: PASSED
> compress: PASSED
> basicserver: PASSED
> raidfile: FAILED: 6 tests failed

The first failure is like so:

Exception thrown: RaidFileException(FileIsDamagedNotRecoverable) at RaidFileRead.cpp(1420)
FAILURE: Condition [list_matches(names, file_list1)] failed at testraidfile.cpp(840)

Looks very likely that the failure is due to the raidfile store being
corrupted. This sounds pretty serious and I think the only thing there
is going to be get in and debug it.

> backupstore: PASSED
> backupstorefix: FAILED: 12 tests failed
> backupstorepatch: PASSED
> backupdiff: PASSED
> bbackupd: FAILED: 23 tests failed

I'm not sure, but I'd guess at the raidfile failure being a possible
root cause of these other two tests. In particular the bbackupd one
seems to demonstrate that the store just doesn't work at all.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sun Feb 19 23:59:57 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 19 Feb 2006 23:59:57 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r475 - box/chris/general/lib/win32
Message-ID: <20060219235957.1763295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-19 23:59:51 +0000 (Sun, 19 Feb 2006)
New Revision: 475

Modified:
   box/chris/general/lib/win32/WinNamedPipeStream.cpp
   box/chris/general/lib/win32/WinNamedPipeStream.h
Log:
* WinNamedPipeStream.cpp, WinNamedPipeStream.h
- Used overlapped I/O to avoid blocking on ReadFile


Modified: box/chris/general/lib/win32/WinNamedPipeStream.cpp
===================================================================
--- box/chris/general/lib/win32/WinNamedPipeStream.cpp	2006-02-18 11:45:01 UTC (rev 474)
+++ box/chris/general/lib/win32/WinNamedPipeStream.cpp	2006-02-19 23:59:51 UTC (rev 475)
@@ -36,6 +36,8 @@
 // --------------------------------------------------------------------------
 WinNamedPipeStream::WinNamedPipeStream()
 	: mSocketHandle(NULL),
+	  mReadableEvent(INVALID_HANDLE_VALUE),
+	  mBytesInBuffer(0),
 	  mReadClosed(false),
 	  mWriteClosed(false),
 	  mIsServer(false),
@@ -77,7 +79,8 @@
 
 	mSocketHandle = CreateNamedPipeW( 
 		pName,                     // pipe name 
-		PIPE_ACCESS_DUPLEX,        // read/write access 
+		PIPE_ACCESS_DUPLEX |       // read/write access 
+		FILE_FLAG_OVERLAPPED,      // enabled overlapped I/O
 		PIPE_TYPE_MESSAGE |        // message type pipe 
 		PIPE_READMODE_MESSAGE |    // message-read mode 
 		PIPE_WAIT,                 // blocking mode 
@@ -108,6 +111,37 @@
 	mWriteClosed = false;
 	mIsServer    = true; // must flush and disconnect before closing
 	mIsConnected = true;
+
+	// create the Readable event
+	mReadableEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+
+	if (mReadableEvent == INVALID_HANDLE_VALUE)
+	{
+		::syslog(LOG_ERR, "Failed to create the Readable event: "
+			"error %d", GetLastError());
+		Close();
+		THROW_EXCEPTION(CommonException, Internal)
+	}
+
+	// initialise the OVERLAPPED structure
+	memset(&mReadOverlap, 0, sizeof(mReadOverlap));
+	mReadOverlap.hEvent = mReadableEvent;
+
+	// start the first overlapped read
+	if (!ReadFile(mSocketHandle, mReadBuffer, sizeof(mReadBuffer),
+		NULL, &mReadOverlap))
+	{
+		DWORD err = GetLastError();
+
+		if (err != ERROR_IO_PENDING)
+		{
+			::syslog(LOG_ERR, "Failed to start overlapped read: "
+				"error %d", err);
+			Close();
+			THROW_EXCEPTION(ConnectionException, 
+				Conn_SocketReadError)
+		}
+	}
 }
 
 // --------------------------------------------------------------------------
@@ -159,7 +193,10 @@
 int WinNamedPipeStream::Read(void *pBuffer, int NBytes, int Timeout)
 {
 	// TODO no support for timeouts yet
-	ASSERT(Timeout == IOStream::TimeOutInfinite)
+	if (Timeout != IOStream::TimeOutInfinite)
+	{
+		THROW_EXCEPTION(CommonException, AssertFailed)
+	}
 	
 	if (mSocketHandle == NULL || !mIsConnected) 
 	{
@@ -167,25 +204,95 @@
 	}
 
 	DWORD NumBytesRead;
-	
-	bool Success = ReadFile( 
-		mSocketHandle, // pipe handle 
-		pBuffer,       // buffer to receive reply 
-		NBytes,        // size of buffer 
-		&NumBytesRead, // number of bytes read 
-		NULL);         // not overlapped 
-	
-	if (!Success)
+
+	if (mIsServer)
 	{
-		THROW_EXCEPTION(ConnectionException, Conn_SocketReadError)
+		// overlapped I/O completed successfully? (wait if needed)
+
+		if (!GetOverlappedResult(mSocketHandle,
+			&mReadOverlap, &NumBytesRead, TRUE))
+		{
+			DWORD err = GetLastError();
+
+			if (err == ERROR_HANDLE_EOF)
+			{
+				mReadClosed = true;
+			}
+			else
+			{
+				::syslog(LOG_ERR, "Failed to wait for "
+					"ReadFile to complete: error %d", err);
+				Close();
+				THROW_EXCEPTION(ConnectionException, 
+					Conn_SocketReadError)
+			}
+		}
+
+		size_t BytesToCopy = NumBytesRead + mBytesInBuffer;
+		size_t BytesRemaining = 0;
+
+		if (BytesToCopy > NBytes)
+		{
+			BytesRemaining = BytesToCopy - NBytes;
+			BytesToCopy = NBytes;
+		}
+
+		memcpy(pBuffer, mReadBuffer, BytesToCopy);
+		memcpy(mReadBuffer, mReadBuffer + BytesToCopy, BytesRemaining);
+
+		mBytesInBuffer = BytesRemaining;
+		NumBytesRead = BytesToCopy;
+
+		// start the next overlapped read
+		if (!ReadFile(mSocketHandle, 
+			mReadBuffer + mBytesInBuffer, 
+			sizeof(mReadBuffer) - mBytesInBuffer,
+			NULL, &mReadOverlap))
+		{
+			DWORD err = GetLastError();
+			if (err == ERROR_IO_PENDING)
+			{
+				ResetEvent(mReadableEvent);
+			}
+			else if (err == ERROR_HANDLE_EOF)
+			{
+				mReadClosed = true;
+			}
+			else
+			{
+				::syslog(LOG_ERR, "Failed to start "
+					"overlapped read: error %d", err);
+				Close();
+				THROW_EXCEPTION(ConnectionException, 
+					Conn_SocketReadError)
+			}
+		}
+
+		// If the read succeeded immediately, leave the event 
+		// signaled, so that we will be called again to process 
+		// the newly read data and start another overlapped read.
 	}
-	
-	// Closed for reading at EOF?
-	if (NumBytesRead == 0)
+	else
 	{
-		mReadClosed = true;
+		if (!ReadFile( 
+			mSocketHandle, // pipe handle 
+			pBuffer,       // buffer to receive reply 
+			NBytes,        // size of buffer 
+			&NumBytesRead, // number of bytes read 
+			NULL))         // not overlapped 
+		{
+			Close();
+			THROW_EXCEPTION(ConnectionException, 
+				Conn_SocketReadError)
+		}
+		
+		// Closed for reading at EOF?
+		if (NumBytesRead == 0)
+		{
+			mReadClosed = true;
+		}
 	}
-	
+		
 	return NumBytesRead;
 }
 
@@ -223,7 +330,7 @@
 
 		if (!Success)
 		{
-			mWriteClosed = true;	// assume can't write again
+			Close();
 			THROW_EXCEPTION(ConnectionException, 
 				Conn_SocketWriteError)
 		}
@@ -255,7 +362,26 @@
 	}
 
 	if (mIsServer)
-	{	
+	{
+		if (!CancelIo(mSocketHandle))
+		{
+			::syslog(LOG_ERR, "Failed to cancel outstanding "
+				"I/O: error %d", GetLastError());
+		}
+
+		if (mReadableEvent == INVALID_HANDLE_VALUE)
+		{
+			::syslog(LOG_ERR, "Failed to destroy Readable "
+				"event: invalid handle");
+		}
+		else if (!CloseHandle(mReadableEvent))
+		{
+			::syslog(LOG_ERR, "Failed to destroy Readable "
+				"event: error %d", GetLastError());
+		}
+
+		mReadableEvent = INVALID_HANDLE_VALUE;
+
 		if (!FlushFileBuffers(mSocketHandle))
 		{
 			::syslog(LOG_INFO, "FlushFileBuffers failed: %d", 
@@ -275,6 +401,8 @@
 
 	mSocketHandle = NULL;
 	mIsConnected = false;
+	mReadClosed  = true;
+	mWriteClosed = true;
 
 	if (!result) 
 	{
@@ -309,4 +437,27 @@
 	return mWriteClosed;
 }
 
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    IOStream::WriteAllBuffered()
+//		Purpose: Ensures that any data which has been buffered is written to the stream
+//		Created: 2003/08/26
+//
+// --------------------------------------------------------------------------
+void WinNamedPipeStream::WriteAllBuffered()
+{
+	if (mSocketHandle == NULL || !mIsConnected) 
+	{
+		THROW_EXCEPTION(ServerException, BadSocketHandle)
+	}
+	
+	if (!FlushFileBuffers(mSocketHandle))
+	{
+		::syslog(LOG_WARNING, "FlushFileBuffers failed: %d", 
+			GetLastError());
+	}
+}
+
+
 #endif // WIN32

Modified: box/chris/general/lib/win32/WinNamedPipeStream.h
===================================================================
--- box/chris/general/lib/win32/WinNamedPipeStream.h	2006-02-18 11:45:01 UTC (rev 474)
+++ box/chris/general/lib/win32/WinNamedPipeStream.h	2006-02-19 23:59:51 UTC (rev 475)
@@ -36,13 +36,15 @@
 	virtual int Read(void *pBuffer, int NBytes, 
 		int Timeout = IOStream::TimeOutInfinite);
 	virtual void Write(const void *pBuffer, int NBytes);
+	virtual void WriteAllBuffered();
 	virtual void Close();
 	virtual bool StreamDataLeft();
 	virtual bool StreamClosed();
 	bool IsConnected() { return mIsConnected; }
+	HANDLE GetSocketHandle() { return mSocketHandle; }
+	HANDLE GetReadableEvent() { return mReadableEvent; }
 
 protected:
-	HANDLE GetSocketHandle();
 	void MarkAsReadClosed()  {mReadClosed  = true;}
 	void MarkAsWriteClosed() {mWriteClosed = true;}
 
@@ -51,6 +53,10 @@
 		{ /* do not call */ }
 
 	HANDLE mSocketHandle;
+	HANDLE mReadableEvent;
+	OVERLAPPED mReadOverlap;
+	uint8_t mReadBuffer[4096];
+	size_t  mBytesInBuffer;
 	bool mReadClosed;
 	bool mWriteClosed;
 	bool mIsServer;


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 00:02:28 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 19 Feb 2006 16:02:28 -0800 (PST)
Subject: [Box Backup-dev] Problems with compilen under Windows XP with Visual Studio 2003
In-Reply-To: <Pine.LNX.4.62.0602192343400.14656@top.qwarx.com>
Message-ID: <20060220000228.89034.qmail@web36708.mail.mud.yahoo.com>

> Remove them both from the libraries list, and undefine any preprocessor 
> options to do with REGEX, BOOST and BDB.

So, can the VS2005 build a Win32 version >>with<< regular expression support? Or is it worked in
only in the MinGW build?

I am temporarily quite busy with setting up/testing RedHat9 RC3 server, but I would like to help
with Win32 development with VS2005 (don't want to suffer Cygwin debugging).

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 00:02:12 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 20 Feb 2006 00:02:12 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r478 - box/chris/general/bin/bbackupd
Message-ID: <20060220000212.5059695@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-20 00:02:09 +0000 (Mon, 20 Feb 2006)
New Revision: 478

Modified:
   box/chris/general/bin/bbackupd/BackupDaemon.h
Log:
* BackupDaemon.h
- Added members needed for IPC and message queue


Modified: box/chris/general/bin/bbackupd/BackupDaemon.h
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.h	2006-02-20 00:01:35 UTC (rev 477)
+++ box/chris/general/bin/bbackupd/BackupDaemon.h	2006-02-20 00:02:09 UTC (rev 478)
@@ -183,6 +183,9 @@
 
 	private:
 	bool mDoSyncFlagOut, mSyncIsForcedOut, mReceivedCommandConn;
+	HANDLE mhMessageToSendEvent;
+	CRITICAL_SECTION mMessageQueueLock;
+	std::vector<std::string> mMessageList;
 #endif
 };
 


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 00:01:38 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 20 Feb 2006 00:01:38 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r477 - box/chris/general/bin/bbackupctl
Message-ID: <20060220000138.2ECC695@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-20 00:01:35 +0000 (Mon, 20 Feb 2006)
New Revision: 477

Modified:
   box/chris/general/bin/bbackupctl/bbackupctl.cpp
Log:
* bbackupctl.cpp
- Added a new "sync-and-wait" command that forces a sync and waits for
  it to finish


Modified: box/chris/general/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/chris/general/bin/bbackupctl/bbackupctl.cpp	2006-02-20 00:01:05 UTC (rev 476)
+++ box/chris/general/bin/bbackupctl/bbackupctl.cpp	2006-02-20 00:01:35 UTC (rev 477)
@@ -38,6 +38,7 @@
 	"  reload -- reload daemon configuration\n"
 	"  terminate -- terminate daemon now\n"
 	"  wait-for-sync -- wait until the next sync starts, then exit\n"
+	"  sync-and-wait -- start sync, wait until it finishes, then exit\n"
 	);
 	exit(1);
 }
@@ -196,8 +197,29 @@
 			   autoBackup?"true":"false", updateStoreInterval, minimumFileAge, maxUploadWait);
 	}
 
+	std::string stateLine;
+	if(!getLine.GetLine(stateLine) || getLine.IsEOF())
+	{
+#if defined WIN32 && ! defined NDEBUG
+		syslog(LOG_ERR, "Failed to receive state line from daemon");
+#else
+		printf("Failed to receive state line from daemon\n");
+#endif
+		return 1;
+	}
+
+	// Decode it
+	int currentState;
+	if(::sscanf(stateLine.c_str(), "state %d", &currentState) != 1)
+	{
+		printf("State line didn't decode\n");
+		return 1;
+	}
+
 	// Is the command the "wait for sync to start" command?
 	bool areWaitingForSync = false;
+	bool areWaitingForSyncEnd = false;
+
 	if(::strcmp(argv[0], "wait-for-sync") == 0)
 	{
 		// Check that it's not in non-automatic mode, because then it'll never start
@@ -210,6 +232,20 @@
 		// Yes... set the flag so we know what we're waiting for a sync to start
 		areWaitingForSync = true;
 	}
+	else if (::strcmp(argv[0], "sync-and-wait") == 0)
+	{
+		// send a sync command
+		std::string cmd("force-sync\n");
+		connection.Write(cmd.c_str(), cmd.size());
+		connection.WriteAllBuffered();
+		areWaitingForSyncEnd = true;
+
+		if (currentState != 0)
+		{
+			printf("Waiting for current sync/error state "
+				"to finish...\n");
+		}
+	}
 	else
 	{
 		// No? Just send the command given plus a quit command.
@@ -220,6 +256,8 @@
 	
 	// Read the response
 	std::string line;
+	bool syncIsRunning = false;
+
 	while(!getLine.IsEOF() && getLine.GetLine(line))
 	{
 		if(areWaitingForSync)
@@ -234,6 +272,28 @@
 				break;
 			}		
 		}
+		else if(areWaitingForSyncEnd)
+		{
+			if(line == "start-sync")
+			{
+				printf("Sync started...\n");
+				syncIsRunning = true;
+			}
+			else if(line == "finish-sync" && syncIsRunning)
+			{
+				printf("Sync finished.\n");
+				// Send a quit command to finish nicely
+				connection.Write("quit\n", 5);
+				
+				// And we're done
+				break;
+			}
+			else if(line == "finish-sync")
+			{
+				printf("Previous sync finished.\n");
+			}
+			// daemon must still be busy
+		}
 		else
 		{
 			// Is this an OK or error line?


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 00:01:06 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 20 Feb 2006 00:01:06 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r476 - box/chris/general/bin/bbackupd
Message-ID: <20060220000106.B856495@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-20 00:01:05 +0000 (Mon, 20 Feb 2006)
New Revision: 476

Modified:
   box/chris/general/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- Use overlapped I/O and IPC to avoid writing to control socket while
  another thread is reading from it, which causes race conditions and
  deadlocks


Modified: box/chris/general/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-19 23:59:51 UTC (rev 475)
+++ box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-20 00:01:05 UTC (rev 476)
@@ -125,6 +125,19 @@
 	}
 
 #ifdef WIN32
+	// Create the event object to signal when new messages are
+	// queued to be sent.
+	mhMessageToSendEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+	if (mhMessageToSendEvent == INVALID_HANDLE_VALUE)
+	{
+		syslog(LOG_ERR, "Failed to create event object: error %d",
+			GetLastError);
+		exit(1);
+	}
+
+	// Create the critical section to protect the message queue
+	InitializeCriticalSection(&mMessageQueueLock);
+
 	// Create a thread to handle the named pipe
 	HANDLE hThread;
 	unsigned int dwThreadId;
@@ -264,14 +277,14 @@
 {
 	mpCommandSocketInfo = new CommandSocketInfo;
 	this->mReceivedCommandConn = false;
+	WinNamedPipeStream& rSocket(mpCommandSocketInfo->mListeningSocket);
 
 	// loop until the parent process exits
 	while (TRUE)
 	{
 		try
 		{
-			mpCommandSocketInfo->mListeningSocket.Accept(
-				BOX_NAMED_PIPE_NAME);
+			rSocket.Accept(BOX_NAMED_PIPE_NAME);
 
 			// This next section comes from Ben's original function
 			// Log
@@ -289,18 +302,73 @@
 				conf.GetKeyValueInt("MaxUploadWait"),
 				mState);
 
-			mpCommandSocketInfo->mListeningSocket.Write(summary, summarySize);
-			mpCommandSocketInfo->mListeningSocket.Write("ping\n", 5);
+			rSocket.Write(summary, summarySize);
+			rSocket.Write("ping\n", 5);
 
-			IOStreamGetLine readLine(mpCommandSocketInfo->mListeningSocket);
+			// old queued messages are not useful
+			EnterCriticalSection(&mMessageQueueLock);
+			mMessageList.clear();
+			ResetEvent(mhMessageToSendEvent);
+			LeaveCriticalSection(&mMessageQueueLock);
+
+			IOStreamGetLine readLine(rSocket);
 			std::string command;
 
-			while (mpCommandSocketInfo->mListeningSocket.IsConnected() &&
-			       readLine.GetLine(command) )
+			while (rSocket.IsConnected())
 			{
-				TRACE1("Receiving command '%s' over "
-					"command socket\n", command.c_str());
+				HANDLE handles[2];
+				handles[0] = mhMessageToSendEvent;
+				handles[1] = rSocket.GetReadableEvent();
 
+				DWORD result = WaitForMultipleObjects(
+					sizeof(handles)/sizeof(*handles),
+					handles, FALSE, 1000);
+
+				if (result == 0)
+				{
+					ResetEvent(mhMessageToSendEvent);
+
+					EnterCriticalSection(&mMessageQueueLock);
+					try
+					{
+						while (mMessageList.size() > 0)
+						{
+							std::string message = *(mMessageList.begin());
+							mMessageList.erase(mMessageList.begin());
+							printf("Sending '%s' to waiting client... ", message.c_str());
+							message += "\n";
+							rSocket.Write(message.c_str(),
+								message.length());
+
+							printf("done.\n");
+						}
+					}
+					catch (...)
+					{
+						LeaveCriticalSection(&mMessageQueueLock);
+						throw;
+					}
+					LeaveCriticalSection(&mMessageQueueLock);
+					continue;
+				}
+				else if (result == WAIT_TIMEOUT)
+				{
+					continue;
+				}
+				else if (result != 1)
+				{
+					::syslog(LOG_ERR, "WaitForMultipleObjects returned invalid result %d", result);
+					continue;
+				}
+
+				if (!readLine.GetLine(command))
+				{
+					::syslog(LOG_ERR, "Failed to read line");
+					continue;
+				}
+
+				printf("Received command '%s' from client\n", command.c_str());
+
 				bool sendOK = false;
 				bool sendResponse = true;
 				bool disconnect = false;
@@ -338,12 +406,18 @@
 					SetTerminateWanted();
 					sendOK = true;
 				}
+				else
+				{
+					::syslog(LOG_ERR, "Received unknown command '%s' from client", command.c_str());
+					sendResponse = true;
+					sendOK = false;
+				}
 
 				// Send a response back?
 				if (sendResponse)
 				{
 					const char* response = sendOK ? "ok\n" : "error\n";
-					mpCommandSocketInfo->mListeningSocket.Write(
+					rSocket.Write(
 						response, strlen(response));
 				}
 
@@ -355,7 +429,7 @@
 				this->mReceivedCommandConn = true;
 			}
 
-			mpCommandSocketInfo->mListeningSocket.Close();
+			rSocket.Close();
 		}
 		catch (BoxException &e)
 		{
@@ -1134,13 +1208,9 @@
 // --------------------------------------------------------------------------
 void BackupDaemon::SendSyncStartOrFinish(bool SendStart)
 {
-	// The bbackupctl program can't rely on a state change, because it may never
-	// change if the server doesn't need to be contacted.
+	// The bbackupctl program can't rely on a state change, because it 
+	// may never change if the server doesn't need to be contacted.
 
-#ifdef __MINGW32__
-#warning race condition: what happens if socket is closed?
-#endif
-
 	if (mpCommandSocketInfo != NULL &&
 #ifdef WIN32
 	    mpCommandSocketInfo->mListeningSocket.IsConnected()
@@ -1149,13 +1219,16 @@
 #endif
 	    )
 	{
-		const char* message = SendStart ? "start-sync\n" : "finish-sync\n";
+		std::string message = SendStart ? "start-sync" : "finish-sync";
 		try
 		{
 #ifdef WIN32
-			mpCommandSocketInfo->mListeningSocket.Write(message, 
-				(int)strlen(message));
+			EnterCriticalSection(&mMessageQueueLock);
+			mMessageList.push_back(message);
+			SetEvent(mhMessageToSendEvent);
+			LeaveCriticalSection(&mMessageQueueLock);
 #else
+			message += "\n";
 			mpCommandSocketInfo->mpConnectedSocket->Write(message,
 				strlen(message));
 #endif
@@ -1748,40 +1821,37 @@
 	// command socket if there's an error
 
 	char newState[64];
-	char newStateSize = sprintf(newState, "state %d\n", State);
+	sprintf(newState, "state %d", State);
+	std::string message = newState;
 
 #ifdef WIN32
-	#ifndef _MSC_VER
-		#warning FIX ME: race condition
-	#endif
+	EnterCriticalSection(&mMessageQueueLock);
+	mMessageList.push_back(newState);
+	SetEvent(mhMessageToSendEvent);
+	LeaveCriticalSection(&mMessageQueueLock);
+#else
+	message += "\n";
 
-	// what happens if the socket is closed by the other thread before
-	// we can write to it? Null pointer deref at best.
-	if (mpCommandSocketInfo && 
-	    mpCommandSocketInfo->mListeningSocket.IsConnected())
+	if(mpCommandSocketInfo == 0)
 	{
-		try
-		{
-			mpCommandSocketInfo->mListeningSocket.Write(newState, newStateSize);
-		}
-		catch(...)
-		{
-			CloseCommandConnection();
-		}
+		return;
 	}
-#else
-	if(mpCommandSocketInfo != 0 && mpCommandSocketInfo->mpConnectedSocket.get() != 0)
+
+	if (mpCommandSocketInfo->mpConnectedSocket.get() == 0)
 	{
-		// Something connected to the command socket, tell it about the new state
-		try
-		{
-			mpCommandSocketInfo->mpConnectedSocket->Write(newState, newStateSize);
-		}
-		catch(...)
-		{
-			CloseCommandConnection();
-		}
+		return;
 	}
+
+	// Something connected to the command socket, tell it about the new state
+	try
+	{
+		mpCommandSocketInfo->mpConnectedSocket->Write(message.c_str(),
+			message.length());
+	}
+	catch(...)
+	{
+		CloseCommandConnection();
+	}
 #endif
 }
 


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 00:03:07 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 20 Feb 2006 00:03:07 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r479 - box/chris/general/infrastructure/msvc/2005
Message-ID: <20060220000307.4387C95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-20 00:03:02 +0000 (Mon, 20 Feb 2006)
New Revision: 479

Modified:
   box/chris/general/infrastructure/msvc/2005/boxbackup.suo
Log:
* boxbackup.suo
- This file has changed but I don't know why, MSVC voodoo probably


Modified: box/chris/general/infrastructure/msvc/2005/boxbackup.suo
===================================================================
(Binary files differ)


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 00:55:36 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 20 Feb 2006 00:55:36 +0000
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com>
Message-ID: <1140396936.23634.1.camel@avenin.ebourne.me.uk>

--=-rsx3TsdjFa3S9/l+oM+r
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sat, 2006-02-18 at 15:19 +0000, Chris Wilson wrote:
> Hi all,
> 
> On Sat, 18 Feb 2006, Chris Wilson wrote:
> 
> > If I export LIBS=-ldl first, then it works.
> 
> Same on sparc-sun-solaris2.9.

Can yourself, Gary, and anyone else having any configure problems with
ssl please try the attached patch.

You'll need to rerun ./bootstrap after applying (need autoconf installed
for this).

Cheers,

Martin.

--=-rsx3TsdjFa3S9/l+oM+r
Content-Description: 
Content-Disposition: inline; filename=box-ssl-conf.patch
Content-Type: text/x-patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: infrastructure/m4/ax_check_ssl.m4
===================================================================
--- infrastructure/m4/ax_check_ssl.m4	(revision 474)
+++ infrastructure/m4/ax_check_ssl.m4	(working copy)
@@ -27,7 +27,13 @@
 
   ax_check_ssl_found=yes
   AC_CHECK_HEADERS([openssl/ssl.h],, [ax_check_ssl_found=no])
-  AC_CHECK_LIB([ssl], [SSL_read],, [ax_check_ssl_found=no], [-lcrypto])
+  AC_CHECK_LIB([ssl], [SSL_read], [LIBS="-lssl $LIBS"], [
+    AC_CHECK_LIB([ssl],
+                 [SSL_read],
+		 [LIBS="-lssl -lcrypto -ldl $LIBS"],
+                 [ax_check_ssl_found=no],
+		 [-lcrypto -ldl])
+    ],)
 
   if test "x$ax_check_ssl_found" = "xyes"; then
     AC_DEFINE([HAVE_SSL], 1, [Define to 1 if SSL is available])
Index: configure.ac
===================================================================
--- configure.ac	(revision 474)
+++ configure.ac	(working copy)
@@ -59,9 +59,9 @@
   [old-ssl],
   [AC_HELP_STRING([--enable-old-ssl],
                   [Allow use of pre-0.9.7 Open SSL - NOT RECOMMENDED, read the documentation])])
-AC_CHECK_LIB(
-  [crypto],
-  [EVP_CipherInit_ex],, [
+AC_SEARCH_LIBS(
+  [EVP_CipherInit_ex],
+  [crypto],, [
   if test "x$enable_old_ssl" = "xyes"; then
     AC_DEFINE([HAVE_OLD_SSL], 1, [Define to 1 if SSL is pre-0.9.7])
   else
@@ -179,7 +179,6 @@
   [static-bin],
   [AC_HELP_STRING([--enable-static-bin], [Link binaries with static libraries])])
 if test "x$enable_static_bin" = "xyes"; then
-  AC_CHECK_LIB([ssl],[SSL_read],,, [crypto])
   LIBS="-Wl,-Bstatic $LIBS -Wl,-Bdynamic"
 fi
 

--=-rsx3TsdjFa3S9/l+oM+r--


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 01:08:39 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 19 Feb 2006 17:08:39 -0800 (PST)
Subject: [Box Backup-dev] Summary: building&testing 0.10 Release Candidate 3 under RedHat9
In-Reply-To: <A4E0315F-7CC0-4D60-B0AF-1821F1F437CB@fluffy.co.uk>
Message-ID: <20060220010839.10439.qmail@web36708.mail.mud.yahoo.com>

--0-1981443387-1140397719=:10194
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Id: 
Content-Disposition: inline

Linux machine.domain.com 2.4.20-021stab028.19.777-enterprise #1 SMP Wed Oct 19 13:05:01 MSD 2005
i686 i686 i386 GNU/Linux
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
BerkeleyDB.4.4
openssl 0.9.7a
--enable-gnu-readline

Large files:         yes
Berkeley DB:         yes
Readline:            yes
Extended attributes: yes

Thoughts:

1. A newer version of Berkeley DB is required. When using a non-standard location for your
Berkeley DB upgrade, make sure to symlink the .so from /usr/lib, otherwise configure fails.
2. openssl 0.9.8x does not work witout further tweaking (dlopen, etc. linkage problems)
3. openssl 0.9.7i does not work without further tweaking (COMP_CTX_new, etc. linkage problems).
4. openssl 0.9.7a fails configure due to missing krb5.h. Add environment variable
CPPFLAGS=-I/usr/kerberos/include before invoking configure.
5. configure should use GNU readline (--enable-gnu-readline) by default if no other readline is
detected.
6. We could use make distclean with *.o, *.a, etc. removal.

Server test results:
-----------------------

make test:

---

testbackupstorefix.cpp: In function `int test(int, const char**)':
testbackupstorefix.cpp:382: warning: too few arguments for format

---

test output:

FAILURE: Condition [compareReturnValue == 1*256] failed at testbbackupd.cpp(1044)
WARNING: This test was run as root. Some tests have been omitted.
FAILED: 25 tests failed
--------
common: PASSED
crypto: PASSED
compress: PASSED
basicserver: PASSED
raidfile: PASSED
backupstore: PASSED
backupstorefix: PASSED
backupstorepatch: PASSED
backupdiff: PASSED
bbackupd: FAILED: 25 tests failed

---

Attached config.log and test.log, if you want to have a look. Win32 462 client tests will follow.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--0-1981443387-1140397719=:10194
Content-Type: application/x-gzip-compressed; name="config.log.gz"
Content-Transfer-Encoding: base64
Content-Description: 1428319119-config.log.gz
Content-Disposition: attachment; filename="config.log.gz"

[encoded data, 18544 characters]
GoaJ/Q88bJfXTne8Cf4CvjwMfbZyAgA=

--0-1981443387-1140397719=:10194
Content-Type: application/x-gzip-compressed; name="test.log.gz"
Content-Transfer-Encoding: base64
Content-Description: 2968935620-test.log.gz
Content-Disposition: attachment; filename="test.log.gz"

[encoded data, 10675 characters]
AQA=

--0-1981443387-1140397719=:10194--

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 02:05:34 2006
From: boxbackup-dev@fluffy.co.uk (Gary)
Date: Sun, 19 Feb 2006 18:05:34 -0800 (PST)
Subject: [Box Backup-dev] Summary: testing 0.10 Release Candidate 3 (462) under Win32
In-Reply-To: <1140396936.23634.1.camel@avenin.ebourne.me.uk>
Message-ID: <20060220020534.28831.qmail@web36708.mail.mud.yahoo.com>

Client test results (version 0.09_plus2_r462):
---------------------------------------------------------------------

1. bbackupd.exe -i reports "Created Box Backup service", but does not come back to command prompt,
have to Ctrl+C. I am guessing that it is trying to connect to a non-existing bbackupd, since there
are a lot of local pipe/socket errors in the Event Viewer.
2. Tons of SetReplacementFileAttributes and ChangeDirAttributes commands are generated after
Cygwin client (FAT) -uploaded backup repository is backed up with native Win32 client.
3. So far no SLL timeout during a large file diff (KeepAlive called properly).
4. So far no SSL error after Send Finished() (will keep testing the heck out of this one, perhaps
I will replicate).
5. Non-English characters in folders/files.
	- both English-only and non-English folders backed up correctly
	- both English-only and non-English files backed up correctly
	- non-English folders display correctly in bbackupquery
	- non-English files display correctly in bbackupquery
	- can change directory to non-English folders
	- both English-only and non-English folders restore correctly through restoring a parent folder
	- both English-only and non-English folders restore correctly through direct folder name
6. No reload of store info file (bbackupd active continuously).
	- object store info file saved properly
7. After store info file reload (bbackupd shutdown/restart).
	- object store info file loaded properly
	- very small number of remote folder information requests, as expected
	- changes, additions, deletions handled properly
	- object store info file re-saved properly
8. babckupd crashed after stopping service. EventLog: Faulting application bbackupd.exe, version
0.0.0.0, faulting module unknown, version 0.0.0.0, fault address 0x0022e5e0.

Outstanding job, Chris.

Gary


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 08:54:30 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 20 Feb 2006 08:54:30 +0000
Subject: [Box Backup-dev] COMMIT r476 - box/chris/general/bin/bbackupd
In-Reply-To: <20060220000106.B856495@s0g0.pems.testserver.co.uk>
References: <20060220000106.B856495@s0g0.pems.testserver.co.uk>
Message-ID: <4E13BF82-0CC5-4E02-995B-1520CC4E947D@fluffy.co.uk>

On 20 Feb 2006, at 00:01, subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-20 00:01:05 +0000 (Mon, 20 Feb 2006)
> New Revision: 476
>
> Modified:
>    box/chris/general/bin/bbackupd/BackupDaemon.cpp
> Log:
> * BackupDaemon.cpp
> - Use overlapped I/O and IPC to avoid writing to control socket while
>   another thread is reading from it, which causes race conditions and
>   deadlocks


Wow. This is complex. Would using critical sections and perhaps  
PeekNamedPipe be less complicated? I can't believe overlapped I/O and  
messaging is necessary, and think we should strive for simplicity.

I am curious as to why it's necessary.

Ben




From boxbackup-dev@fluffy.co.uk  Mon Feb 20 09:33:29 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 20 Feb 2006 09:33:29 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r476 - box/chris/general/bin/bbackupd
In-Reply-To: <4E13BF82-0CC5-4E02-995B-1520CC4E947D@fluffy.co.uk>
References: <20060220000106.B856495@s0g0.pems.testserver.co.uk>
 <4E13BF82-0CC5-4E02-995B-1520CC4E947D@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602200924460.14656@top.qwarx.com>

Hi Ben,

>>  - Use overlapped I/O and IPC to avoid writing to control socket while
>>    another thread is reading from it, which causes race conditions and
>>    deadlocks
>
> Wow. This is complex. Would using critical sections and perhaps PeekNamedPipe 
> be less complicated? I can't believe overlapped I/O and messaging is 
> necessary, and think we should strive for simplicity.
>
> I am curious as to why it's necessary.

Yeah, it is pretty complex, but it wasn't too hard to write (about 7 
hours), amazed me by working almost perfectly first time, and I think it 
is necessary to meet the conditions you once set out.

It breaks down into 2 parts: IPC, and overlapped I/O.

IPC is simply essential. We cannot call API functions on the named pipe in 
two different threads, or the application will deadlock. Read() and 
Write() is one example. All I/O must be done by the handler thread. The 
safest and most obvious way to pass the messages from the main thread 
seems to be a message queue protected by a critical section and signaled 
by an Event.

Overlapped I/O may not be essential, but if you want to avoid polling the 
command socket, as you once said to me, then it is. Overlapped seems to be 
the only way that I can tell from the docs for you to be notified that you 
have a message waiting to be read (especially if you want to combine it 
with waiting for an event from the main thread). Otherwise you have to 
either poll the socket with Peek, as you said, or you end up blocked in 
ReadFile where you can't service the main thread by writing messages to 
the client.

By all means ask Charles to review it, or anyone else you like, but I 
don't think it's excessively complex, and at least the IPC stuff does fix 
some major bugs - the command socket was essentially liable to deadlock 
the whole process before.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 09:56:33 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 20 Feb 2006 09:56:33 +0000
Subject: [Box Backup-dev] COMMIT r476 - box/chris/general/bin/bbackupd
In-Reply-To: <Pine.LNX.4.62.0602200924460.14656@top.qwarx.com>
References: <20060220000106.B856495@s0g0.pems.testserver.co.uk> <4E13BF82-0CC5-4E02-995B-1520CC4E947D@fluffy.co.uk> <Pine.LNX.4.62.0602200924460.14656@top.qwarx.com>
Message-ID: <561E5489-7446-45E7-8E4B-4EB17BFDAFAD@fluffy.co.uk>

On 20 Feb 2006, at 09:33, Chris Wilson wrote:

> Hi Ben,
>
>>>  - Use overlapped I/O and IPC to avoid writing to control socket  
>>> while
>>>    another thread is reading from it, which causes race  
>>> conditions and
>>>    deadlocks
>>
>> Wow. This is complex. Would using critical sections and perhaps  
>> PeekNamedPipe be less complicated? I can't believe overlapped I/O  
>> and messaging is necessary, and think we should strive for  
>> simplicity.
>>
>> I am curious as to why it's necessary.
>
> Yeah, it is pretty complex, but it wasn't too hard to write (about  
> 7 hours), amazed me by working almost perfectly first time, and I  
> think it is necessary to meet the conditions you once set out.
>
> It breaks down into 2 parts: IPC, and overlapped I/O.
>
> IPC is simply essential. We cannot call API functions on the named  
> pipe in two different threads, or the application will deadlock.  
> Read() and Write() is one example. All I/O must be done by the  
> handler thread. The safest and most obvious way to pass the  
> messages from the main thread seems to be a message queue protected  
> by a critical section and signaled by an Event.

Why can't you wait on the pipe rather than the event, and just do all  
the I/O in the main thread?

>
> Overlapped I/O may not be essential, but if you want to avoid  
> polling the command socket, as you once said to me, then it is.  
> Overlapped seems to be the only way that I can tell from the docs  
> for you to be notified that you have a message waiting to be read  
> (especially if you want to combine it with waiting for an event  
> from the main thread).

Maybe I'm wrong in thinking that you can wait on pipes.

> Otherwise you have to either poll the socket with Peek, as you  
> said, or you end up blocked in ReadFile where you can't service the  
> main thread by writing messages to the client.

Yes, blocking would be bad!

>
> By all means ask Charles to review it, or anyone else you like, but  
> I don't think it's excessively complex, and at least the IPC stuff  
> does fix some major bugs - the command socket was essentially  
> liable to deadlock the whole process before.

I'm not saying it's wrong, I'd just like to know why it's necessary.

Ben





From boxbackup-dev@fluffy.co.uk  Mon Feb 20 10:54:46 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Mon, 20 Feb 2006 11:54:46 +0100
Subject: [Box Backup-dev] Problems with compilen under Windows XP with
 Visual Studio 2003
In-Reply-To: <Pine.LNX.4.62.0602192343400.14656@top.qwarx.com>
References: <43F8921D.4050106@hostingbrothers.nl> <Pine.LNX.4.62.0602191748230.14656@top.qwarx.com> <43F8F428.3070404@hostingbrothers.nl> <Pine.LNX.4.62.0602192343400.14656@top.qwarx.com>
Message-ID: <43F99FF6.1060604@hostingbrothers.nl>

This is a multi-part message in MIME format.
--------------000100080006040909080609
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Chris,

After removing the references to boost_regex.lib and libdb42d.lib and 
adding WinNamedPipeStream to the projects bbackupctl and bbackupd 
everything compiled!

I attached the build log, with only 163 warnings and the project files 
for Visual Studio 2003.

Thanks for your help.

Mark

Chris Wilson wrote:
> Hi Mark,
>
>> Now I've got a new problem, there are 2 .lib files not found: 
>> boxbackup\infrastructure\msvc\2003\..\..\..\lib\win32\Debug\boost_regex.lib 
>> boxbackup\infrastructure\msvc\2003\..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib 
>>
>>
>> Do you know what to do about that?
>
> Remove them both from the libraries list, and undefine any 
> preprocessor options to do with REGEX, BOOST and BDB.
>
> Cheers, Chris.


--------------000100080006040909080609
Content-Type: text/plain;
 name="buildlog.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="buildlog.txt"

------ Build started: Project: common, Configuration: Debug Win32 ------

Compiling...
TLSContext.cpp
SSLLib.cpp
SocketStreamTLS.cpp
d:\Backup\Box\boxbackup\lib\server\SocketStreamTLS.cpp(130) : warning C4244: 'argument' : conversion from 'tOSSocketHandle' to 'int', possible loss of data
SocketStream.cpp
d:\Backup\Box\boxbackup\lib\server\SocketStream.cpp(77) : warning C4244: 'argument' : conversion from 'const tOSSocketHandle' to 'int', possible loss of data
Socket.cpp
ProtocolUncertainStream.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
ProtocolObject.cpp
Protocol.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(641) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(709) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'u_int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.cpp(713) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'u_long', possible loss of data
LocalProcessStream.cpp
Daemon.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
autogen_ServerException.cpp
autogen_ConnectionException.cpp
emu.cpp
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1110) : warning C4018: '>' : signed/unsigned mismatch
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1196) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\win32\emu.cpp(1226) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
RollingChecksum.cpp
Random.cpp
MD5Digest.cpp
CipherDescription.cpp
CipherContext.cpp
CipherBlowfish.cpp
CipherAES.cpp
Generating Code...
Compiling...
autogen_CipherException.cpp
BackupStoreObjectDump.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
BackupStoreFileRevDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(63) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(179) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(184) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(189) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileRevDiff.cpp(193) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
BackupStoreFilenameClear.cpp
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(227) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(236) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(259) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilenameClear.cpp(269) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupStoreFilename.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilename.cpp(144) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFilename.cpp(219) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupStoreFileEncodeStream.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(140) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(145) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(154) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(157) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(163) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(165) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(165) : warning C4244: 'argument' : conversion from 'uint64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(273) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(377) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(448) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(448) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(454) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(454) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(458) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(461) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(465) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(466) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(467) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(473) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileEncodeStream.cpp(492) : warning C4244: 'argument' : conversion from 'int64_t' to 'std::vector<_Ty>::size_type', possible loss of data
        with
        [
            _Ty=BackupStoreFileEncodeStream::RecipeInstruction
        ]
BackupStoreFileDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileDiff.cpp(325) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
BackupStoreFileCryptVar.cpp
BackupStoreFileCombine.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(99) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(255) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(267) : warning C4244: '=' : conversion from 'int64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCombine.cpp(397) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int32_t', possible loss of data
BackupStoreFileCmbIdx.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(177) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(244) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbIdx.cpp(259) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int', possible loss of data
BackupStoreFileCmbDiff.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(82) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(204) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(211) : warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFileCmbDiff.cpp(287) : warning C4244: 'initializing' : conversion from 'int64_t' to 'int', possible loss of data
BackupStoreFile.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(531) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(607) : warning C4244: 'argument' : conversion from 'int64_t' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(614) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(681) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int32_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(937) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.cpp(1025) : warning C4311: 'type cast' : pointer truncation from 'const void *' to 'long'
BackupStoreDirectory.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.cpp(195) : warning C4267: 'initializing' : conversion from 'size_t' to 'int32_t', possible loss of data
BackupDaemonConfigVerify.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BackupClientRestore.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientRestore.cpp(107) : warning C4267: 'initializing' : conversion from 'size_t' to 'int32_t', possible loss of data
BackupClientMakeExcludeList.cpp
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
BackupClientFileAttributes.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientFileAttributes.cpp(641) : warning C4267: '+=' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupClientFileAttributes.cpp(995) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
BackupClientCryptoKeys.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
autogen_BackupStoreException.cpp
autogen_BackupProtocolClient.cpp
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
Generating Code...
Compiling...
WaitForEvent.cpp
d:\Backup\Box\boxbackup\lib\common\WaitForEvent.cpp(166) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned long', possible loss of data
Utils.cpp
d:\Backup\Box\boxbackup\lib\common\Utils.cpp(42) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data
UnixUser.cpp
StreamableMemBlock.cpp
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(118) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'size_t', possible loss of data
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(127) : warning C4244: 'argument' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\StreamableMemBlock.cpp(144) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
ReadGatherStream.cpp
d:\Backup\Box\boxbackup\lib\common\ReadGatherStream.cpp(72) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\ReadGatherStream.cpp(148) : warning C4244: 'initializing' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
PartialReadStream.cpp
MemBlockStream.cpp
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(182) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(185) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\MemBlockStream.cpp(188) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
IOStreamGetLine.cpp
d:\Backup\Box\boxbackup\lib\common\IOStreamGetLine.cpp(155) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
IOStream.cpp
FileStream.cpp
FdGetLine.cpp
d:\Backup\Box\boxbackup\lib\common\FdGetLine.cpp(172) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
ExcludeList.cpp
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
EventWatchFilesystemObject.cpp
DebugPrintf.cpp
DebugMemLeakFinder.cpp
DebugAssertFailed.cpp
ConversionString.cpp
Configuration.cpp
CollectInBufferStream.cpp
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(164) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(167) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\CollectInBufferStream.cpp(170) : warning C4244: '=' : conversion from 'IOStream::pos_type' to 'int', possible loss of data
BoxTimeToText.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
Generating Code...
Compiling...
BoxTime.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BoxException.cpp
autogen_ConversionException.cpp
autogen_CommonException.cpp
CompressStream.cpp
autogen_CompressException.cpp
Generating Code...
Creating library...

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
common - 0 error(s), 125 warning(s)


------ Build started: Project: win32test, Configuration: Debug Win32 ------

Compiling...
testlibwin32.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
Linking...

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
win32test - 0 error(s), 1 warning(s)


------ Build started: Project: bbackupd, Configuration: Debug Win32 ------

Compiling...
WinNamedPipeStream.cpp
d:\Backup\Box\boxbackup\lib\win32\WinNamedPipeStream.cpp(97) : warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
d:\Backup\Box\boxbackup\lib\win32\WinNamedPipeStream.cpp(176) : warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
d:\Backup\Box\boxbackup\lib\win32\WinNamedPipeStream.cpp(222) : warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
d:\Backup\Box\boxbackup\lib\win32\WinNamedPipeStream.cpp(274) : warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
Win32ServiceFunctions.cpp
Win32BackupService.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
bbackupd.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
BackupDaemon.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(292) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(347) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(719) : warning C4244: 'argument' : conversion from 'box_time_t' to 'uint32_t', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupDaemon.cpp(792) : warning C4244: 'argument' : conversion from 'box_time_t' to 'uint32_t', possible loss of data
BackupClientInodeToIDMap.cpp
BackupClientDirectoryRecord.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreDirectory.h(149) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\common\Archive.h(70) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupClientDirectoryRecord.cpp(264) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\Backup\Box\boxbackup\bin\bbackupd\BackupClientDirectoryRecord.cpp(696) : warning C4101: 'e' : unreferenced local variable
BackupClientDeleteList.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
BackupClientContext.cpp
d:\Backup\Box\boxbackup\lib\common\BoxTime.h(32) : warning C4244: 'return' : conversion from 'box_time_t' to 'time_t', possible loss of data
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(156) : warning C4311: 'type cast' : pointer truncation from 'uint8_t *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\backupclient\BackupStoreFile.h(167) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'unsigned long'
d:\Backup\Box\boxbackup\lib\common\ExcludeList.h(51) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data
d:\Backup\Box\boxbackup\lib\server\Protocol.h(97) : warning C4805: '==' : unsafe mix of type 'int8_t' and type 'bool' in operation
Generating Code...
Linking...

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
bbackupd - 0 error(s), 36 warning(s)


------ Build started: Project: bbackupctl, Configuration: Debug Win32 ------

Compiling...
bbackupctl.cpp
d:\Backup\Box\boxbackup\bin\bbackupctl\bbackupctl.cpp(218) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
Linking...

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
bbackupctl - 0 error(s), 1 warning(s)


------ Build started: Project: boxquery, Configuration: Debug Win32 ------

Linking...

Build log was saved at "file://d:\Backup\Box\boxbackup\Debug\BuildLog.htm"
boxquery - 0 error(s), 0 warning(s)


---------------------- Done ----------------------

    Build: 5 succeeded, 0 failed, 0 skipped



--------------000100080006040909080609
Content-Type: application/octet-stream;
 name="VS2003 Project Files.rar"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="VS2003 Project Files.rar"

[encoded data, 185931 characters]
lKUpSlKUpSOf//LEPXsAQAcA
--------------000100080006040909080609--

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 11:03:37 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Mon, 20 Feb 2006 12:03:37 +0100
Subject: [Box Backup-dev] Visual Studio 2003 project files
Message-ID: <43F9A209.8050300@hostingbrothers.nl>

This is a multi-part message in MIME format.
--------------090601030000040608060607
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello Chris,

The Visual Studio 2003 project files that I've mailed in my last e-mail 
didn't compile the release version. The ones I've attached now do.

Mark

--------------090601030000040608060607
Content-Type: application/octet-stream;
 name="VS2003 Project Files.rar"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="VS2003 Project Files.rar"

[encoded data, 187391 characters]
P6376jb++TNZf8AAAAAAAo7fysQ9ewBABwA=
--------------090601030000040608060607--

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 12:16:25 2006
From: boxbackup-dev@fluffy.co.uk (Charles Lecklider)
Date: Mon, 20 Feb 2006 12:16:25 +0000
Subject: [Box Backup-dev] COMMIT r476 - box/chris/general/bin/bbackupd
In-Reply-To: <561E5489-7446-45E7-8E4B-4EB17BFDAFAD@fluffy.co.uk>
References: <20060220000106.B856495@s0g0.pems.testserver.co.uk> <4E13BF82-0CC5-4E02-995B-1520CC4E947D@fluffy.co.uk> <Pine.LNX.4.62.0602200924460.14656@top.qwarx.com> <561E5489-7446-45E7-8E4B-4EB17BFDAFAD@fluffy.co.uk>
Message-ID: <43F9B319.9040704@invis.net>

Ben Summers wrote:
> Maybe I'm wrong in thinking that you can wait on pipes.

You can. If you want to wait using the handle as the event you need to
be careful you don't try to read and write at the same time (since you
won't be able to tell which happened), but if you create an event for
the OVERLAPPED you're fine.


Something like this is certainly necessary, but I think this is the
wrong design. Having an extra thread just to talk to the command socket
is incredibly wasteful. With overlapped IO you can do all the IO on a
single thread with no blocking - but not like this.

Chris: If you're intent on learning overlapped IO you want to be looking
at completion ports. They're essentially a message queue, but without
all that tedious messing around with critical sections etc. You can wait
on them from multiple threads, and the wait has a timeout (which is what
I was planning on using for SSL keepalives - if no completion packet
comes in after X ms send the keepalive - no timer required).

However, once you start looking at it you'll soon realise that there's a
lot more that needs to change in order to take advantage of completion
ports properly. The good news is that none of the actual box code needs
to change (or at least I didn't see any in my quick review), and the new
code will be simpler in a lot of ways than the old, but the bad news is
that pretty much the entire Win32 architecture needs to change.

That's why I wasn't planning on working on it until 0.10 is done - start
adding this now and there'll never be a release....

-C

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 14:58:28 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 20 Feb 2006 14:58:28 +0000
Subject: [Box Backup-dev] COMMIT r476 - box/chris/general/bin/bbackupd
In-Reply-To: <43F9B319.9040704@invis.net>
References: <20060220000106.B856495@s0g0.pems.testserver.co.uk>
 <4E13BF82-0CC5-4E02-995B-1520CC4E947D@fluffy.co.uk>
 <Pine.LNX.4.62.0602200924460.14656@top.qwarx.com>
 <561E5489-7446-45E7-8E4B-4EB17BFDAFAD@fluffy.co.uk>
 <43F9B319.9040704@invis.net>
Message-ID: <1140447508.20898.30.camel@localhost>

Hi Charles,

On Mon, 2006-02-20 at 12:16 +0000, Charles Lecklider wrote:
> Ben Summers wrote:
> > Maybe I'm wrong in thinking that you can wait on pipes.
> 
> You can. If you want to wait using the handle as the event you need to
> be careful you don't try to read and write at the same time (since you
> won't be able to tell which happened), but if you create an event for
> the OVERLAPPED you're fine.

In my tests, the problem I had was that the pipe handle remained
signaled after I had read from it, and I couldn't see how to reset it.
So we would end up thinking that we had more data to read, and call
ReadFile, which blocks... same problem.

At least with an Event the behaviour is well defined and controllable.

> Something like this is certainly necessary, but I think this is the
> wrong design. Having an extra thread just to talk to the command socket
> is incredibly wasteful. With overlapped IO you can do all the IO on a
> single thread with no blocking - but not like this.

Not my design, I inherited it. As far as I can tell, there is a need for
a separate thread - a control client can connect at any time, even when
the main thread is busy doing a backup, and request it to terminate or
sync again. Without threads I don't know how that would work. 

I don't mind throwing away the separate thread that I inherited, or this
new patch which merely fixes the most obvious bugs, but I want to be
sure that we don't lose any functionality by doing so. 

Why is an extra thread wasteful? I know that synchronisation would be
easier without it, and multithreaded programming is always tricky, but I
thought that threads were lightweight, and this one (now) spends almost
all its time in WaitForMultipleObjects.

> Chris: If you're intent on learning overlapped IO you want to be looking
> at completion ports. They're essentially a message queue, but without
> all that tedious messing around with critical sections etc. You can wait
> on them from multiple threads, and the wait has a timeout (which is what
> I was planning on using for SSL keepalives - if no completion packet
> comes in after X ms send the keepalive - no timer required).

OK, thanks, I will have a look at them. What API functions are involved?

> However, once you start looking at it you'll soon realise that there's a
> lot more that needs to change in order to take advantage of completion
> ports properly. The good news is that none of the actual box code needs
> to change (or at least I didn't see any in my quick review), and the new
> code will be simpler in a lot of ways than the old, but the bad news is
> that pretty much the entire Win32 architecture needs to change.
> 
> That's why I wasn't planning on working on it until 0.10 is done - start
> adding this now and there'll never be a release....

I'm not sure if it will go into 0.10, but this BADLY needs fixing. The
command socket is so dangerous as to be almost unusable on win32.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 15:45:54 2006
From: boxbackup-dev@fluffy.co.uk (Charles Lecklider)
Date: Mon, 20 Feb 2006 15:45:54 +0000
Subject: [Box Backup-dev] COMMIT r476 - box/chris/general/bin/bbackupd
In-Reply-To: <1140447508.20898.30.camel@localhost>
References: <20060220000106.B856495@s0g0.pems.testserver.co.uk>	 <4E13BF82-0CC5-4E02-995B-1520CC4E947D@fluffy.co.uk>	 <Pine.LNX.4.62.0602200924460.14656@top.qwarx.com>	 <561E5489-7446-45E7-8E4B-4EB17BFDAFAD@fluffy.co.uk>	 <43F9B319.9040704@invis.net> <1140447508.20898.30.camel@localhost>
Message-ID: <43F9E432.2090102@invis.net>

Chris Wilson wrote:
> Why is an extra thread wasteful? I know that synchronisation would be
> easier without it, and multithreaded programming is always tricky, but I
> thought that threads were lightweight, and this one (now) spends almost
> all its time in WaitForMultipleObjects.

Threads are indeed lightweight, but there's no point in having more of
them than you need.

My point wasn't that an extra thread isn't needed at all, just that
*all* IO should be handled from it, not just the control pipe.

>> Chris: If you're intent on learning overlapped IO you want to be looking
>> at completion ports. They're essentially a message queue, but without
>> all that tedious messing around with critical sections etc. You can wait
>> on them from multiple threads, and the wait has a timeout (which is what
>> I was planning on using for SSL keepalives - if no completion packet
>> comes in after X ms send the keepalive - no timer required).
> 
> OK, thanks, I will have a look at them. What API functions are involved?

Start with CreateIoCompletionPort, then GetQueuedCompletionStatus. It's
very simple once you get your head around it, but a little hard at first.

>> However, once you start looking at it you'll soon realise that there's a
>> lot more that needs to change in order to take advantage of completion
>> ports properly. The good news is that none of the actual box code needs
>> to change (or at least I didn't see any in my quick review), and the new
>> code will be simpler in a lot of ways than the old, but the bad news is
>> that pretty much the entire Win32 architecture needs to change.
>>
>> That's why I wasn't planning on working on it until 0.10 is done - start
>> adding this now and there'll never be a release....
> 
> I'm not sure if it will go into 0.10, but this BADLY needs fixing. The
> command socket is so dangerous as to be almost unusable on win32.

I have no plans to use the 0.10 Win32 release because there are too many
things that need fixed before I would feel comfortable putting it on a
client's machine. The *nix version is a good step forward, and IMHO
needs to be released ASAP.

Once there's a 0.10 I plan to start working on the Win32 version, as in
actual development, not just these emails ;-)  I'm not confident with
branching in SVN, and the merge functionality looks primitive at best,
so I need a fixed point to start from. (I'm sure it's actually truly
wonderful and the best thing since whatever, but I don't have time to
find out).

So because of all that, my view on 0.10 is simple: as long as Box
compiles clean with a set of VC2005 project files, sod the Win32 bugs,
ship the release. If we do that, then 0.11 (or whatever the next will be
called) will have proper security and all sorts of overlapped IO
goodness in it, and will be suitable for general use, because I *need*
that PDQ.

-C


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 20:01:35 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Mon, 20 Feb 2006 12:01:35 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
Message-ID: <43FA201F.1000806@reedtz.com>

This is a multi-part message in MIME format.
--------------080208070401080709030502
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

When running configure on NetBSD, I get the following error:

configure: error: cannot work out how to discover mount points on your
platform

I've narrowed it down to the fact that NetBSD doesn't use the 'statfs'
struct, but rather 'statvfs'. I am not an autoconf hacker, so I don't
know how to make that addition, but if I hack the configure script to
use the 'statvfs' struct in its test program, the configure completes
(of course it doesn't work beyond completing the script; I can't make
anything).

I have attached config.log.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


--------------080208070401080709030502
Content-Type: application/x-gzip; x-mac-type="0"; x-mac-creator="0";
 name="config.log.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="config.log.gz"

[encoded data, 13578 characters]
NGAxxwCBx8FX+Bvw/hs0h9H6L3JusainZwEA
--------------080208070401080709030502--

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 20:43:12 2006
From: boxbackup-dev@fluffy.co.uk (Stefan Norlin)
Date: Mon, 20 Feb 2006 21:43:12 +0100
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
References: <43FA201F.1000806@reedtz.com>
Message-ID: <004901c6365e$44372c10$0301050a@stenorhem>

> configure: error: cannot work out how to discover mount points on your
> platform

Check out infrastructure/m4/ax_check_mount_point.m4.

If you cannot figure how to change it yourself, I am sure Martin
will be around to to help you soon... :)

Stefan


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 21:02:09 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 20 Feb 2006 21:02:09 +0000 (GMT)
Subject: [Box Backup-dev] RC3 test failures on SLES9 ppc64
In-Reply-To: <1140393644.23234.18.camel@avenin.ebourne.me.uk>
References: <Pine.LNX.4.62.0602181343390.14656@top.qwarx.com>
 <1140393644.23234.18.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602202059410.14656@top.qwarx.com>

Hi Martin,

On Mon, 20 Feb 2006, Martin Ebourne wrote:

>> raidfile: FAILED: 6 tests failed
>
> The first failure is like so:
>
> Exception thrown: RaidFileException(FileIsDamagedNotRecoverable) at RaidFileRead.cpp(1420)
> FAILURE: Condition [list_matches(names, file_list1)] failed at testraidfile.cpp(840)
>
> Looks very likely that the failure is due to the raidfile store being
> corrupted. This sounds pretty serious and I think the only thing there
> is going to be get in and debug it.

I have no idea why, but the first time I ran configure, it detected 
HAVE_VALID_DIRENT_D_TYPE. This is not true on this system: d_type is 
always DT_UNKNOWN. This was causing the RaidFile tests to fail, because 
they weren't finding any files.

Rerunning configure causes it to fail the test for 
HAVE_VALID_DIRENT_D_TYPE, and all tests now pass.

Do you have any idea what could have caused that test to fail the first 
time? Unfortunately, I don't have the configure logs any more, and I can't 
reproduce the failure.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 21:04:46 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 20 Feb 2006 21:04:46 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FA201F.1000806@reedtz.com>
References: <43FA201F.1000806@reedtz.com>
Message-ID: <1140469486.26164.3.camel@avenin.ebourne.me.uk>

On Mon, 2006-02-20 at 12:01 -0800, Per Thomsen wrote:
> When running configure on NetBSD, I get the following error:
> 
> configure: error: cannot work out how to discover mount points on your
> platform
> 
> I've narrowed it down to the fact that NetBSD doesn't use the 'statfs'
> struct, but rather 'statvfs'. I am not an autoconf hacker, so I don't
> know how to make that addition, but if I hack the configure script to
> use the 'statvfs' struct in its test program, the configure completes
> (of course it doesn't work beyond completing the script; I can't make
> anything).

Chris has already tried Box on NetBSD and found some significant issues
which means it is non-trivial to make work - really it needs porting to
NetBSD. I can only assume Box was not ported to NetBSD before.

I'm happy to help where I can with this (certainly the autoconf stuff is
no trouble) but this really looks like a 0.11 task, not 0.10.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 21:07:14 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 20 Feb 2006 21:07:14 +0000 (GMT)
Subject: [Box Backup-dev] Problems with compilen under Windows XP with
 Visual Studio 2003
In-Reply-To: <20060220000228.89034.qmail@web36708.mail.mud.yahoo.com>
References: <20060220000228.89034.qmail@web36708.mail.mud.yahoo.com>
Message-ID: <Pine.LNX.4.62.0602202106200.14656@top.qwarx.com>

Hi Gary,

>> Remove them both from the libraries list, and undefine any preprocessor
>> options to do with REGEX, BOOST and BDB.
>
> So, can the VS2005 build a Win32 version >>with<< regular expression 
> support? Or is it worked in only in the MinGW build?

I think it's technically possible, but I haven't got around to building 
pcre with VS2005.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 21:59:00 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 20 Feb 2006 21:59:00 +0000
Subject: [Box Backup-dev] RC3 test failures on SLES9 ppc64
In-Reply-To: <Pine.LNX.4.62.0602202059410.14656@top.qwarx.com>
References: <Pine.LNX.4.62.0602181343390.14656@top.qwarx.com>
 <1140393644.23234.18.camel@avenin.ebourne.me.uk>
 <Pine.LNX.4.62.0602202059410.14656@top.qwarx.com>
Message-ID: <1140472740.26216.5.camel@avenin.ebourne.me.uk>

On Mon, 2006-02-20 at 21:02 +0000, Chris Wilson wrote:
> I have no idea why, but the first time I ran configure, it detected 
> HAVE_VALID_DIRENT_D_TYPE. This is not true on this system: d_type is 
> always DT_UNKNOWN. This was causing the RaidFile tests to fail, because 
> they weren't finding any files.
> 
> Rerunning configure causes it to fail the test for 
> HAVE_VALID_DIRENT_D_TYPE, and all tests now pass.
> 
> Do you have any idea what could have caused that test to fail the first 
> time? Unfortunately, I don't have the configure logs any more, and I can't 
> reproduce the failure.

It actually runs the following code for this test:

          DIR* dir = opendir(".");
          struct dirent* res = NULL;
          if(dir) res = readdir(dir);
          return res ? (res->d_type==DT_UNKNOWN) : 1;

The only way that could succeed is if it successfully opendirs and
readdirs, and then d_type is not DT_UNKNOWN.

All I can think of is if d_type is uninitialised, but I don't think so.
Certainly the same code does the same thing on Fedora, and I've ran it a
hundred times and never seen that.

Unless of course it was a previously configured tree from somewhere else
and the value was cached. Not sure how/if that could happen.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 22:13:14 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 20 Feb 2006 22:13:14 +0000 (GMT)
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <1140396936.23634.1.camel@avenin.ebourne.me.uk>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com> <1140396936.23634.1.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602202211140.14656@top.qwarx.com>

Hi Martin,

On Mon, 20 Feb 2006, Martin Ebourne wrote:

>>> If I export LIBS=-ldl first, then it works.
>>
>> Same on sparc-sun-solaris2.9.
>
> Can yourself, Gary, and anyone else having any configure problems with
> ssl please try the attached patch.

Sorry, it doesn't seem to be enough. We also need to link -lcrypto _after_ 
-lssl, and -ldl after -lcrypto, since ssl depends on some symbols defined 
in crypto.

Unfortunately I can't give you a working command line, since I'm still 
having trouble linking against the custom-built version of SSL in my home 
directory on this solaris box.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 22:17:08 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 20 Feb 2006 22:17:08 +0000
Subject: [Box Backup-dev] Re: [Box Backup] readline support on OS X
In-Reply-To: <8A4FBF8B-4878-478A-A088-A80C3410CACB@allard.nu>
References: <C1F981F1-2816-4C10-8AC4-EB76CDFE9FE3@allard.nu>
 <1140133313.6545.8.camel@avenin.ebourne.me.uk>
 <27707655-5D93-4CB4-973E-182C0EE255C1@allard.nu>
 <1140220710.14355.21.camel@avenin.ebourne.me.uk>
 <5550CDC2-F4A1-4FFD-938C-5A4E6B8D107D@allard.nu>
 <1140269931.14355.32.camel@avenin.ebourne.me.uk>
 <8A4FBF8B-4878-478A-A088-A80C3410CACB@allard.nu>
Message-ID: <1140473828.26216.7.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-19 at 16:01 +1100, Johan Allard wrote:
> Absolutely, here are both the nopatched and the patched version of  
> the config.log. The patched is from trunk two days ago.

The reason the nopatched version didn't find readline is because you
configured it with --with-gnu-readline, whereas the option is actually
called --enable-gnu-readline. :)

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 22:18:48 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Mon, 20 Feb 2006 22:18:48 +0000
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <Pine.LNX.4.62.0602202211140.14656@top.qwarx.com>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com>
 <1140396936.23634.1.camel@avenin.ebourne.me.uk>
 <Pine.LNX.4.62.0602202211140.14656@top.qwarx.com>
Message-ID: <1140473928.26491.0.camel@avenin.ebourne.me.uk>

On Mon, 2006-02-20 at 22:13 +0000, Chris Wilson wrote:
> Hi Martin,
> 
> On Mon, 20 Feb 2006, Martin Ebourne wrote:
> 
> >>> If I export LIBS=-ldl first, then it works.
> >>
> >> Same on sparc-sun-solaris2.9.
> >
> > Can yourself, Gary, and anyone else having any configure problems with
> > ssl please try the attached patch.
> 
> Sorry, it doesn't seem to be enough. We also need to link -lcrypto _after_ 
> -lssl, and -ldl after -lcrypto, since ssl depends on some symbols defined 
> in crypto.

That's exactly what the patch is supposed to do. You did
run ./bootstrap?

Could you send the compressed config.log of the run so I can debug it?

Cheers,

Martin.



From boxbackup-dev@fluffy.co.uk  Mon Feb 20 22:30:30 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Mon, 20 Feb 2006 14:30:30 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <1140469486.26164.3.camel@avenin.ebourne.me.uk>
References: <43FA201F.1000806@reedtz.com> <1140469486.26164.3.camel@avenin.ebourne.me.uk>
Message-ID: <43FA4306.5080406@reedtz.com>

On 2/20/06 1:04 PM, Martin Ebourne wrote:
> On Mon, 2006-02-20 at 12:01 -0800, Per Thomsen wrote:
>   
>> When running configure on NetBSD, I get the following error:
>>
>> configure: error: cannot work out how to discover mount points on your
>> platform
>>
>> I've narrowed it down to the fact that NetBSD doesn't use the 'statfs'
>> struct, but rather 'statvfs'. I am not an autoconf hacker, so I don't
>> know how to make that addition, but if I hack the configure script to
>> use the 'statvfs' struct in its test program, the configure completes
>> (of course it doesn't work beyond completing the script; I can't make
>> anything).
>>     
>
> Chris has already tried Box on NetBSD and found some significant issues
> which means it is non-trivial to make work - really it needs porting to
> NetBSD. I can only assume Box was not ported to NetBSD before.
>
> I'm happy to help where I can with this (certainly the autoconf stuff is
> no trouble) but this really looks like a 0.11 task, not 0.10.
>   
No problem. I might spend a little time trying to get things working for
0.11.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Mon Feb 20 22:34:32 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 20 Feb 2006 22:34:32 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <1140469486.26164.3.camel@avenin.ebourne.me.uk>
References: <43FA201F.1000806@reedtz.com> <1140469486.26164.3.camel@avenin.ebourne.me.uk>
Message-ID: <05192048-8C35-4D40-B399-C43BFFA1D32E@fluffy.co.uk>

On 20 Feb 2006, at 21:04, Martin Ebourne wrote:

> On Mon, 2006-02-20 at 12:01 -0800, Per Thomsen wrote:
>> When running configure on NetBSD, I get the following error:
>>
>> configure: error: cannot work out how to discover mount points on  
>> your
>> platform
>>
>> I've narrowed it down to the fact that NetBSD doesn't use the  
>> 'statfs'
>> struct, but rather 'statvfs'. I am not an autoconf hacker, so I don't
>> know how to make that addition, but if I hack the configure script to
>> use the 'statvfs' struct in its test program, the configure completes
>> (of course it doesn't work beyond completing the script; I can't make
>> anything).
>
> Chris has already tried Box on NetBSD and found some significant  
> issues
> which means it is non-trivial to make work - really it needs  
> porting to
> NetBSD. I can only assume Box was not ported to NetBSD before.

I had it going on NetBSD. Second most annoying platform after Linux.  
But perhaps I forgot after I added the kqueue stuff? Seems a  
reasonable explanation.

Ben




From boxbackup-dev@fluffy.co.uk  Mon Feb 20 22:36:47 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 20 Feb 2006 22:36:47 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <1140469486.26164.3.camel@avenin.ebourne.me.uk>
References: <43FA201F.1000806@reedtz.com> <1140469486.26164.3.camel@avenin.ebourne.me.uk>
Message-ID: <82D1E838-1455-43C1-AB2F-D4BD07A8C741@fluffy.co.uk>

On 20 Feb 2006, at 21:04, Martin Ebourne wrote:

> On Mon, 2006-02-20 at 12:01 -0800, Per Thomsen wrote:
>> When running configure on NetBSD, I get the following error:
>>
>> configure: error: cannot work out how to discover mount points on  
>> your
>> platform
>>
>> I've narrowed it down to the fact that NetBSD doesn't use the  
>> 'statfs'
>> struct, but rather 'statvfs'. I am not an autoconf hacker, so I don't
>> know how to make that addition, but if I hack the configure script to
>> use the 'statvfs' struct in its test program, the configure completes
>> (of course it doesn't work beyond completing the script; I can't make
>> anything).
>
> Chris has already tried Box on NetBSD and found some significant  
> issues
> which means it is non-trivial to make work - really it needs  
> porting to
> NetBSD. I can only assume Box was not ported to NetBSD before.
>
> I'm happy to help where I can with this (certainly the autoconf  
> stuff is
> no trouble) but this really looks like a 0.11 task, not 0.10.

Actually, a quick hack would be to define  
PLATFORM_KQUEUE_NOT_SUPPORTED on NetBSD to get the troublesome code  
to use poll() instead.

Ben




From boxbackup-dev@fluffy.co.uk  Mon Feb 20 22:38:59 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 20 Feb 2006 22:38:59 +0000 (GMT)
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <1140473928.26491.0.camel@avenin.ebourne.me.uk>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com>
 <1140396936.23634.1.camel@avenin.ebourne.me.uk>  <Pine.LNX.4.62.0602202211140.14656@top.qwarx.com>
 <1140473928.26491.0.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602202235150.14656@top.qwarx.com>

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---1044231485-1428927490-1140475139=:14656
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Hi Martin,

On Mon, 20 Feb 2006, Martin Ebourne wrote:

>> Sorry, it doesn't seem to be enough. We also need to link -lcrypto _after_
>> -lssl, and -ldl after -lcrypto, since ssl depends on some symbols defined
>> in crypto.
>
> That's exactly what the patch is supposed to do. You did
> run ./bootstrap?

Yeah, but I had to run it on my own machine, as this solaris box doesn't 
have a recent enough version of autoconf.

> Could you send the compressed config.log of the run so I can debug it?

Sure, please find attached.

The magic lines:

configure:7626: checking for SSL_read in -lssl
configure:7656: g++ -o conftest -g -O2
 	-I/home/users/g/gc/gcc/openssl-solaris-sparc/include
 	-L/home/users/g/gc/gcc/openssl-solaris-sparc/lib conftest.cc
 	-lssl  -lsocket -lnsl -lz -lrt  >&5
Undefined                       first referenced
  symbol                             in file
CRYPTO_lock 
/home/users/g/gc/gcc/openssl-solaris-sparc/lib/libssl.a(ssl_lib.o)

Note the lack of -lcrypto and -ldl on the g++ command line.

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 |

---1044231485-1428927490-1140475139=:14656
Content-Type: APPLICATION/octet-stream; name=config.log.nocrypto.060220.gz
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.62.0602202238590.14656@top.qwarx.com>
Content-Description: 
Content-Disposition: attachment; filename=config.log.nocrypto.060220.gz

[encoded data, 8052 characters]
WI1a4f8BKzK5V4m9AAA=

---1044231485-1428927490-1140475139=:14656--

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 22:50:05 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Mon, 20 Feb 2006 23:50:05 +0100
Subject: [Box Backup-dev] Errors with trunk client (Win32)
Message-ID: <43FA479D.6000301@hostingbrothers.nl>

This is a multi-part message in MIME format.
--------------010606050307060709080800
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I tried to run the client of box backup on Windows XP, but I get the 
following error:
Communication error with control client: Server SocketAlreadyOpen
TRACE: Exception thrown: ServerException(SocketAlreadyOpen) at 
d:\backup\box\boxbackup\lib\win32\winnamedpipestream.cpp(75)

I've attached my config file. I'm not sure about the command socket 
setting, but "pipe" I saw somewhere in another release.

Has anybody got suggestions where to look for the error?

Thanks in advance,

Roy

--------------010606050307060709080800
Content-Type: text/plain;
 name="bbackupd2.conf"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="bbackupd2.conf"


StoreHostname = servername.domain.com
AccountNumber = 0xACCOUNT#
KeysFile = c:\program files\box backup\bbackupd\ACCOUNT#-FileEncKeys.raw

CertificateFile = c:\program files\box backup\bbackupd\ACCOUNT#-cert.pem
PrivateKeyFile = c:\program files\box backup\bbackupd\ACCOUNT#-key.pem
TrustedCAsFile = c:\program files\box backup\bbackupd\serverCA.pem

DataDirectory = C:\Program Files\Box Backup\bbackupd

# This script is run whenever bbackupd encounters a problem which requires
# the system administrator to assist:
# 1) The store is full, and no more data can be uploaded.
# 2) Some files or directories were not readable.
# The default script emails the system administrator.

#NotifyScript = ./bbackupd/NotifySysadmin.sh

# This configuration file is written for snapshot mode.
# You will need to run bbackupctl to instruct the daemon to upload files.

AutomaticBackup = no
UpdateStoreInterval = 0
MinimumFileAge = 0
MaxUploadWait = 0

# Files above this size (in bytes) are tracked, and if they are renamed they will simply be
# renamed on the server, rather than being uploaded again. (64k - 1)

FileTrackingSizeThreshold = 65535

# The daemon does "changes only" uploads for files above this size (in bytes).
# Files less than it are uploaded whole without this extra processing.

DiffingUploadSizeThreshold = 8192

# The limit on how much time is spent diffing files. Most files shouldn't take very long,
# but if you have really big files you can use this to limit the time spent diffing them.
# * Reduce if you are having problems with processor usage.
# * Increase if you have large files, and think the upload of changes is too large and want
#   to spend more time searching for unchanged blocks.

MaximumDiffingTime = 20

# Uncomment this line to see exactly what the daemon is going when it's connected to the server.
ExtendedLogging = yes


# Use this to temporarily stop bbackupd from syncronising or connecting to the store.
# This specifies a program or script script which is run just before each sync, and ideally
# the full path to the interpreter. It will be run as the same user bbackupd is running as,
# usually root.
# The script prints either "now" or a number to STDOUT (and a terminating newline, no quotes).
# If the result was "now", then the sync will happen. If it's a number, then the script will
# be asked again in that number of seconds.
# For example, you could use this on a laptop to only backup when on a specific network.

# SyncAllowScript = /path/to/intepreter/or/exe script-name parameters etc


# Where the command socket is created in the filesystem.

#CommandSocket = /var/run/bbackupd.sock
CommandSocket = pipe

# Uncomment the StoreObjectInfoFile to enable the experimental archiving
# of the daemon's state (including client store marker and configuration)
# between backup runs. This saves time and increases efficiency when
# bbackupd is frequently stopped and started, since it removes the need
# to rescan all directories on the remote server. However, it is new and
# not yet heavily tested, so use with caution.

# StoreObjectInfoFile = /work/bbackupd.state
#StoreObjectInfoFile = c:\program files\box backup\workingdir\bbackupd.state

Server
{
	PidFile = C:\Program Files\Box Backup\bbackupd\bbackupd.pid
}

# 
# BackupLocations specifies which locations on disc should be backed up. Each
# directory is in the format
# 
# 	name
# 	{
# 		Path = /path/of/directory
# 		(optional exclude directives)
# 	}
# 
# 'name' is derived from the Path by the config script, but should merely be
# unique.
# 
# The exclude directives are of the form
# 
# 	[Exclude|AlwaysInclude][File|Dir][|sRegex] = regex or full pathname
# 
# (The regex suffix is shown as 'sRegex' to make File or Dir plural)
#
# For example:
# 
# 	ExcludeDir = /home/guest-user
# 	ExcludeFilesRegex = *.(mp3|MP3)$
# 	AlwaysIncludeFile = /home/username/veryimportant.mp3
# 
# This excludes the directory /home/guest-user from the backup along with all mp3
# files, except one MP3 file in particular.
# 
# In general, Exclude excludes a file or directory, unless the directory is
# explicitly mentioned in a AlwaysInclude directive.
# 
# If a directive ends in Regex, then it is a regular expression rather than a
# explicit full pathname. See
# 
# 	man 7 re_format
# 
# for the regex syntax on your platform.
# 

BackupLocations
{
    MyDocuments
	{
                Path = C:\Documents and Settings\
	}
}
--------------010606050307060709080800--

From boxbackup-dev@fluffy.co.uk  Mon Feb 20 23:58:20 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 20 Feb 2006 23:58:20 +0000 (GMT)
Subject: [Box Backup-dev] Errors with trunk client (Win32)
In-Reply-To: <43FA479D.6000301@hostingbrothers.nl>
References: <43FA479D.6000301@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>

Hi Roy,

> I tried to run the client of box backup on Windows XP, but I get the 
> following error:
> Communication error with control client: Server SocketAlreadyOpen
> TRACE: Exception thrown: ServerException(SocketAlreadyOpen) at 
> d:\backup\box\boxbackup\lib\win32\winnamedpipestream.cpp(75)

I need more information to reproduce this error, since I haven't seen it 
for a long time.

* Which version of box were you running?
* Did you build it yourself? Otherwise, which build was it?
* What were you trying to do when you got that error? Running bbackupctl?
   If so, with what command?
* Was the error sent by bbackupctl or bbackupd?
* Was bbackupd even running?

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 10:48:06 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Tue, 21 Feb 2006 11:48:06 +0100
Subject: [Box Backup-dev] Errors with trunk client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>
Message-ID: <43FAEFE6.4020508@hostingbrothers.nl>

Chris Wilson wrote:
> Hi Roy,
>
>> I tried to run the client of box backup on Windows XP, but I get the 
>> following error:
>> Communication error with control client: Server SocketAlreadyOpen
>> TRACE: Exception thrown: ServerException(SocketAlreadyOpen) at 
>> d:\backup\box\boxbackup\lib\win32\winnamedpipestream.cpp(75)
>
> I need more information to reproduce this error, since I haven't seen 
> it for a long time.
>
> * Which version of box were you running?
> * Did you build it yourself? Otherwise, which build was it?
> * What were you trying to do when you got that error? Running bbackupctl?
>   If so, with what command?
> * Was the error sent by bbackupctl or bbackupd?
> * Was bbackupd even running?
>
> Cheers, Chris.
Hi Chris,

This version is compiled with VS2003 from the trunk source of Sunday.
bbackupd was running (not in service mode, but just in a Dos-box), so I
could see what was happening.
The backup mode was snapshot, so I had to use the bbackupctl command to
issue a sync command to bbackupd. As soon as I issue that command the
error appears. The errors (very very many flashing down the screen, all
the same) are seen in the bbackupd window and when I kill that process
bbackupctl repeats that error one time.

I hope this is all information needed.

Cheers,

Roy


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 15:47:09 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 21 Feb 2006 15:47:09 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r483 - box/trunk/lib/common
Message-ID: <20060221154709.E402E95@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-21 15:47:08 +0000 (Tue, 21 Feb 2006)
New Revision: 483

Modified:
   box/trunk/lib/common/BoxPlatform.h
Log:
Disable memory testing on Darwin -- order of destructors of static variables is nasty so debug processes segfault on termination

Modified: box/trunk/lib/common/BoxPlatform.h
===================================================================
--- box/trunk/lib/common/BoxPlatform.h	2006-02-21 00:24:54 UTC (rev 482)
+++ box/trunk/lib/common/BoxPlatform.h	2006-02-21 15:47:08 UTC (rev 483)
@@ -46,6 +46,12 @@
 	#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
 #endif
 
+// Disable memory testing under Darwin, it just doesn't like it very much.
+#ifdef __APPLE__
+	// TODO: We really should get some decent leak detection code.
+	#define PLATFORM_DISABLE_MEM_LEAK_TESTING
+#endif
+
 // Find out if credentials on UNIX sockets can be obtained
 #ifndef HAVE_GETPEEREID
 	#if !HAVE_DECL_SO_PEERCRED


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 15:49:30 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 21 Feb 2006 15:49:30 +0000
Subject: [Box Backup-dev] Objections to 0.10 release?
Message-ID: <CF99E17C-6E12-4B6A-9B46-872A3372DA81@fluffy.co.uk>

Does anyone have any objections to a 0.10 release from trunk at r483?

Looking over the test results, it seems good enough to me. There are  
a few minor issues, but nothing affecting major platforms.

NetBSD is stuffed, of course. Martin -- can you commit something  
undefine HAVE_KQUEUE on NetBSD? I'm not sure what's the best way of  
doing this in the new autoconf system. After 0.10 we can do this  
properly by detecting the NetBSD way and doing something slightly  
different.

Ben




From boxbackup-dev@fluffy.co.uk  Tue Feb 21 16:07:12 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 21 Feb 2006 16:07:12 +0000
Subject: [Box Backup-dev] Objections to 0.10 release?
In-Reply-To: <CF99E17C-6E12-4B6A-9B46-872A3372DA81@fluffy.co.uk>
References: <CF99E17C-6E12-4B6A-9B46-872A3372DA81@fluffy.co.uk>
Message-ID: <20060221160712.xndkfaeg0gw44kss@ebourne.me.uk>

Ben Summers <ben@fluffy.co.uk> wrote:
> Does anyone have any objections to a 0.10 release from trunk at r483?
>
> Looking over the test results, it seems good enough to me. There are  
> a few minor issues, but nothing affecting major platforms.
>
> NetBSD is stuffed, of course. Martin -- can you commit something  
> undefine HAVE_KQUEUE on NetBSD? I'm not sure what's the best way of  
> doing this in the new autoconf system. After 0.10 we can do this  
> properly by detecting the NetBSD way and doing something slightly  
> different.

NetBSD has two issues kqueue and statfs. I don't have any access to 
netbsd so can't make a tested fix. I sent emails on each of these 
issues with half a patch & some guidance for someone with access to fix 
these (neither should be hard) last night but they bounced. I'll resend 
the emails if the list is now working again.

There's also the ssl configure patch which I think would help solaris 
out. I have a (hopefully) fixed version I also tried to send last night.

I don't really mind you releasing as is, but if it is possible for 
people to help out & fix these 3 issues in a couple of days I think it 
would be better. I'm very wary of any more delays though so I'd be 
inclined to put a short fixed time limit on that.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 16:15:40 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 21 Feb 2006 16:15:40 +0000
Subject: [Box Backup-dev] COMMIT r483 - box/trunk/lib/common
In-Reply-To: <20060221154709.E402E95@s0g0.pems.testserver.co.uk>
References: <20060221154709.E402E95@s0g0.pems.testserver.co.uk>
Message-ID: <20060221161540.nx7cyqzu2skwo0ko@ebourne.me.uk>

subversion@fluffy.co.uk wrote:
> +	// TODO: We really should get some decent leak detection code.

Not sure about all platforms, but certainly on linux with gcc 4 and 
recent glibc there's a load of excellent new memory checking stuff 
available at compile time (bounds checking on arrays, etc). Also leak 
detection in glibc.

In addition it is possible to compile important processes (eg. network 
facing servers) as PIC code so that they get run at a different address 
every time, thus helping to negate exploits.

I hope to make use of all of this on box at some juncture.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 16:18:40 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 21 Feb 2006 16:18:40 +0000
Subject: [Box Backup-dev] RC3 Solaris testing
Message-ID: <20060221161840.e18m16dz28ogocc0@ebourne.me.uk>

This message is in MIME format.

--=_n8fwodkv3vk
Content-Type: text/plain;
	charset=ISO-8859-1;
	format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

[resend]

On Mon, 2006-02-20 at 22:38 +0000, Chris Wilson wrote:
> Sure, please find attached.
>
> The magic lines:
>
> configure:7626: checking for SSL_read in -lssl
> configure:7656: g++ -o conftest -g -O2
>  	-I/home/users/g/gc/gcc/openssl-solaris-sparc/include
>  	-L/home/users/g/gc/gcc/openssl-solaris-sparc/lib conftest.cc
>  	-lssl  -lsocket -lnsl -lz -lrt  >&5
> Undefined                       first referenced
>   symbol                             in file
> CRYPTO_lock 
> /home/users/g/gc/gcc/openssl-solaris-sparc/lib/libssl.a(ssl_lib.o)
>
> Note the lack of -lcrypto and -ldl on the g++ command line.

Actually, they weren't the magic lines, it was the next couple of lines
where the test failed to rerun that were the clue.

Hopefully fixed the bug, new patch attached.

Also it's worth noting that you're trying to link against the static ssl
library, which isn't really supported and could be the reason it doesn't
work by default. I'm happy to try and make it work but can't guarantee
it.

Cheers,

Martin.


--=_n8fwodkv3vk
Content-Type: text/x-patch;
	charset=ISO-8859-1;
	name="box-ssl-conf.patch"
Content-Disposition: inline;
	filename="box-ssl-conf.patch"
Content-Transfer-Encoding: 7bit

Index: infrastructure/m4/ax_check_ssl.m4

===================================================================

--- infrastructure/m4/ax_check_ssl.m4	(revision 474)

+++ infrastructure/m4/ax_check_ssl.m4	(working copy)

@@ -27,7 +27,14 @@

 

   ax_check_ssl_found=yes

   AC_CHECK_HEADERS([openssl/ssl.h],, [ax_check_ssl_found=no])

-  AC_CHECK_LIB([ssl], [SSL_read],, [ax_check_ssl_found=no], [-lcrypto])

+  AC_CHECK_LIB([ssl], [SSL_read], [LIBS="-lssl $LIBS"], [

+    unset ac_cv_lib_ssl_SSL_read

+    AC_CHECK_LIB([ssl],

+                 [SSL_read],

+                 [LIBS="-lssl -lcrypto -ldl $LIBS"],

+                 [ax_check_ssl_found=no],

+                 [-lcrypto -ldl])

+    ],)

 

   if test "x$ax_check_ssl_found" = "xyes"; then

     AC_DEFINE([HAVE_SSL], 1, [Define to 1 if SSL is available])

Index: configure.ac

===================================================================

--- configure.ac	(revision 474)

+++ configure.ac	(working copy)

@@ -59,9 +59,9 @@

   [old-ssl],

   [AC_HELP_STRING([--enable-old-ssl],

                   [Allow use of pre-0.9.7 Open SSL - NOT RECOMMENDED, read the documentation])])

-AC_CHECK_LIB(

-  [crypto],

-  [EVP_CipherInit_ex],, [

+AC_SEARCH_LIBS(

+  [EVP_CipherInit_ex],

+  [crypto],, [

   if test "x$enable_old_ssl" = "xyes"; then

     AC_DEFINE([HAVE_OLD_SSL], 1, [Define to 1 if SSL is pre-0.9.7])

   else

@@ -179,7 +179,6 @@

   [static-bin],

   [AC_HELP_STRING([--enable-static-bin], [Link binaries with static libraries])])

 if test "x$enable_static_bin" = "xyes"; then

-  AC_CHECK_LIB([ssl],[SSL_read],,, [crypto])

   LIBS="-Wl,-Bstatic $LIBS -Wl,-Bdynamic"

 fi

 


--=_n8fwodkv3vk--

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 16:19:55 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 21 Feb 2006 16:19:55 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
Message-ID: <20060221161955.75uhpides4ww0088@ebourne.me.uk>

[resend]

On Mon, 2006-02-20 at 22:36 +0000, Ben Summers wrote:
> Actually, a quick hack would be to define  
> PLATFORM_KQUEUE_NOT_SUPPORTED on NetBSD to get the troublesome code  
> to use poll() instead.

Ok, except it's not that define any more. :)

You need to make sure HAVE_KQUEUE is not defined.

If someone submits a tested patch that special cases the AC_CHECK_FUNCS
for kqueue to not run on netbsd (look at how win32 does it elsewhere)
then I'm happy to run with that as a temporary hack for 0.10 only.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 16:19:14 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 21 Feb 2006 16:19:14 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
Message-ID: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>

This message is in MIME format.

--=_4dnjxrjboyv6
Content-Type: text/plain;
	charset=ISO-8859-1;
	format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

[resend]

On Mon, 2006-02-20 at 12:01 -0800, Per Thomsen wrote:
> When running configure on NetBSD, I get the following error:
>
> configure: error: cannot work out how to discover mount points on your
> platform
>
> I've narrowed it down to the fact that NetBSD doesn't use the 'statfs'
> struct, but rather 'statvfs'. I am not an autoconf hacker, so I don't
> know how to make that addition, but if I hack the configure script to
> use the 'statvfs' struct in its test program, the configure completes
> (of course it doesn't work beyond completing the script; I can't make
> anything).

The autoconf magic should be as below. You'll need to ./bootstrap.

You'll then need to change the code to make use of the extra defines and
do the right thing. I don't have any way of testing this, and need
sleep, so that's left as an exercise.

Cheers,

Martin.


--=_4dnjxrjboyv6
Content-Type: text/x-patch;
	charset=ISO-8859-1;
	name="box-statvfs-conf.patch"
Content-Disposition: inline;
	filename="box-statvfs-conf.patch"
Content-Transfer-Encoding: 7bit

Index: infrastructure/m4/ax_check_mount_point.m4

===================================================================

--- infrastructure/m4/ax_check_mount_point.m4	(revision 474)

+++ infrastructure/m4/ax_check_mount_point.m4	(working copy)

@@ -7,9 +7,11 @@

 dnl HAVE_MNTENT_H

 dnl HAVE_SYS_MNTTAB_H

 dnl HAVE_SYS_MOUNT_H

+dnl HAVE_SYS_STATVFS_H

 dnl HAVE_STRUCT_MNTENT_MNT_DIR

 dnl HAVE_STRUCT_MNTTAB_MNT_MOUNTP

 dnl HAVE_STRUCT_STATFS_F_MNTONNAME

+dnl HAVE_STRUCT_STATVFS_F_MNTONNAME

 dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate

 dnl

 dnl @category C

@@ -18,21 +20,25 @@

 dnl @license AllPermissive

 

 AC_DEFUN([AX_CHECK_MOUNT_POINT], [

-  AC_CHECK_FUNCS([getmntent statfs])

-  AC_CHECK_HEADERS([sys/param.h])

+  AC_CHECK_FUNCS([getmntent statfs statvfs])

+  AC_CHECK_HEADERS([sys/param.h sys/statvfs.h])

   AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/mount.h],,, [[

     #include <stdio.h>

     #ifdef HAVE_SYS_PARAM_H

       #include <sys/param.h>

     #endif

     ]])

-  # BSD

+  # OpenBSD/FreeBSD

   AC_CHECK_MEMBERS([struct statfs.f_mntonname],,, [[

     #ifdef HAVE_SYS_PARAM_H

       #include <sys/param.h>

     #endif

     #include <sys/mount.h>

     ]])

+  # NetBSD

+  AC_CHECK_MEMBERS([struct statvfs.f_mntonname],,, [[

+    #include <sys/statvfs.h>

+    ]])

   # Linux

   AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])

   # Solaris

@@ -41,6 +47,7 @@

     #include <sys/mnttab.h>

     ]])

   if test "x$ac_cv_member_struct_statfs_f_mntonname" = "xyes" || \

+     test "x$ac_cv_member_struct_statvfs_f_mntonname" = "xyes" || \

      test "x$ac_cv_member_struct_mntent_mnt_dir" = "xyes" || \

      test "x$ac_cv_member_struct_mnttab_mnt_mountp" = "xyes"

   then


--=_4dnjxrjboyv6--

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 16:30:25 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 21 Feb 2006 16:30:25 +0000
Subject: [Box Backup-dev] Objections to 0.10 release?
In-Reply-To: <20060221160712.xndkfaeg0gw44kss@ebourne.me.uk>
References: <CF99E17C-6E12-4B6A-9B46-872A3372DA81@fluffy.co.uk> <20060221160712.xndkfaeg0gw44kss@ebourne.me.uk>
Message-ID: <D661ED4A-B6CE-4F6A-BF40-CFB32068050B@fluffy.co.uk>

On 21 Feb 2006, at 16:07, Martin Ebourne wrote:

> Ben Summers <ben@fluffy.co.uk> wrote:
>> Does anyone have any objections to a 0.10 release from trunk at r483?
>>
>> Looking over the test results, it seems good enough to me. There  
>> are  a few minor issues, but nothing affecting major platforms.
>>
>> NetBSD is stuffed, of course. Martin -- can you commit something   
>> undefine HAVE_KQUEUE on NetBSD? I'm not sure what's the best way  
>> of  doing this in the new autoconf system. After 0.10 we can do  
>> this  properly by detecting the NetBSD way and doing something  
>> slightly  different.
>
> NetBSD has two issues kqueue and statfs. I don't have any access to  
> netbsd so can't make a tested fix.

Ah, good point. Yes, it's more broken than I had remembered.

> I sent emails on each of these issues with half a patch & some  
> guidance for someone with access to fix these (neither should be  
> hard) last night but they bounced. I'll resend the emails if the  
> list is now working again.
>
> There's also the ssl configure patch which I think would help  
> solaris out. I have a (hopefully) fixed version I also tried to  
> send last night.

Worth waiting a little while for those, if anyone wants to do them.  
It would be nice to have those two platforms, especially Solaris as  
so much work has gone into it.

>
> I don't really mind you releasing as is, but if it is possible for  
> people to help out & fix these 3 issues in a couple of days I think  
> it would be better. I'm very wary of any more delays though so I'd  
> be inclined to put a short fixed time limit on that.

OK then... At 8pm GMT on Thursday 23 Feb 2006 I will release trunk as  
0.10 unless someone demonstrates a showstopper before then.

Ben




From boxbackup-dev@fluffy.co.uk  Tue Feb 21 17:30:32 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 09:30:32 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>
Message-ID: <43FB4E38.1000501@reedtz.com>

This is a multi-part message in MIME format.
--------------040705040307060102040000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 2/21/06 8:19 AM, Martin Ebourne wrote:
> [resend]
>
> On Mon, 2006-02-20 at 12:01 -0800, Per Thomsen wrote:
>> When running configure on NetBSD, I get the following error:
>>
>> configure: error: cannot work out how to discover mount points on your
>> platform
>>
>> I've narrowed it down to the fact that NetBSD doesn't use the 'statfs'
>> struct, but rather 'statvfs'. I am not an autoconf hacker, so I don't
>> know how to make that addition, but if I hack the configure script to
>> use the 'statvfs' struct in its test program, the configure completes
>> (of course it doesn't work beyond completing the script; I can't make
>> anything).
>
> The autoconf magic should be as below. You'll need to ./bootstrap.
>
> You'll then need to change the code to make use of the extra defines and
> do the right thing. I don't have any way of testing this, and need
> sleep, so that's left as an exercise.
I have the full set of diffs that create a working set of executables
(with test failures, mind you).

I have attached the diff.

WARNING: this is very much a work in progress, I just thought that if
someone else was working on the same thing, it would be useful to share
the diffs.

There are several instances of pointer conversions that the compiler
will not accept. To get the build working, I simply changed them to what
worked. These are mostly related to the 'EV_SET' macro in <sys/event.h>.
It might need to be ifdef'ed, or a macro created for each platform, or
something.

I'm relatively confident in the mount-point changes I made, but
obviously would like feedback on it. There is a different way to do some
of the changes I made (involving creating a macro for the statfs/statvfs
call), and if you don't like the way it looks now, that's an easy change.
>
> Cheers,
>
> Martin.
>
> ------------------------------------------------------------------------
>
> Index: infrastructure/m4/ax_check_mount_point.m4
>
> ===================================================================
>
> --- infrastructure/m4/ax_check_mount_point.m4	(revision 474)
>
> +++ infrastructure/m4/ax_check_mount_point.m4	(working copy)
>
> @@ -7,9 +7,11 @@
>
>  dnl HAVE_MNTENT_H
>
>  dnl HAVE_SYS_MNTTAB_H
>
>  dnl HAVE_SYS_MOUNT_H
>
> +dnl HAVE_SYS_STATVFS_H
>
>  dnl HAVE_STRUCT_MNTENT_MNT_DIR
>
>  dnl HAVE_STRUCT_MNTTAB_MNT_MOUNTP
>
>  dnl HAVE_STRUCT_STATFS_F_MNTONNAME
>
> +dnl HAVE_STRUCT_STATVFS_F_MNTONNAME
>
>  dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
>
>  dnl
>
>  dnl @category C
>
> @@ -18,21 +20,25 @@
>
>  dnl @license AllPermissive
>
>  
>
>  AC_DEFUN([AX_CHECK_MOUNT_POINT], [
>
> -  AC_CHECK_FUNCS([getmntent statfs])
>
> -  AC_CHECK_HEADERS([sys/param.h])
>
> +  AC_CHECK_FUNCS([getmntent statfs statvfs])
>
> +  AC_CHECK_HEADERS([sys/param.h sys/statvfs.h])
>
>    AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/mount.h],,, [[
>
>      #include <stdio.h>
>
>      #ifdef HAVE_SYS_PARAM_H
>
>        #include <sys/param.h>
>
>      #endif
>
>      ]])
>
> -  # BSD
>
> +  # OpenBSD/FreeBSD
>
>    AC_CHECK_MEMBERS([struct statfs.f_mntonname],,, [[
>
>      #ifdef HAVE_SYS_PARAM_H
>
>        #include <sys/param.h>
>
>      #endif
>
>      #include <sys/mount.h>
>
>      ]])
>
> +  # NetBSD
>
> +  AC_CHECK_MEMBERS([struct statvfs.f_mntonname],,, [[
>
> +    #include <sys/statvfs.h>
>
> +    ]])
>   
See my diff below... I think all you need is to include <sys/mount.h>,
since it explicitly includes <sys/statvfs.h>

Again, I'm no guru on this stuff, so I defer to you... My diff worked,
and produced a workable Makefile.
>    # Linux
>
>    AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])
>
>    # Solaris
>
> @@ -41,6 +47,7 @@
>
>      #include <sys/mnttab.h>
>
>      ]])
>
>    if test "x$ac_cv_member_struct_statfs_f_mntonname" = "xyes" || \
>
> +     test "x$ac_cv_member_struct_statvfs_f_mntonname" = "xyes" || \
>
>       test "x$ac_cv_member_struct_mntent_mnt_dir" = "xyes" || \
>
>       test "x$ac_cv_member_struct_mnttab_mnt_mountp" = "xyes"
>
>    then
>   
Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


--------------040705040307060102040000
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
 name="NetBSD-diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="NetBSD-diff"

Index: infrastructure/m4/ax_check_mount_point.m4
===================================================================
--- infrastructure/m4/ax_check_mount_point.m4	(revision 482)
+++ infrastructure/m4/ax_check_mount_point.m4	(working copy)
@@ -10,6 +10,7 @@
 dnl HAVE_STRUCT_MNTENT_MNT_DIR
 dnl HAVE_STRUCT_MNTTAB_MNT_MOUNTP
 dnl HAVE_STRUCT_STATFS_F_MNTONNAME
+dnl HAVE_STRUCT_STATvFS_F_MNTONNAME
 dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
 dnl
 dnl @category C
@@ -33,6 +34,13 @@
     #endif
     #include <sys/mount.h>
     ]])
+  # NetBSD
+  AC_CHECK_MEMBERS([struct statvfs.f_mntonname],,, [[
+    #ifdef HAVE_SYS_PARAM_H
+      #include <sys/param.h>
+    #endif
+    #include <sys/mount.h>
+    ]])
   # Linux
   AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])
   # Solaris
@@ -41,6 +49,7 @@
     #include <sys/mnttab.h>
     ]])
   if test "x$ac_cv_member_struct_statfs_f_mntonname" = "xyes" || \
+     test "x$ac_cv_member_struct_statvfs_f_mntonname" = "xyes" || \
      test "x$ac_cv_member_struct_mntent_mnt_dir" = "xyes" || \
      test "x$ac_cv_member_struct_mnttab_mnt_mountp" = "xyes"
   then
Index: lib/server/SocketListen.h
===================================================================
--- lib/server/SocketListen.h	(revision 482)
+++ lib/server/SocketListen.h	(working copy)
@@ -253,7 +253,7 @@
 	// --------------------------------------------------------------------------
 	void FillInKEvent(struct kevent &rEvent, int Flags = 0) const
 	{
-		EV_SET(&rEvent, mSocketHandle, EVFILT_READ, 0, 0, 0, (void*)this);
+		EV_SET(&rEvent, mSocketHandle, EVFILT_READ, 0, 0, 0, (int)this);
 	}
 #else
 	// --------------------------------------------------------------------------
Index: lib/common/WaitForEvent.h
===================================================================
--- lib/common/WaitForEvent.h	(revision 482)
+++ lib/common/WaitForEvent.h	(working copy)
@@ -70,7 +70,7 @@
 		pItem->FillInKEvent(e, Flags);
 		// Fill in extra flags to say what to do
 		e.flags |= EV_ADD;
-		e.udata = (void*)pItem;
+		e.udata = (int)pItem;
 		if(::kevent(mKQueue, &e, 1, NULL, 0, NULL) == -1)
 		{
 			THROW_EXCEPTION(CommonException, KEventErrorAdd)
Index: lib/common/WaitForEvent.cpp
===================================================================
--- lib/common/WaitForEvent.cpp	(revision 482)
+++ lib/common/WaitForEvent.cpp	(working copy)
@@ -123,7 +123,7 @@
 
 	case 1:
 		// Event happened!
-		return e.udata;
+		return (void *)e.udata;
 		break;
 		
 	default:
Index: lib/common/EventWatchFilesystemObject.cpp
===================================================================
--- lib/common/EventWatchFilesystemObject.cpp	(revision 482)
+++ lib/common/EventWatchFilesystemObject.cpp	(working copy)
@@ -91,7 +91,7 @@
 // --------------------------------------------------------------------------
 void EventWatchFilesystemObject::FillInKEvent(struct kevent &rEvent, int Flags) const
 {
-	EV_SET(&rEvent, mDescriptor, EVFILT_VNODE, EV_CLEAR, NOTE_DELETE | NOTE_WRITE, 0, (void*)this);
+	EV_SET(&rEvent, mDescriptor, EVFILT_VNODE, EV_CLEAR, NOTE_DELETE | NOTE_WRITE, 0, (int)this);
 }
 #else
 void EventWatchFilesystemObject::FillInPoll(int &fd, short &events, int Flags) const
Index: bin/bbackupd/BackupDaemon.cpp
===================================================================
--- bin/bbackupd/BackupDaemon.cpp	(revision 482)
+++ bin/bbackupd/BackupDaemon.cpp	(working copy)
@@ -1170,7 +1170,7 @@
 
 
 
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_NMTONNAME)
 	// string comparison ordering for when mount points are handled
 	// by code, rather than the OS.
 	typedef struct
@@ -1234,7 +1234,7 @@
 	int numIDMaps = 0;
 
 #ifdef HAVE_MOUNTS
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_MNTONNAME)
 	// Linux and others can't tell you where a directory is mounted. So we
 	// have to read the mount entries from /etc/mtab! Bizarre that the OS
 	// itself can't tell you, but there you go.
@@ -1308,7 +1308,7 @@
 		ASSERT(*i == "/");
 	}
 #endif // n NDEBUG
-#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME
+#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME || n HAVE_STRUCT_STATVFS_F_MNTONNAME
 #endif // HAVE_MOUNTS
 
 	// Then... go through each of the entries in the configuration,
@@ -1332,11 +1332,16 @@
 			// Do a fsstat on the pathname to find out which mount it's on
 			{
 
-#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32
+#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined HAVE_STRUCT_STATVFS_F_MNTONNAME || defined WIN32
 
 				// BSD style statfs -- includes mount point, which is nice.
+#ifdef HAVE_STRUCT_STATVFS_F_MNTONNAME
+				struct statvfs s;
+				if(::statvfs(ploc->mPath.c_str(), &s) != 0)
+#else // HAVE_STRUCT_STATVFS_F_MNTONNAME
 				struct statfs s;
 				if(::statfs(ploc->mPath.c_str(), &s) != 0)
+#endif // HAVE_STRUCT_STATVFS_F_MNTONNAME
 				{
 					THROW_EXCEPTION(CommonException, OSFileError)
 				}

--------------040705040307060102040000--

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 17:51:25 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 21 Feb 2006 17:51:25 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FB4E38.1000501@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk> <43FB4E38.1000501@reedtz.com>
Message-ID: <037A7EB0-213E-4633-8242-8F2D701D4BA7@fluffy.co.uk>

On 21 Feb 2006, at 17:30, Per Thomsen wrote:

> I have the full set of diffs that create a working set of executables
> (with test failures, mind you).
>
> I have attached the diff.
>
> WARNING: this is very much a work in progress, I just thought that if
> someone else was working on the same thing, it would be useful to  
> share
> the diffs.
>
>
[snip]

>  	//  
> ---------------------------------------------------------------------- 
> ----
>  	void FillInKEvent(struct kevent &rEvent, int Flags = 0) const
>  	{
> -		EV_SET(&rEvent, mSocketHandle, EVFILT_READ, 0, 0, 0, (void*)this);
> +		EV_SET(&rEvent, mSocketHandle, EVFILT_READ, 0, 0, 0, (int)this);
>  	}

... etc ...

Is this 64 bit clean? I suspect it'll fail nastily if sizeof(void*) ! 
= sizeof(int).

I suspect on a platform where udata is an int rather than a pointer,  
we're going to have to keep an array full of our pointers, and use  
udata as an index into it.

Or give up and use poll() on those platforms, because it's not  
exactly much of a performance hit. It'll only have to make the poll  
structure once per incoming connection.

Is is possible to use autoconf to test for the type of a structure  
member?

Ben





From boxbackup-dev@fluffy.co.uk  Tue Feb 21 17:52:43 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 21 Feb 2006 17:52:43 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FB4E38.1000501@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>
 <43FB4E38.1000501@reedtz.com>
Message-ID: <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk>

Per Thomsen <pthomsen@reedtz.com> wrote:
> There are several instances of pointer conversions that the compiler
> will not accept. To get the build working, I simply changed them to what
> worked. These are mostly related to the 'EV_SET' macro in <sys/event.h>.
> It might need to be ifdef'ed, or a macro created for each platform, or
> something.

Casting a pointer to an int is out of the question. We need to find a 
better solution for these casts, but I don't think now's the time. If 
you can knock together a short configure.ac patch that skips the kqueue 
check on netbsd (should be about 3 lines) then we can go with that for 
now.

> I'm relatively confident in the mount-point changes I made, but
> obviously would like feedback on it. There is a different way to do some
> of the changes I made (involving creating a macro for the statfs/statvfs
> call), and if you don't like the way it looks now, that's an easy change.

These look fine & I'll commit these unless anyone else raises issues.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 18:05:07 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 10:05:07 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk>
Message-ID: <43FB5653.3020306@reedtz.com>

On 2/21/06 9:52 AM, Martin Ebourne wrote:
> Per Thomsen <pthomsen@reedtz.com> wrote:
>> There are several instances of pointer conversions that the compiler
>> will not accept. To get the build working, I simply changed them to what
>> worked. These are mostly related to the 'EV_SET' macro in <sys/event.h>.
>> It might need to be ifdef'ed, or a macro created for each platform, or
>> something.
>
> Casting a pointer to an int is out of the question. We need to find a
> better solution for these casts, but I don't think now's the time. If
> you can knock together a short configure.ac patch that skips the
> kqueue check on netbsd (should be about 3 lines) then we can go with
> that for now.
I'll do that, but I think the test failures preclude releasing anything
for NetBSD in 0.10. There are several test failures, that I can't figure
out at this point.
>
>> I'm relatively confident in the mount-point changes I made, but
>> obviously would like feedback on it. There is a different way to do some
>> of the changes I made (involving creating a macro for the statfs/statvfs
>> call), and if you don't like the way it looks now, that's an easy
>> change.
>
> These look fine & I'll commit these unless anyone else raises issues.
That's fine, but I'd hate to release half a NetBSD port. As long as
we're not putting this into 0.10, I think it's fine.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 18:11:30 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 21 Feb 2006 18:11:30 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FB5653.3020306@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com>
Message-ID: <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk>

On 21 Feb 2006, at 18:05, Per Thomsen wrote:

> On 2/21/06 9:52 AM, Martin Ebourne wrote:
>> Per Thomsen <pthomsen@reedtz.com> wrote:
>>> There are several instances of pointer conversions that the compiler
>>> will not accept. To get the build working, I simply changed them  
>>> to what
>>> worked. These are mostly related to the 'EV_SET' macro in <sys/ 
>>> event.h>.
>>> It might need to be ifdef'ed, or a macro created for each  
>>> platform, or
>>> something.
>>
>> Casting a pointer to an int is out of the question. We need to find a
>> better solution for these casts, but I don't think now's the time. If
>> you can knock together a short configure.ac patch that skips the
>> kqueue check on netbsd (should be about 3 lines) then we can go with
>> that for now.
> I'll do that, but I think the test failures preclude releasing  
> anything
> for NetBSD in 0.10. There are several test failures, that I can't  
> figure
> out at this point.

If you put that in, what test failures do you get?

Ben




From boxbackup-dev@fluffy.co.uk  Tue Feb 21 18:15:16 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 10:15:16 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FB4E38.1000501@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk> <43FB4E38.1000501@reedtz.com>
Message-ID: <43FB58B4.7000700@reedtz.com>

On 2/21/06 9:30 AM, Per Thomsen wrote:
> On 2/21/06 8:19 AM, Martin Ebourne wrote:
>   
>> [resend]
>>
>> On Mon, 2006-02-20 at 12:01 -0800, Per Thomsen wrote:
>>     
>>> When running configure on NetBSD, I get the following error:
>>>
>>> configure: error: cannot work out how to discover mount points on your
>>> platform
>>>
>>> I've narrowed it down to the fact that NetBSD doesn't use the 'statfs'
>>> struct, but rather 'statvfs'. I am not an autoconf hacker, so I don't
>>> know how to make that addition, but if I hack the configure script to
>>> use the 'statvfs' struct in its test program, the configure completes
>>> (of course it doesn't work beyond completing the script; I can't make
>>> anything).
>>>       
>> The autoconf magic should be as below. You'll need to ./bootstrap.
>>
>> You'll then need to change the code to make use of the extra defines and
>> do the right thing. I don't have any way of testing this, and need
>> sleep, so that's left as an exercise.
>>     
> I have the full set of diffs that create a working set of executables
> (with test failures, mind you).
>   
Here are the test results. This (debug) test was run with executables
built with my diffs, plus a commenting out of the HAVE_KQUEUE macro in
BoxConfig.h (Hacked it, before I knew how to get rid if that define for
NetBSD in the autoconf stuff).

common: PASSED
crypto: PASSED
compress: FAILED: Exception caught: St9bad_alloc
basicserver: PASSED
raidfile: PASSED
backupstore: PASSED
backupstorefix: FAILED: Exception caught: BackupStore
CouldNotFindEntryInDirectory
backupstorepatch: FAILED: 2 tests failed
backupdiff: PASSED
bbackupd: FAILED: 2 tests failed       

And the details (with a bit of context around the failures):

: {160} grep -A 3 -B 3 FAIL debug-nokqueue.out
Allocating CompressStream buffer, size 256
compressed size = 293082, source size = 33521664
Allocating CompressStream buffer, size 256
FAILED: Exception caught: St9bad_alloc
(cd ../../lib/common; make  -D NODEPS)
`../../debug/lib/common/common.a' is up to date.
(cd ../../lib/server; make  -D NODEPS)
--

  === Delete store info, add random file
  === Delete an entry for an object from dir, change that object to be a
patch, check it's deleted
FAILURE: Condition [i != nameToID.end()] failed at
testbackupstorefix.cpp(89)
FAILURE: Condition [dir.FindEntryByID(delID) != 0] failed at
testbackupstorefix.cpp(384)
Exception thrown: BackupStoreException(CouldNotFindEntryInDirectory) at
BackupStoreDirectory.cpp(346)
FAILED: Exception caught: BackupStore CouldNotFindEntryInDirectory
(cd ../../lib/common; make  -D NODEPS)
`../../debug/lib/common/common.a' is up to date.
(cd ../../lib/compress; make  -D NODEPS)
--
000004    3 0000000000000004    0  10    0 file depNew(5) depOld(3)
000005    3 0000000000000004    0  10    0 file depNew(6) depOld(4)
Server: ../../bin/bbstored/bbstored testfiles/bbstored.conf
FAILURE: Server didn't save PID file at ../../lib/common/Test.h(97)
FAILURE: Condition [pid != -1 && pid != 0] failed at
testbackupstorepatch.cpp(323)
FAILED: 2 tests failed
(cd ../../lib/common; make  -D NODEPS)
`../../debug/lib/common/common.a' is up to date.
(cd ../../lib/compress; make  -D NODEPS)
--
Exception thrown: CommonException(OSFileError) at
BackupClientFileAttributes.cpp(690)
Exception thrown: BackupStoreException(AttributesNotLoaded) at
BackupClientFileAttributes.cpp(586)
Server: ../../bin/bbstored/bbstored testfiles/bbstored.conf
FAILURE: Server didn't save PID file at ../../lib/common/Test.h(97)
FAILURE: Condition [bbstored_pid != -1 && bbstored_pid != 0] failed at
testbbackupd.cpp(388)
FAILED: 2 tests failed   

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 18:18:27 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Tue, 21 Feb 2006 18:18:27 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <037A7EB0-213E-4633-8242-8F2D701D4BA7@fluffy.co.uk>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>
 <43FB4E38.1000501@reedtz.com>
 <037A7EB0-213E-4633-8242-8F2D701D4BA7@fluffy.co.uk>
Message-ID: <20060221181827.1fb0lt0f8kwgww4o@ebourne.me.uk>

Ben Summers <ben@fluffy.co.uk> wrote:
> Is is possible to use autoconf to test for the type of a structure  member?

It's probably possible to do anything in autoconf if you're keen enough. :)

I don't think there's an explicit type test, but something like the 
following is very flexible:

AC_CACHE_CHECK(whether the compiler supports exceptions,
ac_cv_cxx_exceptions,
[AC_TRY_COMPILE(,[try { throw  1; } catch (int i) { return i; }],
                ac_cv_cxx_exceptions=yes, ac_cv_cxx_exceptions=no)])
if test "$ac_cv_cxx_exceptions" = yes; then
  AC_DEFINE(HAVE_EXCEPTIONS,,[define if the compiler supports exceptions])
fi

Just change the names and stick in a piece of C++ code that either 
compiles or fails depending on what you get. I guess something like:

void* ptr = NULL;
struct kevent ev;
ev.udata = ptr;
return 0;

would probably do the trick. Or use the EV_SET macro similarly.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 18:20:48 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 10:20:48 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk>
Message-ID: <43FB5A00.4010108@reedtz.com>

On 2/21/06 10:11 AM, Ben Summers wrote:
>
> On 21 Feb 2006, at 18:05, Per Thomsen wrote:
>
>> On 2/21/06 9:52 AM, Martin Ebourne wrote:
>>> Per Thomsen <pthomsen@reedtz.com> wrote:
>>>> There are several instances of pointer conversions that the compiler
>>>> will not accept. To get the build working, I simply changed them to
>>>> what
>>>> worked. These are mostly related to the 'EV_SET' macro in
>>>> <sys/event.h>.
>>>> It might need to be ifdef'ed, or a macro created for each platform, or
>>>> something.
>>>
>>> Casting a pointer to an int is out of the question. We need to find a
>>> better solution for these casts, but I don't think now's the time. If
>>> you can knock together a short configure.ac patch that skips the
>>> kqueue check on netbsd (should be about 3 lines) then we can go with
>>> that for now.
>> I'll do that, but I think the test failures preclude releasing anything
>> for NetBSD in 0.10. There are several test failures, that I can't figure
>> out at this point.
>
> If you put that in, what test failures do you get?
I just sent a message with the test results for the full battery of
tests. I will run the backupstorepatch and bbackupd tests individually,
and post the results in a few minutes.

Thanks,
Per


>
> Ben
>
>
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 18:41:30 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 10:41:30 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FB5A00.4010108@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk> <43FB5A00.4010108@reedtz.com>
Message-ID: <43FB5EDA.8050105@reedtz.com>

On 2/21/06 10:20 AM, Per Thomsen wrote:
> On 2/21/06 10:11 AM, Ben Summers wrote:
>   
>> On 21 Feb 2006, at 18:05, Per Thomsen wrote:
>>
>>     
>>> On 2/21/06 9:52 AM, Martin Ebourne wrote:
>>>       
>>>> Per Thomsen <pthomsen@reedtz.com> wrote:
>>>>         
>>>>> There are several instances of pointer conversions that the compiler
>>>>> will not accept. To get the build working, I simply changed them to
>>>>> what
>>>>> worked. These are mostly related to the 'EV_SET' macro in
>>>>> <sys/event.h>.
>>>>> It might need to be ifdef'ed, or a macro created for each platform, or
>>>>> something.
>>>>>           
>>>> Casting a pointer to an int is out of the question. We need to find a
>>>> better solution for these casts, but I don't think now's the time. If
>>>> you can knock together a short configure.ac patch that skips the
>>>> kqueue check on netbsd (should be about 3 lines) then we can go with
>>>> that for now.
>>>>         
>>> I'll do that, but I think the test failures preclude releasing anything
>>> for NetBSD in 0.10. There are several test failures, that I can't figure
>>> out at this point.
>>>       
>> If you put that in, what test failures do you get?
>>     
> I just sent a message with the test results for the full battery of
> tests. I will run the backupstorepatch and bbackupd tests individually,
> and post the results in a few minutes.
>   
When run individually, backupstorepatch passed (problem appeared to be a
non-dying bbstored from a previous test).


The bbackupd test, when run exits at this point in the test:

[ 0 (of 0) differences probably due to file modifications after the last
upload ]
Differences: 0 (0 dirs excluded, 0 files excluded)
..
Add files with current time
--------
bbackupd: Add files with current time          


I can't find a core file anywhere. I am re-running the test now.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 18:48:04 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 21 Feb 2006 18:48:04 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FB5EDA.8050105@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk> <43FB5A00.4010108@reedtz.com> <43FB5EDA.8050105@reedtz.com>
Message-ID: <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk>

On 21 Feb 2006, at 18:41, Per Thomsen wrote:
>>
> When run individually, backupstorepatch passed (problem appeared to  
> be a
> non-dying bbstored from a previous test).
>
>
> The bbackupd test, when run exits at this point in the test:
>
> [ 0 (of 0) differences probably due to file modifications after the  
> last
> upload ]
> Differences: 0 (0 dirs excluded, 0 files excluded)
> ..
> Add files with current time
> --------
> bbackupd: Add files with current time
>
>
> I can't find a core file anywhere. I am re-running the test now.

Hmmm... something things happen oddly. Try running each test  
individually, making sure there aren't any processes left behind  
after each one.

Ben






From boxbackup-dev@fluffy.co.uk  Tue Feb 21 19:17:33 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 11:17:33 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk> <43FB5A00.4010108@reedtz.com> <43FB5EDA.8050105@reedtz.com> <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk>
Message-ID: <43FB674D.7040900@reedtz.com>

On 2/21/06 10:48 AM, Ben Summers wrote:
>
> On 21 Feb 2006, at 18:41, Per Thomsen wrote:
>>>
>> When run individually, backupstorepatch passed (problem appeared to be a
>> non-dying bbstored from a previous test).
>>
>>
>> The bbackupd test, when run exits at this point in the test:
>>
>> [ 0 (of 0) differences probably due to file modifications after the last
>> upload ]
>> Differences: 0 (0 dirs excluded, 0 files excluded)
>> ..
>> Add files with current time
>> --------
>> bbackupd: Add files with current time
>>
>>
>> I can't find a core file anywhere. I am re-running the test now.
>
> Hmmm... something things happen oddly. Try running each test
> individually, making sure there aren't any processes left behind after
> each one.
Chalk this one up to lack of sleep... I was trying to figure out what
was going on wit this test last night, and I put an 'exit(0);' in the
testbbackupd.cpp to stop the test where a problem was occuring. It's
running now.

Sorry about that.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 19:27:29 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 11:27:29 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk> <43FB5A00.4010108@reedtz.com> <43FB5EDA.8050105@reedtz.com> <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk>
Message-ID: <43FB69A1.5070704@reedtz.com>

On 2/21/06 10:48 AM, Ben Summers wrote:
>
> On 21 Feb 2006, at 18:41, Per Thomsen wrote:
>>>
>> When run individually, backupstorepatch passed (problem appeared to be a
>> non-dying bbstored from a previous test).
>>
>>
>> The bbackupd test, when run exits at this point in the test:
>>
>> [ 0 (of 0) differences probably due to file modifications after the last
>> upload ]
>> Differences: 0 (0 dirs excluded, 0 files excluded)
>> ..
>> Add files with current time
>> --------
>> bbackupd: Add files with current time
>>
>>
>> I can't find a core file anywhere. I am re-running the test now.
Here are the results (same as with HAVE_KQUEUE):

: {240} grep -A 3 -B 3 FAIL debug-bbackupd-2.out
[ 11 (of 12) differences probably due to file modifications after the
last upload ]
Differences: 12 (3 dirs excluded, 4 files excluded)

FAILURE: Condition [compareReturnValue == 1*256] failed at
testbbackupd.cpp(837)
Rename directory
waiting: ............Local file 'testfiles/TestDir1/apropos' exists, but
store file '/Test1/apropos' does not exist.
(the file above was modified after the last sync time -- might be reason
for difference)
--
[ 5 (of 10) differences probably due to file modifications after the
last upload ]
Differences: 10 (3 dirs excluded, 4 files excluded)

FAILURE: Condition [compareReturnValue == 1*256] failed at
testbbackupd.cpp(845)
FAILURE: Condition [compareReturnValue == 1*256] failed at
testbbackupd.cpp(849)
Rename files
waiting: ............Local file 'testfiles/TestDir1/continousupdate'
does not exist, but store file '/Test1/continousupdate' does.
Local file 'testfiles/TestDir1/df324' does not exist, but store file
'/Test1/df324' does.
--
[ 9 (of 16) differences probably due to file modifications after the
last upload ]
Differences: 16 (3 dirs excluded, 4 files excluded)

FAILURE: Condition [compareReturnValue == 1*256] failed at
testbbackupd.cpp(859)
Create a file with timestamp to way ahead in the future
waiting: ............
[ 0 (of 0) differences probably due to file modifications after the last
upload ]
--
00000052 -d---- 1970-01-01T00:00:00 0000000000000000
Test1/renamed-dir/dsfsfdslkjfkdsjf
00000053 f----- 2006-02-21T11:23:27 6c56ee3b9bb9e1e8 Test1/fileaftermarker

FAILED: 4 tests failed
--------
bbackupd: FAILED: 4 tests failed

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 20:26:45 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Tue, 21 Feb 2006 21:26:45 +0100
Subject: [Box Backup-dev] Errors with trunk client (Win32)
In-Reply-To: <43FAEFE6.4020508@hostingbrothers.nl>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com> <43FAEFE6.4020508@hostingbrothers.nl>
Message-ID: <43FB7785.8010104@hostingbrothers.nl>

Roy wrote:
> Chris Wilson wrote:
>> Hi Roy,
>>
>>> I tried to run the client of box backup on Windows XP, but I get the 
>>> following error:
>>> Communication error with control client: Server SocketAlreadyOpen
>>> TRACE: Exception thrown: ServerException(SocketAlreadyOpen) at 
>>> d:\backup\box\boxbackup\lib\win32\winnamedpipestream.cpp(75)
>>
>> I need more information to reproduce this error, since I haven't seen 
>> it for a long time.
>>
>> * Which version of box were you running?
>> * Did you build it yourself? Otherwise, which build was it?
>> * What were you trying to do when you got that error? Running 
>> bbackupctl?
>>   If so, with what command?
>> * Was the error sent by bbackupctl or bbackupd?
>> * Was bbackupd even running?
>>
>> Cheers, Chris.
> Hi Chris,
>
> This version is compiled with VS2003 from the trunk source of Sunday.
> bbackupd was running (not in service mode, but just in a Dos-box), so I
> could see what was happening.
> The backup mode was snapshot, so I had to use the bbackupctl command to
> issue a sync command to bbackupd. As soon as I issue that command the
> error appears. The errors (very very many flashing down the screen, all
> the same) are seen in the bbackupd window and when I kill that process
> bbackupctl repeats that error one time.
>
> I hope this is all information needed.
>
> Cheers,
>
> Roy
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev
Is this error introduced because of compiling with VS2003 or is it 
another problem? I hope it will be fixed before the 0.10 release.
Maybe I can provide some more information about the problem if needed...

Gr.

Roy

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 20:38:20 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 21 Feb 2006 20:38:20 +0000 (GMT)
Subject: [Box Backup-dev] Objections to 0.10 release?
In-Reply-To: <20060221160712.xndkfaeg0gw44kss@ebourne.me.uk>
References: <CF99E17C-6E12-4B6A-9B46-872A3372DA81@fluffy.co.uk>
 <20060221160712.xndkfaeg0gw44kss@ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602212034280.14656@top.qwarx.com>

Hi all,

On Tue, 21 Feb 2006, Martin Ebourne wrote:

>>  Does anyone have any objections to a 0.10 release from trunk at r483?

Not really, but would you mind if I built the win32 binary from my 
general-fixes branch rather than trunk? I think the command socket fixes 
are worth having. Or I can produce binaries of both, and let people 
decide.

> NetBSD has two issues kqueue and statfs. I don't have any access to 
> netbsd so can't make a tested fix. I sent emails on each of these issues 
> with half a patch & some guidance for someone with access to fix these 
> (neither should be hard) last night but they bounced. I'll resend the 
> emails if the list is now working again.

I have non-root access to a NetBSD box and I can do debugging on there. I 
managed to compile successfully after disabling HAVE_KQUEUE (no statfs 
issues on NetBSD 2.0.2) but some tests are failing.

> I don't really mind you releasing as is, but if it is possible for 
> people to help out & fix these 3 issues in a couple of days I think it 
> would be better. I'm very wary of any more delays though so I'd be 
> inclined to put a short fixed time limit on that.

I'm also in favour of getting the release out sooner rather than later.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 21:00:52 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 21 Feb 2006 21:00:52 +0000 (GMT)
Subject: [Box Backup-dev] Visual Studio 2003 project files
In-Reply-To: <43F9A209.8050300@hostingbrothers.nl>
References: <43F9A209.8050300@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602212100440.14656@top.qwarx.com>

Hi Mark,

> The Visual Studio 2003 project files that I've mailed in my last e-mail
> didn't compile the release version. The ones I've attached now do.

Thanks! I've updated the trunk with your new files.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 21:05:38 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 13:05:38 -0800
Subject: [Box Backup-dev] Objections to 0.10 release?
In-Reply-To: <Pine.LNX.4.62.0602212034280.14656@top.qwarx.com>
References: <CF99E17C-6E12-4B6A-9B46-872A3372DA81@fluffy.co.uk> <20060221160712.xndkfaeg0gw44kss@ebourne.me.uk> <Pine.LNX.4.62.0602212034280.14656@top.qwarx.com>
Message-ID: <43FB80A2.9010507@reedtz.com>

On 2/21/06 12:38 PM, Chris Wilson wrote:
> Hi all,
>
> On Tue, 21 Feb 2006, Martin Ebourne wrote:
>
>>> Does anyone have any objections to a 0.10 release from trunk at r483?
>
> Not really, but would you mind if I built the win32 binary from my
> general-fixes branch rather than trunk? I think the command socket
> fixes are worth having. Or I can produce binaries of both, and let
> people decide.
>
>> NetBSD has two issues kqueue and statfs. I don't have any access to
>> netbsd so can't make a tested fix. I sent emails on each of these
>> issues with half a patch & some guidance for someone with access to
>> fix these (neither should be hard) last night but they bounced. I'll
>> resend the emails if the list is now working again.
>
> I have non-root access to a NetBSD box and I can do debugging on
> there. I managed to compile successfully after disabling HAVE_KQUEUE
> (no statfs issues on NetBSD 2.0.2) but some tests are failing.
NetBSD 3.0 introduced the use of statvfs, that's why you're not seeing
any issues there.

FWIW, I am not seeing any difference in my test results with our without
HAVE_KQUEUE...
>
>> I don't really mind you releasing as is, but if it is possible for
>> people to help out & fix these 3 issues in a couple of days I think
>> it would be better. I'm very wary of any more delays though so I'd be
>> inclined to put a short fixed time limit on that.
>
> I'm also in favour of getting the release out sooner rather than later.
I think we should get 0.10 out now, and have NetBSD (and others) working
well for 0.11.

My €0.02,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 21:16:49 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 21 Feb 2006 21:16:49 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r484 - in box/chris/general: distribution/boxbackup infrastructure/msvc/2003 lib/common
Message-ID: <20060221211649.A3ABD95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-21 21:16:45 +0000 (Tue, 21 Feb 2006)
New Revision: 484

Added:
   box/chris/general/infrastructure/msvc/2003/boxbackup.ncb
Modified:
   box/chris/general/distribution/boxbackup/VERSION.txt
   box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj
   box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj
   box/chris/general/infrastructure/msvc/2003/boxbackup.suo
   box/chris/general/infrastructure/msvc/2003/boxquery.vcproj
   box/chris/general/infrastructure/msvc/2003/common.vcproj
   box/chris/general/infrastructure/msvc/2003/win32test.vcproj
   box/chris/general/lib/common/BoxPlatform.h
Log:
* distribution/boxbackup/VERSION.txt
* infrastructure/msvc/2003/*
* lib/common/BoxPlatform.h
- Merged in changes from r471 to r483 (mainly updated VS2003 project files)


Modified: box/chris/general/distribution/boxbackup/VERSION.txt
===================================================================
--- box/chris/general/distribution/boxbackup/VERSION.txt	2006-02-21 15:47:08 UTC (rev 483)
+++ box/chris/general/distribution/boxbackup/VERSION.txt	2006-02-21 21:16:45 UTC (rev 484)
@@ -1,2 +1,2 @@
-0.09_plus2
+0.09_plus3
 boxbackup

Modified: box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj	2006-02-21 15:47:08 UTC (rev 483)
+++ box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj	2006-02-21 21:16:45 UTC (rev 484)
@@ -23,7 +23,7 @@
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
+				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"
@@ -32,7 +32,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
+				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
 				OutputFile="$(OutDir)/bbackupctl.exe"
 				LinkIncremental="2"
 				GenerateDebugInformation="TRUE"
@@ -131,6 +131,9 @@
 					<File
 						RelativePath="..\..\..\bin\bbackupctl\bbackupctl.cpp">
 					</File>
+					<File
+						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.cpp">
+					</File>
 				</Filter>
 			</Filter>
 		</Filter>
@@ -138,6 +141,9 @@
 			Name="Header Files"
 			Filter="h;hpp;hxx;hm;inl;inc;xsd"
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath="..\..\..\lib\win32\WinNamedPipeStream.h">
+			</File>
 		</Filter>
 		<Filter
 			Name="Resource Files"

Modified: box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj	2006-02-21 15:47:08 UTC (rev 483)
+++ box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj	2006-02-21 21:16:45 UTC (rev 484)
@@ -23,7 +23,7 @@
 				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
+				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"
@@ -32,7 +32,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\lib\win32\Debug\boost_regex.lib $(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
+				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
 				OutputFile="$(OutDir)/bbackupd.exe"
 				LinkIncremental="2"
 				IgnoreAllDefaultLibraries="FALSE"
@@ -84,7 +84,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\lib\win32\Release\boost_regex.lib"
+				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib"
 				OutputFile="$(OutDir)/bbackupd.exe"
 				LinkIncremental="1"
 				IgnoreDefaultLibraryNames=""
@@ -148,11 +148,14 @@
 						RelativePath="..\..\..\bin\bbackupd\bbackupd.cpp">
 					</File>
 					<File
-						RelativePath="..\..\..\bin\bbackupd\bbwinservice.cpp">
+						RelativePath="..\..\..\bin\bbackupd\Win32BackupService.cpp">
 					</File>
 					<File
-						RelativePath="..\..\..\bin\bbackupd\ServiceBackupDaemon.cpp">
+						RelativePath="..\..\..\bin\bbackupd\Win32ServiceFunctions.cpp">
 					</File>
+					<File
+						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.cpp">
+					</File>
 				</Filter>
 			</Filter>
 		</Filter>
@@ -182,11 +185,14 @@
 						RelativePath="..\..\..\bin\bbackupd\BackupDaemon.h">
 					</File>
 					<File
-						RelativePath="..\..\..\bin\bbackupd\bbwinservice.h">
+						RelativePath="..\..\..\bin\bbackupd\Win32BackupService.h">
 					</File>
 					<File
-						RelativePath="..\..\..\bin\bbackupd\ServiceBackupDaemon.h">
+						RelativePath="..\..\..\bin\bbackupd\Win32ServiceFunctions.h">
 					</File>
+					<File
+						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.h">
+					</File>
 				</Filter>
 			</Filter>
 		</Filter>

Copied: box/chris/general/infrastructure/msvc/2003/boxbackup.ncb (from rev 483, box/trunk/infrastructure/msvc/2003/boxbackup.ncb)

Modified: box/chris/general/infrastructure/msvc/2003/boxbackup.suo
===================================================================
(Binary files differ)

Modified: box/chris/general/infrastructure/msvc/2003/boxquery.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/boxquery.vcproj	2006-02-21 15:47:08 UTC (rev 483)
+++ box/chris/general/infrastructure/msvc/2003/boxquery.vcproj	2006-02-21 21:16:45 UTC (rev 484)
@@ -24,7 +24,7 @@
 				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
+				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"
@@ -33,7 +33,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\lib\win32\Debug\boost_regex.lib"
+				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
 				OutputFile="$(OutDir)/bbackupquery.exe"
 				LinkIncremental="2"
 				GenerateDebugInformation="TRUE"
@@ -84,7 +84,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\lib\win32\Release\boost_regex.lib"
+				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib"
 				OutputFile="$(OutDir)/bbackupquery.exe"
 				LinkIncremental="1"
 				IgnoreDefaultLibraryNames=""

Modified: box/chris/general/infrastructure/msvc/2003/common.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/common.vcproj	2006-02-21 15:47:08 UTC (rev 483)
+++ box/chris/general/infrastructure/msvc/2003/common.vcproj	2006-02-21 21:16:45 UTC (rev 484)
@@ -23,7 +23,7 @@
 				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
+				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"
@@ -171,9 +171,6 @@
 						RelativePath="..\..\..\lib\common\IOStreamGetLine.cpp">
 					</File>
 					<File
-						RelativePath="..\..\..\lib\common\LinuxWorkaround.cpp">
-					</File>
-					<File
 						RelativePath="..\..\..\lib\common\MemBlockStream.cpp">
 					</File>
 					<File

Modified: box/chris/general/infrastructure/msvc/2003/win32test.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/win32test.vcproj	2006-02-21 15:47:08 UTC (rev 483)
+++ box/chris/general/infrastructure/msvc/2003/win32test.vcproj	2006-02-21 21:16:45 UTC (rev 484)
@@ -23,7 +23,7 @@
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
+				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"
@@ -32,7 +32,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32\Debug\libdb42d.lib"
+				AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
 				OutputFile="$(OutDir)/win32test.exe"
 				LinkIncremental="2"
 				GenerateDebugInformation="TRUE"
@@ -126,7 +126,7 @@
 				RelativePath="..\..\..\lib\win32\emu.cpp">
 			</File>
 			<File
-				RelativePath="..\..\..\lib\win32\win32test.cpp">
+				RelativePath="..\..\..\test\win32\testlibwin32.cpp">
 			</File>
 		</Filter>
 		<Filter

Modified: box/chris/general/lib/common/BoxPlatform.h
===================================================================
--- box/chris/general/lib/common/BoxPlatform.h	2006-02-21 15:47:08 UTC (rev 483)
+++ box/chris/general/lib/common/BoxPlatform.h	2006-02-21 21:16:45 UTC (rev 484)
@@ -46,6 +46,12 @@
 	#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
 #endif
 
+// Disable memory testing under Darwin, it just doesn't like it very much.
+#ifdef __APPLE__
+	// TODO: We really should get some decent leak detection code.
+	#define PLATFORM_DISABLE_MEM_LEAK_TESTING
+#endif
+
 // Find out if credentials on UNIX sockets can be obtained
 #ifndef HAVE_GETPEEREID
 	#if !HAVE_DECL_SO_PEERCRED


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 21:22:06 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 21 Feb 2006 21:22:06 +0000 (GMT)
Subject: [Box Backup-dev] Errors with trunk client (Win32)
In-Reply-To: <43FB7785.8010104@hostingbrothers.nl>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>
 <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com>

Hi Roy,

>>  This version is compiled with VS2003 from the trunk source of Sunday.
>>  bbackupd was running (not in service mode, but just in a Dos-box), so I
>>  could see what was happening.
>>  The backup mode was snapshot, so I had to use the bbackupctl command to
>>  issue a sync command to bbackupd. As soon as I issue that command the
>>  error appears. The errors (very very many flashing down the screen, all
>>  the same) are seen in the bbackupd window and when I kill that process
>>  bbackupctl repeats that error one time.
>> 
>>  I hope this is all information needed.

Sorry, I still can't reproduce it with the current trunk built with VS2005 
(I don't have VS2003). However, the code in WinNamedPipeStream has changed 
a lot (hopefully for the better) in my "general" branch. Please could you 
test that with VS2003 and let me know if it fixes the problem?

You can find it at: [http://bbdev.fluffy.co.uk/svn/box/chris/general].

Otherwise, please could you send the complete output of bbackupd, up to 
the point of the first SocketAlreadyOpen exception? And let me know which 
branch you were using, general or trunk.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 22:13:46 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Tue, 21 Feb 2006 23:13:46 +0100
Subject: [Box Backup-dev] Errors with trunk client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com> <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl> <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com>
Message-ID: <43FB909A.3020404@hostingbrothers.nl>

Chris Wilson wrote:
> Hi Roy,
>
>>>  This version is compiled with VS2003 from the trunk source of Sunday.
>>>  bbackupd was running (not in service mode, but just in a Dos-box), 
>>> so I
>>>  could see what was happening.
>>>  The backup mode was snapshot, so I had to use the bbackupctl 
>>> command to
>>>  issue a sync command to bbackupd. As soon as I issue that command the
>>>  error appears. The errors (very very many flashing down the screen, 
>>> all
>>>  the same) are seen in the bbackupd window and when I kill that process
>>>  bbackupctl repeats that error one time.
>>>
>>>  I hope this is all information needed.
>
> Sorry, I still can't reproduce it with the current trunk built with 
> VS2005 (I don't have VS2003). However, the code in WinNamedPipeStream 
> has changed a lot (hopefully for the better) in my "general" branch. 
> Please could you test that with VS2003 and let me know if it fixes the 
> problem?
>
> You can find it at: [http://bbdev.fluffy.co.uk/svn/box/chris/general].
>
> Otherwise, please could you send the complete output of bbackupd, up 
> to the point of the first SocketAlreadyOpen exception? And let me know 
> which branch you were using, general or trunk.
>
> Cheers, Chris.

I'm now compiling from that source....

I only get one error and that's this one:
TRACE: Exception thrown: ServerException(SocketAlreadyOpen) at 
d:\backup\box\box
backup\lib\win32\winnamedpipestream.cpp(75)

Repeated all the time. Even when I kill the backupctl sync command.

Gr.
Roy

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 22:45:41 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 21 Feb 2006 22:45:41 +0000 (GMT)
Subject: [Box Backup-dev] Errors with trunk client (Win32)
In-Reply-To: <43FB909A.3020404@hostingbrothers.nl>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>
 <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com>

Hi Roy,

>>  Otherwise, please could you send the complete output of bbackupd, up 
>>  to the point of the first SocketAlreadyOpen exception? And let me know 
>>  which branch you were using, general or trunk.
>
> I only get one error and that's this one: TRACE: Exception thrown: 
> ServerException(SocketAlreadyOpen) at d:\backup\box\box 
> backup\lib\win32\winnamedpipestream.cpp(75)
>
> Repeated all the time. Even when I kill the backupctl sync command.

It would be really useful to see the complete output from bbackupd so that 
I can tell what state it was in when this happened. It's also possible 
that some previous error was reported which isn't obviously an error from 
looking at the message.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 21 22:58:30 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Tue, 21 Feb 2006 23:58:30 +0100
Subject: [Box Backup-dev] Errors with trunk client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com> <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl> <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl> <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com>
Message-ID: <43FB9B16.2050305@hostingbrothers.nl>

Chris Wilson wrote:
> Hi Roy,
>
>>>  Otherwise, please could you send the complete output of bbackupd, 
>>> up  to the point of the first SocketAlreadyOpen exception? And let 
>>> me know  which branch you were using, general or trunk.
>>
>> I only get one error and that's this one: TRACE: Exception thrown: 
>> ServerException(SocketAlreadyOpen) at d:\backup\box\box 
>> backup\lib\win32\winnamedpipestream.cpp(75)
>>
>> Repeated all the time. Even when I kill the backupctl sync command.
>
> It would be really useful to see the complete output from bbackupd so 
> that I can tell what state it was in when this happened. It's also 
> possible that some previous error was reported which isn't obviously 
> an error from looking at the message.
>
> Cheers, Chris.
The first errors I can't see, because there are so many, so fast. But in 
the eventvwr I can see them, so I will paste them below:
First one, when starting bbackupd:
*INFO:* Kan beschrijving voor gebeurtenis-ID (4) in bron (bbackupd) niet 
vinden. De lokale computer beschikt wellicht niet over de benodigde 
registergegevens of DLL-berichtbestanden om berichten van een externe 
computer te kunnen weergeven. U kunt mogelijk de schakeloptie 
/AUXSOURCE= gebruiken om deze beschrijving op te halen, zie Help en 
ondersteuning voor details. De volgende gegevens zijn deel van de 
gebeurtenis: Starting daemon (config: C:\Program Files\Box 
Backup\bbackupd.conf) (version 0.09hWin32).

Mind you, the first part is dutch. It can't get the description for 
event id 4 in source (bbackupd).

*INFO: *TRACE: Set maximum diffing time to 20 seconds.
*INFO: *Connection from command socket.
*INFO: *TRACE: Exception thrown: 
ConnectionException(Conn_SocketReadError) at 
d:\backup\box\boxbackup\lib\win32\winnamedpipestream.cpp(180).
*ERROR: *Communication error with control client: Connection 
SocketReadError.
*INFO: *TRACE: Exception thrown: ServerException(SocketAlreadyOpen) at 
d:\backup\box\boxbackup\lib\win32\winnamedpipestream.cpp(75).

The last two are repeated all the time.

Can't tell you yet what will happen with the new compiled version. I 
will try it now.

Greets,
Roy

From boxbackup-dev@fluffy.co.uk  Tue Feb 21 23:30:38 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Wed, 22 Feb 2006 00:30:38 +0100
Subject: [Box Backup-dev] Errors with trunk client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com> <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl> <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl> <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com>
Message-ID: <43FBA29E.3090906@hostingbrothers.nl>

Chris Wilson wrote:
> Hi Roy,
>
>>>  Otherwise, please could you send the complete output of bbackupd, 
>>> up  to the point of the first SocketAlreadyOpen exception? And let 
>>> me know  which branch you were using, general or trunk.
>>
>> I only get one error and that's this one: TRACE: Exception thrown: 
>> ServerException(SocketAlreadyOpen) at d:\backup\box\box 
>> backup\lib\win32\winnamedpipestream.cpp(75)
>>
>> Repeated all the time. Even when I kill the backupctl sync command.
>
> It would be really useful to see the complete output from bbackupd so 
> that I can tell what state it was in when this happened. It's also 
> possible that some previous error was reported which isn't obviously 
> an error from looking at the message.
>
> Cheers, Chris.
With the new version compiled from your sources, I don't have those 
errors thrown at me, but I still think there is something wrong.
When I start bbackupd:
INFO: Starting daemon (config: C:\Program Files\Box 
Backup\bbackupd.conf) (version 0.09hWin32).
INFO: TRACE: Set maximum diffing time to 20 seconds.

When I run bbackupquery, it shows the output pasted below in the Dos box:
C:\Program Files\Box Backup\bbackupd>bbackupquery.exe
Box Backup Query Tool v0.09hWin32, (c) Ben Summers and contributors 
2003-2006
Using configuration file C:\Program Files\Box Backup\bbackupd.conf
No random device -- additional seeding of random number generator not 
performed.

Connecting to store...
Handshake with store...
Login to store...
Login complete.

Type "help" for a list of commands.

query > Failed to read from console: error 8
Exception: Common OSFileError (1/9)

The server spits this at me...
Feb 22 00:25:21 localhost bbstored[11801]: Incoming connection from 
192.168.5.5 port 4378 (handling in child 12127)
Feb 22 00:25:21 localhost bbstored[12127]: Certificate CN: BACKUP-ACCOUNT#
Feb 22 00:25:21 localhost bbstored[12127]: Receive Version(0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Receive Version(0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Send Version(0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Send Version(0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Receive Login(0xACCOUNT#,0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Receive Login(0xACCOUNT#,0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Login: Client ID ACCOUNT#, 
Read-only
Feb 22 00:25:21 localhost bbstored[12127]: Send 
LoginConfirmed(0x0,0x1,0x100000,0x200000)
Feb 22 00:25:21 localhost bbstored[12127]: Send 
LoginConfirmed(0x0,0x1,0x100000,0x200000)
Feb 22 00:25:21 localhost bbstored[12127]: Connection statistics for 
BACKUP-ACCOUNT#: IN=60 OUT=84 TOTAL=144
Feb 22 00:25:21 localhost bbstored[12127]: in server child, exception 
Connection TLSReadFailed (Probably a network issue between client and 
server.) (7/34) -- terminating child

When I start bbackupctl sync, there are no errors but only this info 
message in the eventvwr:
Connection from command socket.

After that notting...no connecting made to the server, and no activity.

Hope this clears things up ;-)

Gr.
Roy

From boxbackup-dev@fluffy.co.uk  Wed Feb 22 05:33:24 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 21:33:24 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FB69A1.5070704@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk> <43FB5A00.4010108@reedtz.com> <43FB5EDA.8050105@reedtz.com> <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk> <43FB69A1.5070704@reedtz.com>
Message-ID: <43FBF7A4.7020102@reedtz.com>

On 2/21/06 11:27 AM, Per Thomsen wrote:
> On 2/21/06 10:48 AM, Ben Summers wrote:
>   
>> On 21 Feb 2006, at 18:41, Per Thomsen wrote:
>>     
>>> When run individually, backupstorepatch passed (problem appeared to be a
>>> non-dying bbstored from a previous test).
>>>
>>>
>>> The bbackupd test, when run exits at this point in the test:
>>>
>>> [ 0 (of 0) differences probably due to file modifications after the last
>>> upload ]
>>> Differences: 0 (0 dirs excluded, 0 files excluded)
>>> ..
>>> Add files with current time
>>> --------
>>> bbackupd: Add files with current time
>>>
>>>
>>> I can't find a core file anywhere. I am re-running the test now.
>>>       
> Here are the results (same as with HAVE_KQUEUE):
>
> : {240} grep -A 3 -B 3 FAIL debug-bbackupd-2.out
> [ 11 (of 12) differences probably due to file modifications after the
> last upload ]
> Differences: 12 (3 dirs excluded, 4 files excluded)
>
> FAILURE: Condition [compareReturnValue == 1*256] failed at
> testbbackupd.cpp(837)
> Rename directory
> waiting: ............Local file 'testfiles/TestDir1/apropos' exists, but
> store file '/Test1/apropos' does not exist.
> (the file above was modified after the last sync time -- might be reason
> for difference)
> --
> [ 5 (of 10) differences probably due to file modifications after the
> last upload ]
> Differences: 10 (3 dirs excluded, 4 files excluded)
>
> FAILURE: Condition [compareReturnValue == 1*256] failed at
> testbbackupd.cpp(845)
> FAILURE: Condition [compareReturnValue == 1*256] failed at
> testbbackupd.cpp(849)
> Rename files
> waiting: ............Local file 'testfiles/TestDir1/continousupdate'
> does not exist, but store file '/Test1/continousupdate' does.
> Local file 'testfiles/TestDir1/df324' does not exist, but store file
> '/Test1/df324' does.
> --
> [ 9 (of 16) differences probably due to file modifications after the
> last upload ]
> Differences: 16 (3 dirs excluded, 4 files excluded)
>
> FAILURE: Condition [compareReturnValue == 1*256] failed at
> testbbackupd.cpp(859)
> Create a file with timestamp to way ahead in the future
> waiting: ............
> [ 0 (of 0) differences probably due to file modifications after the last
> upload ]
> --
> 00000052 -d---- 1970-01-01T00:00:00 0000000000000000
> Test1/renamed-dir/dsfsfdslkjfkdsjf
> 00000053 f----- 2006-02-21T11:23:27 6c56ee3b9bb9e1e8 Test1/fileaftermarker
>
> FAILED: 4 tests failed
> --------
> bbackupd: FAILED: 4 tests failed
>
>   
The bbackupquery return code is 512, and not 256, in every failure. I
will debug this, but is there a key to the return codes?

I ran the bbackupd tests in release mode, just for laughs, and all tests
pass, and the return code from bbackupquery is 256 in the tests that
failed in debug mode.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Wed Feb 22 06:56:43 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 22 Feb 2006 06:56:43 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FBF7A4.7020102@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk> <43FB5A00.4010108@reedtz.com> <43FB5EDA.8050105@reedtz.com> <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk> <43FB69A1.5070704@reedtz.com> <43FBF7A4.7020102@reedtz.com>
Message-ID: <0CE6F814-EC4F-4507-BC8D-35A52AD1E597@fluffy.co.uk>

On 22 Feb 2006, at 05:33, Per Thomsen wrote:

> On 2/21/06 11:27 AM, Per Thomsen wrote:
>> On 2/21/06 10:48 AM, Ben Summers wrote:
>>
>>> On 21 Feb 2006, at 18:41, Per Thomsen wrote:
>>>
>>>> When run individually, backupstorepatch passed (problem appeared  
>>>> to be a
>>>> non-dying bbstored from a previous test).
>>>>
>>>>
>>>> The bbackupd test, when run exits at this point in the test:
>>>>
>>>> [ 0 (of 0) differences probably due to file modifications after  
>>>> the last
>>>> upload ]
>>>> Differences: 0 (0 dirs excluded, 0 files excluded)
>>>> ..
>>>> Add files with current time
>>>> --------
>>>> bbackupd: Add files with current time
>>>>
>>>>
>>>> I can't find a core file anywhere. I am re-running the test now.
>>>>
>> Here are the results (same as with HAVE_KQUEUE):
>>
>> : {240} grep -A 3 -B 3 FAIL debug-bbackupd-2.out
>> [ 11 (of 12) differences probably due to file modifications after the
>> last upload ]
>> Differences: 12 (3 dirs excluded, 4 files excluded)
>>
>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>> testbbackupd.cpp(837)
>> Rename directory
>> waiting: ............Local file 'testfiles/TestDir1/apropos'  
>> exists, but
>> store file '/Test1/apropos' does not exist.
>> (the file above was modified after the last sync time -- might be  
>> reason
>> for difference)
>> --
>> [ 5 (of 10) differences probably due to file modifications after the
>> last upload ]
>> Differences: 10 (3 dirs excluded, 4 files excluded)
>>
>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>> testbbackupd.cpp(845)
>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>> testbbackupd.cpp(849)
>> Rename files
>> waiting: ............Local file 'testfiles/TestDir1/continousupdate'
>> does not exist, but store file '/Test1/continousupdate' does.
>> Local file 'testfiles/TestDir1/df324' does not exist, but store file
>> '/Test1/df324' does.
>> --
>> [ 9 (of 16) differences probably due to file modifications after the
>> last upload ]
>> Differences: 16 (3 dirs excluded, 4 files excluded)
>>
>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>> testbbackupd.cpp(859)
>> Create a file with timestamp to way ahead in the future
>> waiting: ............
>> [ 0 (of 0) differences probably due to file modifications after  
>> the last
>> upload ]
>> --
>> 00000052 -d---- 1970-01-01T00:00:00 0000000000000000
>> Test1/renamed-dir/dsfsfdslkjfkdsjf
>> 00000053 f----- 2006-02-21T11:23:27 6c56ee3b9bb9e1e8 Test1/ 
>> fileaftermarker
>>
>> FAILED: 4 tests failed
>> --------
>> bbackupd: FAILED: 4 tests failed
>>
>>
> The bbackupquery return code is 512, and not 256, in every failure. I
> will debug this, but is there a key to the return codes?


In bbackupquery, type "help compare", which includes:

	If -c is set, then the return code (if quit is the next command)  
will be
		1	Comparison was exact
		2	Differences were found
		3	An error occured
	This can be used for automated tests.

Not the obvious location for the info!

>
> I ran the bbackupd tests in release mode, just for laughs, and all  
> tests
> pass, and the return code from bbackupquery is 256 in the tests that
> failed in debug mode.

I'm wondering if it's just a timing issue. There isn't enough context  
in your listing to tell, though, as you miss out the bit which says  
what it was doing at the time.

Ben





From boxbackup-dev@fluffy.co.uk  Wed Feb 22 07:14:18 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Tue, 21 Feb 2006 23:14:18 -0800
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <0CE6F814-EC4F-4507-BC8D-35A52AD1E597@fluffy.co.uk>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk> <43FB5A00.4010108@reedtz.com> <43FB5EDA.8050105@reedtz.com> <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk> <43FB69A1.5070704@reedtz.com> <43FBF7A4.7020102@reedtz.com> <0CE6F814-EC4F-4507-BC8D-35A52AD1E597@fluffy.co.uk>
Message-ID: <43FC0F4A.9030703@reedtz.com>

This is a multi-part message in MIME format.
--------------050601090302060702050705
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 2/21/06 10:56 PM, Ben Summers wrote:
>
> On 22 Feb 2006, at 05:33, Per Thomsen wrote:
>
>> On 2/21/06 11:27 AM, Per Thomsen wrote:
>>> On 2/21/06 10:48 AM, Ben Summers wrote:
>>>
>>>> On 21 Feb 2006, at 18:41, Per Thomsen wrote:
>>>>
>>>>> When run individually, backupstorepatch passed (problem appeared
>>>>> to be a
>>>>> non-dying bbstored from a previous test).
>>>>>
>>>>>
>>>>> The bbackupd test, when run exits at this point in the test:
>>>>>
>>>>> [ 0 (of 0) differences probably due to file modifications after
>>>>> the last
>>>>> upload ]
>>>>> Differences: 0 (0 dirs excluded, 0 files excluded)
>>>>> ..
>>>>> Add files with current time
>>>>> --------
>>>>> bbackupd: Add files with current time
>>>>>
>>>>>
>>>>> I can't find a core file anywhere. I am re-running the test now.
>>>>>
>>> Here are the results (same as with HAVE_KQUEUE):
>>>
>>> : {240} grep -A 3 -B 3 FAIL debug-bbackupd-2.out
>>> [ 11 (of 12) differences probably due to file modifications after the
>>> last upload ]
>>> Differences: 12 (3 dirs excluded, 4 files excluded)
>>>
>>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>>> testbbackupd.cpp(837)
>>> Rename directory
>>> waiting: ............Local file 'testfiles/TestDir1/apropos' exists,
>>> but
>>> store file '/Test1/apropos' does not exist.
>>> (the file above was modified after the last sync time -- might be
>>> reason
>>> for difference)
>>> -- 
>>> [ 5 (of 10) differences probably due to file modifications after the
>>> last upload ]
>>> Differences: 10 (3 dirs excluded, 4 files excluded)
>>>
>>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>>> testbbackupd.cpp(845)
>>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>>> testbbackupd.cpp(849)
>>> Rename files
>>> waiting: ............Local file 'testfiles/TestDir1/continousupdate'
>>> does not exist, but store file '/Test1/continousupdate' does.
>>> Local file 'testfiles/TestDir1/df324' does not exist, but store file
>>> '/Test1/df324' does.
>>> -- 
>>> [ 9 (of 16) differences probably due to file modifications after the
>>> last upload ]
>>> Differences: 16 (3 dirs excluded, 4 files excluded)
>>>
>>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>>> testbbackupd.cpp(859)
>>> Create a file with timestamp to way ahead in the future
>>> waiting: ............
>>> [ 0 (of 0) differences probably due to file modifications after the
>>> last
>>> upload ]
>>> -- 
>>> 00000052 -d---- 1970-01-01T00:00:00 0000000000000000
>>> Test1/renamed-dir/dsfsfdslkjfkdsjf
>>> 00000053 f----- 2006-02-21T11:23:27 6c56ee3b9bb9e1e8
>>> Test1/fileaftermarker
>>>
>>> FAILED: 4 tests failed
>>> --------
>>> bbackupd: FAILED: 4 tests failed
>>>
>>>
>> The bbackupquery return code is 512, and not 256, in every failure. I
>> will debug this, but is there a key to the return codes?
>
>
> In bbackupquery, type "help compare", which includes:
>
>     If -c is set, then the return code (if quit is the next command)
> will be
>         1    Comparison was exact
>         2    Differences were found
>         3    An error occured
>     This can be used for automated tests.
>
> Not the obvious location for the info!
>
>>
>> I ran the bbackupd tests in release mode, just for laughs, and all tests
>> pass, and the return code from bbackupquery is 256 in the tests that
>> failed in debug mode.
>
> I'm wondering if it's just a timing issue. There isn't enough context
> in your listing to tell, though, as you miss out the bit which says
> what it was doing at the time.
The first failing debug test in bbackupd is "Add files with current
time",  then "Rename directory" (2 FAILUREs), and finally "Rename
files". I have attached the output.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


--------------050601090302060702050705
Content-Type: application/x-gzip; x-mac-type="0"; x-mac-creator="0";
 name="debug-bbackupd-3.out.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="debug-bbackupd-3.out.gz"

[encoded data, 5110 characters]
2kL5f8sSEf8gZAAA
--------------050601090302060702050705--

From boxbackup-dev@fluffy.co.uk  Wed Feb 22 14:27:48 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 22 Feb 2006 14:27:48 +0000
Subject: [Box Backup-dev] Documentation updates for 0.10
Message-ID: <20060222142748.t9kl1h16o0gc88wo@ebourne.me.uk>

Is there any plan on how we update documentation for 0.10?

On the main website (how?) or wiki?

I mentioned this before, but I think it got lost in the noise.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Wed Feb 22 14:44:32 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 22 Feb 2006 14:44:32 +0000
Subject: [Box Backup-dev] Documentation updates for 0.10
In-Reply-To: <20060222142748.t9kl1h16o0gc88wo@ebourne.me.uk>
References: <20060222142748.t9kl1h16o0gc88wo@ebourne.me.uk>
Message-ID: <7FAA6E51-7200-4CEA-B95B-3C74926F767C@fluffy.co.uk>

On 22 Feb 2006, at 14:27, Martin Ebourne wrote:

> Is there any plan on how we update documentation for 0.10?
>
> On the main website (how?) or wiki?
>
> I mentioned this before, but I think it got lost in the noise.

Do you have any recommendations? The current web site is a bit  
rubbish, and the "one long home page" style is so last century.

The wiki is all very well and good, and is a wonderful tool for the  
project, but I think we need to have an "authoritative" source for  
documentation which can't be killed by spambots.

Perhaps we could edit on the wiki, then pull it into SVN somehow, and  
then check that out onto the web site? Doesn't sound too much fun  
though.

Ben




From boxbackup-dev@fluffy.co.uk  Wed Feb 22 15:01:18 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Wed, 22 Feb 2006 15:01:18 +0000
Subject: [Box Backup-dev] Documentation updates for 0.10
In-Reply-To: <7FAA6E51-7200-4CEA-B95B-3C74926F767C@fluffy.co.uk>
References: <20060222142748.t9kl1h16o0gc88wo@ebourne.me.uk>
 <7FAA6E51-7200-4CEA-B95B-3C74926F767C@fluffy.co.uk>
Message-ID: <20060222150118.qiexmgax44wg0c8g@ebourne.me.uk>

Ben Summers <ben@fluffy.co.uk> wrote:
> Do you have any recommendations? The current web site is a bit  
> rubbish, and the "one long home page" style is so last century.
>
> The wiki is all very well and good, and is a wonderful tool for the  
> project, but I think we need to have an "authoritative" source for  
> documentation which can't be killed by spambots.
>
> Perhaps we could edit on the wiki, then pull it into SVN somehow, and 
>  then check that out onto the web site? Doesn't sound too much fun  
> though.

I personally would suggest:

- Official project documentation (installation guide/user manual) as 
part of the box distribution, in svn with the source.
- This could be in any of a number of source formats, don't really care 
what myself. Docbook seems to be popular at the moment I guess. Or even 
just wikitext.
- Generate html from this for the official web site
- Generate html/text for the distribution
- Maybe even man pages (wahey!)

Use the wiki for all other ancillary and/or volatile documentation.

I feel the main documentation should be in svn to gain the benefits of 
version control and the documentation matching the code. That way we 
could update the documenation for new features as we go a lot easier. 
And people could install it without being online.

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Wed Feb 22 17:29:08 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Wed, 22 Feb 2006 18:29:08 +0100
Subject: [Box Backup-dev] Errors with client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com> <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl> <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl> <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com>
Message-ID: <43FC9F64.5050208@hostingbrothers.nl>

With the new version compiled (with VS2003) from Chris' sources, I can't 
backup. I don't know what exactly is going wrong. Are the certificates 
wrong? Or is there something else wrong?

When I start bbackupd:
INFO: Starting daemon (config: C:\Program Files\Box
Backup\bbackupd.conf) (version 0.09hWin32).
INFO: TRACE: Set maximum diffing time to 20 seconds.

When I run bbackupquery, it shows the output pasted below in the Dos box:
C:\Program Files\Box Backup\bbackupd>bbackupquery.exe
Box Backup Query Tool v0.09hWin32, (c) Ben Summers and contributors
2003-2006
Using configuration file C:\Program Files\Box Backup\bbackupd.conf
No random device -- additional seeding of random number generator not
performed.

Connecting to store...
Handshake with store...
Login to store...
Login complete.

Type "help" for a list of commands.

query > Failed to read from console: error 8
Exception: Common OSFileError (1/9)

The server spits this at me...
Feb 22 00:25:21 localhost bbstored[11801]: Incoming connection from
192.168.5.5 port 4378 (handling in child 12127)
Feb 22 00:25:21 localhost bbstored[12127]: Certificate CN: BACKUP-ACCOUNT#
Feb 22 00:25:21 localhost bbstored[12127]: Receive Version(0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Receive Version(0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Send Version(0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Send Version(0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Receive Login(0xACCOUNT#,0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Receive Login(0xACCOUNT#,0x1)
Feb 22 00:25:21 localhost bbstored[12127]: Login: Client ID ACCOUNT#,
Read-only
Feb 22 00:25:21 localhost bbstored[12127]: Send
LoginConfirmed(0x0,0x1,0x100000,0x200000)
Feb 22 00:25:21 localhost bbstored[12127]: Send
LoginConfirmed(0x0,0x1,0x100000,0x200000)
Feb 22 00:25:21 localhost bbstored[12127]: Connection statistics for
BACKUP-ACCOUNT#: IN=60 OUT=84 TOTAL=144
Feb 22 00:25:21 localhost bbstored[12127]: in server child, exception
Connection TLSReadFailed (Probably a network issue between client and
server.) (7/34) -- terminating child

When I start bbackupctl sync, there are no errors but only this info
message in the eventvwr:
Connection from command socket.

After that notting...no connecting made to the server, and no activity.

Hope this clears things up ;-)

Gr.
Roy
_______________________________________________
Boxbackup-dev mailing list
Boxbackup-dev@fluffy.co.uk
http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev

From boxbackup-dev@fluffy.co.uk  Wed Feb 22 21:30:22 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Wed, 22 Feb 2006 21:30:22 +0000 (GMT)
Subject: [Box Backup-dev] Errors with client (Win32)
In-Reply-To: <43FC9F64.5050208@hostingbrothers.nl>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>
 <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com> <43FC9F64.5050208@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602222126500.14656@top.qwarx.com>

Hi Roy,

> With the new version compiled (with VS2003) from Chris' sources, I can't 
> backup. I don't know what exactly is going wrong. Are the certificates 
> wrong? Or is there something else wrong?
>
> When I start bbackupd:
> INFO: Starting daemon (config: C:\Program Files\Box
> Backup\bbackupd.conf) (version 0.09hWin32).
> INFO: TRACE: Set maximum diffing time to 20 seconds.

Are you still using manual sync? Could you try with automatic sync? It's 
most likely that bbackupd is broken, rather than bbackupd.

Please could you check whether this also happens with the trunk version? 
I'm pretty sure that, when compiled with VS2005 on my test machine, it is 
actually backing up fine.

Would it be possible for you to try downloading VS2005 express and 
compiling with that? It is free and should hopefully work.

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 |


From boxbackup-dev@fluffy.co.uk  Wed Feb 22 21:37:24 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Wed, 22 Feb 2006 21:37:24 +0000 (GMT)
Subject: [Box Backup-dev] Errors with client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602222126500.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>
 <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com> <43FC9F64.5050208@hostingbrothers.nl>
 <Pine.LNX.4.62.0602222126500.14656@top.qwarx.com>
Message-ID: <Pine.LNX.4.62.0602222136510.14656@top.qwarx.com>

Hi Roy,

On Wed, 22 Feb 2006, Chris Wilson wrote:

> Are you still using manual sync? Could you try with automatic sync? It's 
> most likely that bbackupd is broken, rather than bbackupd.

I meant that it's most likely that bbackupctl is broken, rather than 
bbackupd. Sorry for any confusion.

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 |


From boxbackup-dev@fluffy.co.uk  Wed Feb 22 22:31:29 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Wed, 22 Feb 2006 23:31:29 +0100
Subject: [Box Backup-dev] Errors with client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602222136510.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com> <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl> <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl> <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com> <43FC9F64.5050208@hostingbrothers.nl> <Pine.LNX.4.62.0602222126500.14656@top.qwarx.com> <Pine.LNX.4.62.0602222136510.14656@top.qwarx.com>
Message-ID: <43FCE641.2070603@hostingbrothers.nl>

Chris Wilson wrote:
> Hi Roy,
>
> On Wed, 22 Feb 2006, Chris Wilson wrote:
>
>> Are you still using manual sync? Could you try with automatic sync? 
>> It's most likely that bbackupd is broken, rather than bbackupd.
>
> I meant that it's most likely that bbackupctl is broken, rather than 
> bbackupd. Sorry for any confusion.
>
> Cheers, Chris.
Hi Chris,

Thank you for you help. You're right, bbackupctl is broken. If I use it 
in lazy mode, bbackupd will run just fine. If I compile it in VS2005, 
will bbackupctl run just fine then?

Thanks!

Roy

From boxbackup-dev@fluffy.co.uk  Wed Feb 22 22:59:41 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Wed, 22 Feb 2006 23:59:41 +0100
Subject: [Box Backup-dev] NotifyScript on Windows?
Message-ID: <43FCECDD.3050402@hostingbrothers.nl>

Hi all,

Is there a way to use the notification script on Windows XP, just like 
there is on Linux?
/NotifyScript = /dir/NotifySysadmin.sh

/Is there some util, that does the same thing like that shell script?

Gr,

Roy




From boxbackup-dev@fluffy.co.uk  Wed Feb 22 23:06:00 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Wed, 22 Feb 2006 23:06:00 +0000
Subject: [Box Backup-dev] NetBSD patches?
Message-ID: <E12EA423-4AE1-45C5-BACD-D337EBE46113@fluffy.co.uk>

What's happening with NetBSD support?

I think the test failures Per reported are not ideal but OK, because  
it sorts itself out shortly afterwards. In the end, everything gets  
backed up. So that support is worth having.

The clock's ticking!  :-)

Ben





From boxbackup-dev@fluffy.co.uk  Wed Feb 22 23:19:49 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Wed, 22 Feb 2006 15:19:49 -0800
Subject: [Box Backup-dev] NetBSD patches?
In-Reply-To: <E12EA423-4AE1-45C5-BACD-D337EBE46113@fluffy.co.uk>
References: <E12EA423-4AE1-45C5-BACD-D337EBE46113@fluffy.co.uk>
Message-ID: <43FCF195.5070209@reedtz.com>

On 2/22/06 3:06 PM, Ben Summers wrote:
>
> What's happening with NetBSD support?
>
> I think the test failures Per reported are not ideal but OK, because
> it sorts itself out shortly afterwards. In the end, everything gets
> backed up. So that support is worth having.
>
> The clock's ticking!  :-)
I'm sorry. I have been busy for the last day or so.

Missing items:

    * disabling of HAVE_KQUEUE on NetBSD 2.0.2? I saw no difference in
      the test results on 3.0 with or without it. Or should it be for
      all NetBSDs?
    * The EV_SET cast issues. I'll test doing it in a different way, to
      avoid having boat-loads of ifdefs, for every EV_SET call. Maybe a
      macro of some kind. I know you were concerned about 64-bit
      safeness as well, with the current patch casting to an int.

I'm unsure of how to put the HAVE_KQUEUE stuff into configure.ac.  Any
help with that would be appreciated.

I sent all the other patches I made to the dev-list a few days ago, and
Martin said he'd commit the statvfs stuff.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Wed Feb 22 23:37:14 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Wed, 22 Feb 2006 23:37:14 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r485 - box/chris/general/bin/bbackupd
Message-ID: <20060222233714.5AFBE95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-22 23:37:11 +0000 (Wed, 22 Feb 2006)
New Revision: 485

Modified:
   box/chris/general/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- Make sure that if the backup fails by throwing an exception, after the
  store info object file is deleted and before it's recreated, we don't
  try to delete it again, since we won't be able to and subsequent backups
  will not work.


Modified: box/chris/general/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-21 21:16:45 UTC (rev 484)
+++ box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-22 23:37:11 UTC (rev 485)
@@ -692,6 +692,11 @@
 					"continue safely.");
 				continue;
 			}
+
+			// In case the backup throws an exception,
+			// we should not try to delete the store info
+			// object file again.
+			deserialised = false;
 			
 			// Do sync
 			bool errorOccurred = false;
@@ -802,6 +807,9 @@
 
 				// We had a successful backup, save the store info
 				SerializeStoreObjectInfo(clientStoreMarker, lastSyncTime, nextSyncTime);
+				// Next time around, make sure we delete
+				// the store info object file.
+				deserialised = true;
 
 				// --------------------------------------------------------------------------------------------
 			}


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 00:09:51 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 23 Feb 2006 00:09:51 +0000 (GMT)
Subject: [Box Backup-dev] Errors with client (Win32)
In-Reply-To: <43FCE641.2070603@hostingbrothers.nl>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>
 <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com> <43FC9F64.5050208@hostingbrothers.nl>
 <Pine.LNX.4.62.0602222126500.14656@top.qwarx.com>
 <Pine.LNX.4.62.0602222136510.14656@top.qwarx.com> <43FCE641.2070603@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602230006410.14656@top.qwarx.com>

Hi Roy,

> Thank you for you help. You're right, bbackupctl is broken. If I use it 
> in lazy mode, bbackupd will run just fine. If I compile it in VS2005, 
> will bbackupctl run just fine then?

I can't promise it, but it works fine for me, with both versions (trunk 
and mine). If not, or even if it does, then your help in fixing it would 
be greatly appreciated.

To start with, you could run bbackupd under the Visual Studio debugger 
(either version), and break into the process at the point where it's hung 
(after sending the sync command), and tell me what the stack trace says.

Thanks again for your help!

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 |


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 01:24:58 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Wed, 22 Feb 2006 17:24:58 -0800
Subject: [Box Backup-dev] NetBSD patches?
In-Reply-To: <43FCF195.5070209@reedtz.com>
References: <E12EA423-4AE1-45C5-BACD-D337EBE46113@fluffy.co.uk> <43FCF195.5070209@reedtz.com>
Message-ID: <43FD0EEA.8030809@reedtz.com>

On 2/22/06 3:19 PM, Per Thomsen wrote:
> On 2/22/06 3:06 PM, Ben Summers wrote:
>   
>> What's happening with NetBSD support?
>>
>> I think the test failures Per reported are not ideal but OK, because
>> it sorts itself out shortly afterwards. In the end, everything gets
>> backed up. So that support is worth having.
>>
>> The clock's ticking!  :-)
>>     
> I'm sorry. I have been busy for the last day or so.
>
> Missing items:
>
>     * disabling of HAVE_KQUEUE on NetBSD 2.0.2? I saw no difference in
>       the test results on 3.0 with or without it. Or should it be for
>       all NetBSDs?
>     * The EV_SET cast issues. I'll test doing it in a different way, to
>       avoid having boat-loads of ifdefs, for every EV_SET call. Maybe a
>       macro of some kind. I know you were concerned about 64-bit
>       safeness as well, with the current patch casting to an int.
>   
[red in the face] I realize now, that if HAVE_KQUEUE is disabled for
NetBSD, these casting issues will 'go away'. Sorry...

So the only thing left is for me to work out how to undef HAVE_KQUEUE in
configure.ac.

When I have that done, I will create a clean patch for trunk (?), and
have that commited. Will have that in a few (8-10) hours.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 01:28:42 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Thu, 23 Feb 2006 01:28:42 +0000
Subject: [Box Backup-dev] NetBSD patches?
In-Reply-To: <43FCF195.5070209@reedtz.com>
References: <E12EA423-4AE1-45C5-BACD-D337EBE46113@fluffy.co.uk>
 <43FCF195.5070209@reedtz.com>
Message-ID: <1140658122.31855.9.camel@avenin.ebourne.me.uk>

On Wed, 2006-02-22 at 15:19 -0800, Per Thomsen wrote:
> Missing items:
> 
>     * disabling of HAVE_KQUEUE on NetBSD 2.0.2? I saw no difference in
>       the test results on 3.0 with or without it. Or should it be for
>       all NetBSDs?
>     * The EV_SET cast issues. I'll test doing it in a different way, to
>       avoid having boat-loads of ifdefs, for every EV_SET call. Maybe a
>       macro of some kind. I know you were concerned about 64-bit
>       safeness as well, with the current patch casting to an int.

The disabling of KQUEUE is the same thing as the EV_SET problems. If you
remove HAVE_KQUEUE then the EV_SET stuff won't be compiled.

Casting a pointer to an int is completely non-portable, and just not an
option for us. Ben's suggestion of indexes into an array is the most
obvious workaround, but too much for now. If we get the disable KQUEUE
in then that is a perfectly acceptable solution.

> I'm unsure of how to put the HAVE_KQUEUE stuff into configure.ac.  Any
> help with that would be appreciated.

I sent an email yesterday (well, the day before technically) with an
example autoconf call to do generic compile tests, and even included a
possible few lines of code to put inside it to finish the kqueue test
off. A cut&paste with a search&replace should do the trick. If you're
still having trouble I can try and code up a patch, but I can't test it
obviously.

> I sent all the other patches I made to the dev-list a few days ago, and
> Martin said he'd commit the statvfs stuff.

Yes, I didn't want to commit that yet because I didn't think netbsd
support was going to make it, so didn't see the point in taking that
risk. I'll do that now, after all, we can always branch from the rev.
back if needed.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 01:32:37 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Thu, 23 Feb 2006 01:32:37 +0000
Subject: [Box Backup-dev] NetBSD patches?
In-Reply-To: <E12EA423-4AE1-45C5-BACD-D337EBE46113@fluffy.co.uk>
References: <E12EA423-4AE1-45C5-BACD-D337EBE46113@fluffy.co.uk>
Message-ID: <1140658357.31855.12.camel@avenin.ebourne.me.uk>

On Wed, 2006-02-22 at 23:06 +0000, Ben Summers wrote:
> What's happening with NetBSD support?
> 
> I think the test failures Per reported are not ideal but OK, because  
> it sorts itself out shortly afterwards. In the end, everything gets  
> backed up. So that support is worth having.

I have to say you're rather upbeat on those! I got the impression that
every bbackupquery compare was coming back with differences found in the
bbackupd test, so I assumed it just wasn't working.

Oh, I guess your point is it worked in release mode, just not debug. A
bit odd that. Wonder if that was repeatable.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 01:37:50 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Thu, 23 Feb 2006 01:37:50 +0000
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <1140396936.23634.1.camel@avenin.ebourne.me.uk>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com>
 <1140396936.23634.1.camel@avenin.ebourne.me.uk>
Message-ID: <1140658670.31855.15.camel@avenin.ebourne.me.uk>

--=-/E/FaWeP88ExV0t5x3o1
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Mon, 2006-02-20 at 00:55 +0000, Martin Ebourne wrote:
> On Sat, 2006-02-18 at 15:19 +0000, Chris Wilson wrote:
> > Hi all,
> > 
> > On Sat, 18 Feb 2006, Chris Wilson wrote:
> > 
> > > If I export LIBS=-ldl first, then it works.
> > 
> > Same on sparc-sun-solaris2.9.
> 
> Can yourself, Gary, and anyone else having any configure problems with
> ssl please try the attached patch.
> 
> You'll need to rerun ./bootstrap after applying (need autoconf installed
> for this).

Has anyone been able to try the second version of the patch I sent out
for this fix? (Reattached here for convenience.)

Cheers,

Martin.

--=-/E/FaWeP88ExV0t5x3o1
Content-Description: 
Content-Disposition: inline; filename=box-ssl-conf.patch
Content-Type: text/x-patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: infrastructure/m4/ax_check_ssl.m4
===================================================================
--- infrastructure/m4/ax_check_ssl.m4	(revision 474)
+++ infrastructure/m4/ax_check_ssl.m4	(working copy)
@@ -27,7 +27,14 @@
 
   ax_check_ssl_found=yes
   AC_CHECK_HEADERS([openssl/ssl.h],, [ax_check_ssl_found=no])
-  AC_CHECK_LIB([ssl], [SSL_read],, [ax_check_ssl_found=no], [-lcrypto])
+  AC_CHECK_LIB([ssl], [SSL_read], [LIBS="-lssl $LIBS"], [
+    unset ac_cv_lib_ssl_SSL_read
+    AC_CHECK_LIB([ssl],
+                 [SSL_read],
+                 [LIBS="-lssl -lcrypto -ldl $LIBS"],
+                 [ax_check_ssl_found=no],
+                 [-lcrypto -ldl])
+    ],)
 
   if test "x$ax_check_ssl_found" = "xyes"; then
     AC_DEFINE([HAVE_SSL], 1, [Define to 1 if SSL is available])
Index: configure.ac
===================================================================
--- configure.ac	(revision 474)
+++ configure.ac	(working copy)
@@ -59,9 +59,9 @@
   [old-ssl],
   [AC_HELP_STRING([--enable-old-ssl],
                   [Allow use of pre-0.9.7 Open SSL - NOT RECOMMENDED, read the documentation])])
-AC_CHECK_LIB(
-  [crypto],
-  [EVP_CipherInit_ex],, [
+AC_SEARCH_LIBS(
+  [EVP_CipherInit_ex],
+  [crypto],, [
   if test "x$enable_old_ssl" = "xyes"; then
     AC_DEFINE([HAVE_OLD_SSL], 1, [Define to 1 if SSL is pre-0.9.7])
   else
@@ -179,7 +179,6 @@
   [static-bin],
   [AC_HELP_STRING([--enable-static-bin], [Link binaries with static libraries])])
 if test "x$enable_static_bin" = "xyes"; then
-  AC_CHECK_LIB([ssl],[SSL_read],,, [crypto])
   LIBS="-Wl,-Bstatic $LIBS -Wl,-Bdynamic"
 fi
 

--=-/E/FaWeP88ExV0t5x3o1--


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 01:56:04 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 01:56:04 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r486 - in box/trunk: bin/bbackupd infrastructure/m4
Message-ID: <20060223015604.55B5E95@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-23 01:56:02 +0000 (Thu, 23 Feb 2006)
New Revision: 486

Modified:
   box/trunk/bin/bbackupd/BackupDaemon.cpp
   box/trunk/infrastructure/m4/ax_check_mount_point.m4
Log:
Patch from Per Thomsen to detect statvfs. This is used by recent versions of NetBSD in preference to statfs.


Modified: box/trunk/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.cpp	2006-02-22 23:37:11 UTC (rev 485)
+++ box/trunk/bin/bbackupd/BackupDaemon.cpp	2006-02-23 01:56:02 UTC (rev 486)
@@ -1170,7 +1170,7 @@
 
 
 
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_NMTONNAME)
 	// string comparison ordering for when mount points are handled
 	// by code, rather than the OS.
 	typedef struct
@@ -1234,7 +1234,7 @@
 	int numIDMaps = 0;
 
 #ifdef HAVE_MOUNTS
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_MNTONNAME)
 	// Linux and others can't tell you where a directory is mounted. So we
 	// have to read the mount entries from /etc/mtab! Bizarre that the OS
 	// itself can't tell you, but there you go.
@@ -1308,7 +1308,7 @@
 		ASSERT(*i == "/");
 	}
 #endif // n NDEBUG
-#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME
+#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME || n HAVE_STRUCT_STATVFS_F_MNTONNAME
 #endif // HAVE_MOUNTS
 
 	// Then... go through each of the entries in the configuration,
@@ -1332,11 +1332,16 @@
 			// Do a fsstat on the pathname to find out which mount it's on
 			{
 
-#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32
+#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined HAVE_STRUCT_STATVFS_F_MNTONNAME || defined WIN32
 
 				// BSD style statfs -- includes mount point, which is nice.
+#ifdef HAVE_STRUCT_STATVFS_F_MNTONNAME
+				struct statvfs s;
+				if(::statvfs(ploc->mPath.c_str(), &s) != 0)
+#else // HAVE_STRUCT_STATVFS_F_MNTONNAME
 				struct statfs s;
 				if(::statfs(ploc->mPath.c_str(), &s) != 0)
+#endif // HAVE_STRUCT_STATVFS_F_MNTONNAME
 				{
 					THROW_EXCEPTION(CommonException, OSFileError)
 				}

Modified: box/trunk/infrastructure/m4/ax_check_mount_point.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_check_mount_point.m4	2006-02-22 23:37:11 UTC (rev 485)
+++ box/trunk/infrastructure/m4/ax_check_mount_point.m4	2006-02-23 01:56:02 UTC (rev 486)
@@ -10,6 +10,7 @@
 dnl HAVE_STRUCT_MNTENT_MNT_DIR
 dnl HAVE_STRUCT_MNTTAB_MNT_MOUNTP
 dnl HAVE_STRUCT_STATFS_F_MNTONNAME
+dnl HAVE_STRUCT_STATVFS_F_MNTONNAME
 dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
 dnl
 dnl @category C
@@ -33,6 +34,13 @@
     #endif
     #include <sys/mount.h>
     ]])
+  # NetBSD
+  AC_CHECK_MEMBERS([struct statvfs.f_mntonname],,, [[
+    #ifdef HAVE_SYS_PARAM_H
+      #include <sys/param.h>
+    #endif
+    #include <sys/mount.h>
+    ]])
   # Linux
   AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])
   # Solaris
@@ -41,6 +49,7 @@
     #include <sys/mnttab.h>
     ]])
   if test "x$ac_cv_member_struct_statfs_f_mntonname" = "xyes" || \
+     test "x$ac_cv_member_struct_statvfs_f_mntonname" = "xyes" || \
      test "x$ac_cv_member_struct_mntent_mnt_dir" = "xyes" || \
      test "x$ac_cv_member_struct_mnttab_mnt_mountp" = "xyes"
   then


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 02:14:20 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Wed, 22 Feb 2006 18:14:20 -0800
Subject: [Box Backup-dev] NetBSD patches?
In-Reply-To: <1140658357.31855.12.camel@avenin.ebourne.me.uk>
References: <E12EA423-4AE1-45C5-BACD-D337EBE46113@fluffy.co.uk> <1140658357.31855.12.camel@avenin.ebourne.me.uk>
Message-ID: <43FD1A7C.1070509@reedtz.com>

On 2/22/06 5:32 PM, Martin Ebourne wrote:
> On Wed, 2006-02-22 at 23:06 +0000, Ben Summers wrote:
>   
>> What's happening with NetBSD support?
>>
>> I think the test failures Per reported are not ideal but OK, because  
>> it sorts itself out shortly afterwards. In the end, everything gets  
>> backed up. So that support is worth having.
>>     
>
> I have to say you're rather upbeat on those! I got the impression that
> every bbackupquery compare was coming back with differences found in the
> bbackupd test, so I assumed it just wasn't working.
>   
Not every bbackupquery compare. 4 of them.
> Oh, I guess your point is it worked in release mode, just not debug. A
> bit odd that. Wonder if that was repeatable.
>   
Completely repeatable. The debug tests have been run many times, while
the release has only been run once. I will run both again, after I make
the HAVE_KQUEUE changes.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 07:51:51 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Wed, 22 Feb 2006 23:51:51 -0800
Subject: [Box Backup-dev] NetBSD 3.0 patch
Message-ID: <43FD6997.50000@reedtz.com>

This is a multi-part message in MIME format.
--------------000009070301090206070306
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Here is the patch for NetBSD 3.0.

List of changes:

    * configure.ac: added a (hackish) check for netbsd, which excludes
      checking for kqueue.
    * ax_check_mount_point.m4: statvfs changes
    * bin/bbackupd/BackupDaemon.cpp: using the
      HAVE_STRUCT_STATVFS_F_MNTONNAME macro to ifdef the code.

I tested the configure changes on FC4 as well, and they seemed to have
no adverse impact. I am no expert on autoconf, so please check my work.

I ran the full debug tests on NetBSD. Same results as before:
common: PASSED
crypto: PASSED
compress: FAILED: Exception caught: St9bad_alloc
basicserver: PASSED
raidfile: PASSED
backupstore: PASSED
backupstorefix: FAILED: Exception caught: BackupStore
CouldNotFindEntryInDirectory
backupstorepatch: FAILED: 2 tests failed
backupdiff: PASSED
bbackupd: FAILED: 2 tests failed    

Then ran the bbackupd debug test. Again, 4 failures WRT bbackupquery
return codes:
FAILURE: Condition [compareReturnValue == 1*256] failed at
testbbackupd.cpp(838)
FAILURE: Condition [compareReturnValue == 1*256] failed at
testbbackupd.cpp(846)
FAILURE: Condition [compareReturnValue == 1*256] failed at
testbbackupd.cpp(850)
FAILURE: Condition [compareReturnValue == 1*256] failed at
testbbackupd.cpp(860)
FAILED: 4 tests failed
bbackupd: FAILED: 4 tests failed   


Then bbackupd release. All tests passed. Same as before.

Finally, backupstorepatch debug. All tests passed. Also as before.

Let me know if you want me to run more tests.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


--------------000009070301090206070306
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
 name="NetBSD-Patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="NetBSD-Patch"

Index: infrastructure/m4/ax_check_mount_point.m4
===================================================================
--- infrastructure/m4/ax_check_mount_point.m4	(revision 482)
+++ infrastructure/m4/ax_check_mount_point.m4	(working copy)
@@ -10,6 +10,7 @@
 dnl HAVE_STRUCT_MNTENT_MNT_DIR
 dnl HAVE_STRUCT_MNTTAB_MNT_MOUNTP
 dnl HAVE_STRUCT_STATFS_F_MNTONNAME
+dnl HAVE_STRUCT_STATvFS_F_MNTONNAME
 dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
 dnl
 dnl @category C
@@ -33,6 +34,13 @@
     #endif
     #include <sys/mount.h>
     ]])
+  # NetBSD
+  AC_CHECK_MEMBERS([struct statvfs.f_mntonname],,, [[
+    #ifdef HAVE_SYS_PARAM_H
+      #include <sys/param.h>
+    #endif
+    #include <sys/mount.h>
+    ]])
   # Linux
   AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])
   # Solaris
@@ -41,6 +49,7 @@
     #include <sys/mnttab.h>
     ]])
   if test "x$ac_cv_member_struct_statfs_f_mntonname" = "xyes" || \
+     test "x$ac_cv_member_struct_statvfs_f_mntonname" = "xyes" || \
      test "x$ac_cv_member_struct_mntent_mnt_dir" = "xyes" || \
      test "x$ac_cv_member_struct_mnttab_mnt_mountp" = "xyes"
   then
Index: configure.ac
===================================================================
--- configure.ac	(revision 482)
+++ configure.ac	(working copy)
@@ -136,7 +136,14 @@
 AC_FUNC_ERROR_AT_LINE
 AC_TYPE_SIGNAL
 AC_FUNC_STAT
-AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle getpid])
+# NetBSD implements kqueue too differently for us to get it fixed by 0.10
+# TODO: Remove this when NetBSD kqueue implementation is working
+netbsd_hack=`echo $target_os | sed 's/netbsd.*/netbsd/'`
+if test "$netbsd_hack" = "netbsd"; then
+  AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid])
+else
+  AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle getpid])
+fi
 AX_FUNC_SYSCALL
 AX_CHECK_SYSCALL_LSEEK
 AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr])
Index: bin/bbackupd/BackupDaemon.cpp
===================================================================
--- bin/bbackupd/BackupDaemon.cpp	(revision 482)
+++ bin/bbackupd/BackupDaemon.cpp	(working copy)
@@ -1170,7 +1170,7 @@
 
 
 
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_NMTONNAME)
 	// string comparison ordering for when mount points are handled
 	// by code, rather than the OS.
 	typedef struct
@@ -1234,7 +1234,7 @@
 	int numIDMaps = 0;
 
 #ifdef HAVE_MOUNTS
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_MNTONNAME)
 	// Linux and others can't tell you where a directory is mounted. So we
 	// have to read the mount entries from /etc/mtab! Bizarre that the OS
 	// itself can't tell you, but there you go.
@@ -1308,7 +1308,7 @@
 		ASSERT(*i == "/");
 	}
 #endif // n NDEBUG
-#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME
+#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME || n HAVE_STRUCT_STATVFS_F_MNTONNAME
 #endif // HAVE_MOUNTS
 
 	// Then... go through each of the entries in the configuration,
@@ -1332,11 +1332,16 @@
 			// Do a fsstat on the pathname to find out which mount it's on
 			{
 
-#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32
+#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined HAVE_STRUCT_STATVFS_F_MNTONNAME || defined WIN32
 
 				// BSD style statfs -- includes mount point, which is nice.
+#ifdef HAVE_STRUCT_STATVFS_F_MNTONNAME
+				struct statvfs s;
+				if(::statvfs(ploc->mPath.c_str(), &s) != 0)
+#else // HAVE_STRUCT_STATVFS_F_MNTONNAME
 				struct statfs s;
 				if(::statfs(ploc->mPath.c_str(), &s) != 0)
+#endif // HAVE_STRUCT_STATVFS_F_MNTONNAME
 				{
 					THROW_EXCEPTION(CommonException, OSFileError)
 				}

--------------000009070301090206070306--

From boxbackup-dev@fluffy.co.uk  Thu Feb 23 07:57:28 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Wed, 22 Feb 2006 23:57:28 -0800
Subject: [Box Backup-dev] NetBSD 3.0 patch
In-Reply-To: <43FD6997.50000@reedtz.com>
References: <43FD6997.50000@reedtz.com>
Message-ID: <43FD6AE8.7020306@reedtz.com>

On 2/22/06 11:51 PM, Per Thomsen wrote:
> Here is the patch for NetBSD 3.0.
>   
Oh, forgot to say: I have not tested this on NetBSD 2.0.2 (don't have a
VMware host set up (yet)). If Chris has the time, maybe?

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 17:09:31 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 17:09:31 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r487 - box/trunk
Message-ID: <20060223170931.AA6DE95@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-23 17:09:30 +0000 (Thu, 23 Feb 2006)
New Revision: 487

Modified:
   box/trunk/configure.ac
Log:
Patch from Per Thomsen to skip kqueue check on NetBSD, required because the NetBSD kqueue is not compatible with the OpenBSD kqueue. This is a temporary workaround to be revisited for 0.11.

Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2006-02-23 01:56:02 UTC (rev 486)
+++ box/trunk/configure.ac	2006-02-23 17:09:30 UTC (rev 487)
@@ -136,7 +136,13 @@
 AC_FUNC_ERROR_AT_LINE
 AC_TYPE_SIGNAL
 AC_FUNC_STAT
-AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle getpid])
+AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid])
+# NetBSD implements kqueue too differently for us to get it fixed by 0.10
+# TODO: Remove this when NetBSD kqueue implementation is working
+netbsd_hack=`echo $target_os | sed 's/netbsd.*/netbsd/'`
+if test "$netbsd_hack" != "netbsd"; then
+  AC_CHECK_FUNCS([kqueue])
+fi
 AX_FUNC_SYSCALL
 AX_CHECK_SYSCALL_LSEEK
 AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr])


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 17:20:10 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Thu, 23 Feb 2006 17:20:10 +0000
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <1140658670.31855.15.camel@avenin.ebourne.me.uk>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com>
 <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com>
 <1140396936.23634.1.camel@avenin.ebourne.me.uk>
 <1140658670.31855.15.camel@avenin.ebourne.me.uk>
Message-ID: <20060223172010.wnx5cr10cggok08k@ebourne.me.uk>

Martin Ebourne <lists@ebourne.me.uk> wrote:
> On Mon, 2006-02-20 at 00:55 +0000, Martin Ebourne wrote:
>> On Sat, 2006-02-18 at 15:19 +0000, Chris Wilson wrote:
>> > Hi all,
>> >
>> > On Sat, 18 Feb 2006, Chris Wilson wrote:
>> >
>> > > If I export LIBS=-ldl first, then it works.
>> >
>> > Same on sparc-sun-solaris2.9.
>>
>> Can yourself, Gary, and anyone else having any configure problems with
>> ssl please try the attached patch.
>>
>> You'll need to rerun ./bootstrap after applying (need autoconf installed
>> for this).
>
> Has anyone been able to try the second version of the patch I sent out
> for this fix? (Reattached here for convenience.)

I've managed to test this on Solaris 2.8 and this patch is not 
necessary. I think the problem stemmed from using static libraries.

NetBSD hacks are in now, so I think we're good to go.

If anyone can do a last minute checkout and test of trunk just to make 
sure the netbsd stuff hasn't added any clangers that'd be handy (seems 
ok on FC4).

Cheers,

Martin.

From boxbackup-dev@fluffy.co.uk  Thu Feb 23 18:04:50 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 18:04:50 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r488 - box/trunk/distribution/boxbackup
Message-ID: <20060223180450.74F0495@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-23 18:04:49 +0000 (Thu, 23 Feb 2006)
New Revision: 488

Modified:
   box/trunk/distribution/boxbackup/LINUX.txt
Log:
Update linux install doc

Modified: box/trunk/distribution/boxbackup/LINUX.txt
===================================================================
--- box/trunk/distribution/boxbackup/LINUX.txt	2006-02-23 17:09:30 UTC (rev 487)
+++ box/trunk/distribution/boxbackup/LINUX.txt	2006-02-23 18:04:49 UTC (rev 488)
@@ -11,12 +11,14 @@
 Require zlib and openssl headers for compilation -- may not be included when
 installing the packages. (libssl-dev + libz-dev packages under debian)
 
-Bekerley DB v1 support is required. The configure script should find an
+Bekerley DB v1 or v4 support is required. The configure script should find an
 appropriate db package -- and if not, use an in-memory version of the code.
 However, the in-memory version is not desirable as it will lose information
 over restarts of the daemon.
 
-Ideally, include the readline headers -- libreadline4-dev, probably.
+Ideally, use libeditline as a readline replacement. If not available then use
+GNU readline (libreadline4-dev, probably) and pass --enable-gnu-readline to
+./configure.
 
 
 


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:21:12 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 20:21:12 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r492 - in box/trunk: . infrastructure
Message-ID: <20060223202112.BF5A195@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-23 20:21:11 +0000 (Thu, 23 Feb 2006)
New Revision: 492

Modified:
   box/trunk/VERSION.txt
   box/trunk/infrastructure/BoxPlatform.pm.in
Log:
Let's use directory and SVN version in our BOX_VERSION variable

Modified: box/trunk/VERSION.txt
===================================================================
--- box/trunk/VERSION.txt	2006-02-23 19:51:25 UTC (rev 491)
+++ box/trunk/VERSION.txt	2006-02-23 20:21:11 UTC (rev 492)
@@ -1,2 +1,2 @@
-0.09_trunk
+USE_SVN_VERSION
 boxbackup

Modified: box/trunk/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/trunk/infrastructure/BoxPlatform.pm.in	2006-02-23 19:51:25 UTC (rev 491)
+++ box/trunk/infrastructure/BoxPlatform.pm.in	2006-02-23 20:21:11 UTC (rev 492)
@@ -34,6 +34,27 @@
 	$product_name = <VERSION>;
 	chomp $product_name;
 	close VERSION;
+	if($product_version eq 'USE_SVN_VERSION')
+	{
+		# for developers, use SVN version
+		my $svnversion = `svnversion .`;
+		chomp $svnversion;
+		$svnversion =~ tr/0-9A-Za-z/_/c;
+		open INFO,'svn info . |';
+		my $svnurl;
+		while(<INFO>)
+		{
+			if(m/^URL: (.+?)[\n\r]+/)
+			{
+				$svnurl = $1
+			}
+		}
+		close INFO;
+		$svnurl =~ m!box/(.+)$!;
+		my $svndir = $1;
+		$svndir =~ tr/0-9A-Za-z/_/c;
+		$product_version = $svndir.'_'.$svnversion;
+	}
 
 	# where to put the files
 	$install_into_dir = '@bindir_expanded@';


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:37:54 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Thu, 23 Feb 2006 21:37:54 +0100
Subject: [Box Backup-dev] Exception thrown in bbackupquery when reading form stdin
Message-ID: <43FE1D22.2000905@hostingbrothers.nl>

When I run bbackupquery everything goes well (logging in etc) up until 
the point that bbackupquery wants to read a commando from stdin.

This is the section of code from bbackupquery where it goes wrong: (It's 
from the bottom of the file)

#else
    // Version for platforms which don't have readline by default
    FdGetLine getLine(fileno(stdin));
    while(!context.Stop())
    {
        printf("query > ");
        fflush(stdout);
       
        std::string command(getLine.GetLine());   <<<<<<<<<< Here it 
goes wrong

        context.DoCommand(command.c_str());
    }
#endif

The problem is that the code _fileno(stdin) returns 0 and because of 
that, ::read(...) doesn't read anything.

FdGetLine.cpp from line no 123:
#ifdef WIN32
            int bytes;

            if (mFileHandle == _fileno(stdin))  <<<<<<<<<<<<< THIS RETURNS 0
            {
                bytes = console_read(mBuffer, sizeof(mBuffer));
            }
            else
            {
                bytes = ::read(mFileHandle, mBuffer,
                    sizeof(mBuffer));
            }
#else // !WIN32
            int bytes = ::read(mFileHandle, mBuffer, sizeof(mBuffer));
#endif // WIN32
           
            // Error?
            if(bytes == -1)
            {
                THROW_EXCEPTION(CommonException, OSFileError)
            }

When I change the code in bbackupquery slightly its run perfectly. I 
changed the code in the while loop a little (the code at the beginning 
of this message) so it looks like:

#else
    // Version for platforms which don't have readline by default
    while(!context.Stop())
    {
        printf("query > ");
        fflush(stdout);
       
        std::string cmd; // NEW
        std::getline(std::cin,cmd,'\n'); // NEW
        context.DoCommand(cmd.c_str()); // NEW
    }
#endif

I don't know of the problem with FdGetLine can be fixed, so it will run 
on Windows XP?
Is there a reason not to use std::getline(..) function?

Mark

From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:39:49 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Thu, 23 Feb 2006 21:39:49 +0100
Subject: [Box Backup-dev] Errors with client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602230006410.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com> <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl> <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl> <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com> <43FC9F64.5050208@hostingbrothers.nl> <Pine.LNX.4.62.0602222126500.14656@top.qwarx.com> <Pine.LNX.4.62.0602222136510.14656@top.qwarx.com> <43FCE641.2070603@hostingbrothers.nl> <Pine.LNX.4.62.0602230006410.14656@top.qwarx.com>
Message-ID: <43FE1D95.4000100@hostingbrothers.nl>

Chris Wilson wrote:
> Hi Roy,
>
>> Thank you for you help. You're right, bbackupctl is broken. If I use 
>> it in lazy mode, bbackupd will run just fine. If I compile it in 
>> VS2005, will bbackupctl run just fine then?
>
> I can't promise it, but it works fine for me, with both versions 
> (trunk and mine). If not, or even if it does, then your help in fixing 
> it would be greatly appreciated.
>
> To start with, you could run bbackupd under the Visual Studio debugger 
> (either version), and break into the process at the point where it's 
> hung (after sending the sync command), and tell me what the stack 
> trace says.
>
> Thanks again for your help!
>
> Cheers, Chris.
Hi,

My brother has debugged the problem. He has posted a message on the 
list, subject "Exception thrown in bbackupquery when reading form stdin".
That version works in our setup.

Greetz,

Roy

From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:38:01 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 20:38:01 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r493 - box/trunk/distribution/boxbackup/contrib/rpm
Message-ID: <20060223203801.43A8B95@s0g0.pems.testserver.co.uk>

Author: martin
Date: 2006-02-23 20:37:59 +0000 (Thu, 23 Feb 2006)
New Revision: 493

Modified:
   box/trunk/distribution/boxbackup/contrib/rpm/boxbackup.spec
Log:
Fix RPM spec file since system name is now calculated differently

Modified: box/trunk/distribution/boxbackup/contrib/rpm/boxbackup.spec
===================================================================
--- box/trunk/distribution/boxbackup/contrib/rpm/boxbackup.spec	2006-02-23 20:21:11 UTC (rev 492)
+++ box/trunk/distribution/boxbackup/contrib/rpm/boxbackup.spec	2006-02-23 20:37:59 UTC (rev 493)
@@ -104,7 +104,7 @@
 %if %{is_suse}
 ln -s ../../%{init_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}/rcbbackupd
 %endif
-%define client_dir parcels/%{ident}-backup-client-Linux
+%define client_dir parcels/%{ident}-backup-client-linux-gnu
 install %{client_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}
 install %{client_dir}/bbackupquery $RPM_BUILD_ROOT%{_sbindir}
 install %{client_dir}/bbackupctl $RPM_BUILD_ROOT%{_sbindir}
@@ -117,7 +117,7 @@
 %if %{is_suse}
 ln -s ../../%{init_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}/rcbbstored
 %endif
-%define server_dir parcels/%{ident}-backup-server-Linux
+%define server_dir parcels/%{ident}-backup-server-linux-gnu
 install %{server_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_bindir}


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 19:49:39 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Thu, 23 Feb 2006 19:49:39 +0000
Subject: [Box Backup-dev] RC3 Solaris testing
In-Reply-To: <20060223172010.wnx5cr10cggok08k@ebourne.me.uk>
References: <Pine.LNX.4.62.0602181500250.14656@top.qwarx.com> <Pine.LNX.4.62.0602181519260.14656@top.qwarx.com> <1140396936.23634.1.camel@avenin.ebourne.me.uk> <1140658670.31855.15.camel@avenin.ebourne.me.uk> <20060223172010.wnx5cr10cggok08k@ebourne.me.uk>
Message-ID: <C40977B3-90E3-406E-BC13-BABA9F48CCF7@fluffy.co.uk>

On 23 Feb 2006, at 17:20, Martin Ebourne wrote:

> Martin Ebourne <lists@ebourne.me.uk> wrote:
>> On Mon, 2006-02-20 at 00:55 +0000, Martin Ebourne wrote:
>>> On Sat, 2006-02-18 at 15:19 +0000, Chris Wilson wrote:
>>> > Hi all,
>>> >
>>> > On Sat, 18 Feb 2006, Chris Wilson wrote:
>>> >
>>> > > If I export LIBS=-ldl first, then it works.
>>> >
>>> > Same on sparc-sun-solaris2.9.
>>>
>>> Can yourself, Gary, and anyone else having any configure problems  
>>> with
>>> ssl please try the attached patch.
>>>
>>> You'll need to rerun ./bootstrap after applying (need autoconf  
>>> installed
>>> for this).
>>
>> Has anyone been able to try the second version of the patch I sent  
>> out
>> for this fix? (Reattached here for convenience.)
>
> I've managed to test this on Solaris 2.8 and this patch is not  
> necessary. I think the problem stemmed from using static libraries.
>
> NetBSD hacks are in now, so I think we're good to go.
>
> If anyone can do a last minute checkout and test of trunk just to  
> make sure the netbsd stuff hasn't added any clangers that'd be  
> handy (seems ok on FC4).

Seems fine on Darwin and OpenBSD 3.7... I'll get on with the  
releasing now.

Ben






From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:08:29 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Thu, 23 Feb 2006 20:08:29 +0000
Subject: [Box Backup-dev] 0.10 archive built -- proof read release notes for web site and announcment
Message-ID: <A5BCE3B2-83F4-47FC-B421-007D1CFA833D@fluffy.co.uk>

I've just made the 0.10 distribution archive.

   http://www.fluffy.co.uk/boxbackup/bin/boxbackup-0.10.tgz

MD5 (boxbackup-0.10.tgz) = bb8a69012b59fc737b690d594450d218

[ For the archives: This link is temporary and may stop working.  
Download from sourceforge! ]

I note that it jumped from size 664699 to 842456 over rc3 -- I assume  
this is a simple Microsoft inefficiency in their build files?

Anyone care to give it a quick look over before I push the button and  
upload to sourceforge?

Have I missed anyone from the list of contributors?


Release notes:

* Optimised diffing algorithm -- massive speed improvements
* Improved diff timeout
* Bug fixes
* Portability improvements, including new autoconf based build
* xattr support (on Linux and Darwin -- backs up resource forks under  
Mac OS X)
* Readline usage clarified for licensing.

Experimental features (no automated test exists)
* Keep-alive on long diffing operations
* Save state for non-server use, speeds up first sync after bbackupd  
starts (not enabled by default)
* Native win32 port integrated into main source tree, fixes and  
improved build
* Support for MinGW and MSVC under Win32

Thanks due to
* Main developers: Martin Ebourne, Nick Knight, Jonathan Morton, Gary  
Niemcewicz, Chris Wilson
* Testing and other contributions: James O'Gorman, Peter Jalajas,  
Charles Lecklider, Stefan Norlin, Per Thomsen
(Alphabetical by surname).




Documentation is still an issue. Here's a wiki page for release notes  
and version specific documentation

    http://boxbackup.hostworks.ca/index.php/0.10

Ben








From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:43:13 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 20:43:13 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r494 - box/RELEASE/0.10/distribution/boxbackup/contrib/rpm
Message-ID: <20060223204313.79AEE95@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-23 20:43:13 +0000 (Thu, 23 Feb 2006)
New Revision: 494

Modified:
   box/RELEASE/0.10/distribution/boxbackup/contrib/rpm/boxbackup.spec
Log:
Merge from trunk@493 to unbreak linux rpm spec. Seemed a worthwhile thing to do for a release, even if Linux is a minor platform used only when *BSD doesn't have the right drivers for your hardware.

Modified: box/RELEASE/0.10/distribution/boxbackup/contrib/rpm/boxbackup.spec
===================================================================
--- box/RELEASE/0.10/distribution/boxbackup/contrib/rpm/boxbackup.spec	2006-02-23 20:37:59 UTC (rev 493)
+++ box/RELEASE/0.10/distribution/boxbackup/contrib/rpm/boxbackup.spec	2006-02-23 20:43:13 UTC (rev 494)
@@ -104,7 +104,7 @@
 %if %{is_suse}
 ln -s ../../%{init_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}/rcbbackupd
 %endif
-%define client_dir parcels/%{ident}-backup-client-Linux
+%define client_dir parcels/%{ident}-backup-client-linux-gnu
 install %{client_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}
 install %{client_dir}/bbackupquery $RPM_BUILD_ROOT%{_sbindir}
 install %{client_dir}/bbackupctl $RPM_BUILD_ROOT%{_sbindir}
@@ -117,7 +117,7 @@
 %if %{is_suse}
 ln -s ../../%{init_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}/rcbbstored
 %endif
-%define server_dir parcels/%{ident}-backup-server-Linux
+%define server_dir parcels/%{ident}-backup-server-linux-gnu
 install %{server_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_bindir}


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:54:47 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 23 Feb 2006 20:54:47 +0000 (GMT)
Subject: [Box Backup-dev] Exception thrown in bbackupquery when reading
 form stdin
In-Reply-To: <43FE1D22.2000905@hostingbrothers.nl>
References: <43FE1D22.2000905@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602232052070.14656@top.qwarx.com>

Hi Mark,

> When I run bbackupquery everything goes well (logging in etc) up until the 
> point that bbackupquery wants to read a commando from stdin.
[...]
> The problem is that the code _fileno(stdin) returns 0 and because of that, 
> ::read(...) doesn't read anything.
>
> FdGetLine.cpp from line no 123:
> #ifdef WIN32
>           int bytes;
>
>           if (mFileHandle == _fileno(stdin))  <<<<<<<<<<<<< THIS RETURNS 0
>           {
>               bytes = console_read(mBuffer, sizeof(mBuffer));
>           }
>           else
>           {
>               bytes = ::read(mFileHandle, mBuffer,
>                   sizeof(mBuffer));
>           }
> #else // !WIN32
>           int bytes = ::read(mFileHandle, mBuffer, sizeof(mBuffer));
> #endif // WIN32
>                     // Error?
>           if(bytes == -1)
>           {
>               THROW_EXCEPTION(CommonException, OSFileError)
>           }

This code is there for a reason: standard read() cannot read unicode 
characters on the input (returns zero), so it would be impossible to enter 
a unicode filename in unicode mode without this code.

I would expect _fileno(stdin) to return zero, and mFileHandle to be zero 
as well, so that we call console_read, which should work.

Could you look into why console_read is not working on your platform? 
Thanks!

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 |


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:55:02 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Thu, 23 Feb 2006 20:55:02 +0000
Subject: [Box Backup-dev] 0.10 archive built -- proof read release notes for web site and announcment
In-Reply-To: <A5BCE3B2-83F4-47FC-B421-007D1CFA833D@fluffy.co.uk>
References: <A5BCE3B2-83F4-47FC-B421-007D1CFA833D@fluffy.co.uk>
Message-ID: <63C6455A-226B-4BA3-B9AF-92E04AEF940F@fluffy.co.uk>

On 23 Feb 2006, at 20:08, Ben Summers wrote:

>
> I've just made the 0.10 distribution archive.
>
>   http://www.fluffy.co.uk/boxbackup/bin/boxbackup-0.10.tgz
>

With Martin's Linux fix, MD5 is now 2dc02d87932fdb222ed019443ddcf444

Sourceforge login isn't working, so I can't do the release there  
right now. I'll do it after my dinner!

(Which means, I suppose, there's time to find more last minute glitches)

Ben



From boxbackup-dev@fluffy.co.uk  Thu Feb 23 20:56:24 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 23 Feb 2006 20:56:24 +0000 (GMT)
Subject: [Box Backup-dev] Errors with client (Win32)
In-Reply-To: <43FE1D95.4000100@hostingbrothers.nl>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com>
 <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl>
 <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com> <43FC9F64.5050208@hostingbrothers.nl>
 <Pine.LNX.4.62.0602222126500.14656@top.qwarx.com>
 <Pine.LNX.4.62.0602222136510.14656@top.qwarx.com> <43FCE641.2070603@hostingbrothers.nl>
 <Pine.LNX.4.62.0602230006410.14656@top.qwarx.com> <43FE1D95.4000100@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602232055390.14656@top.qwarx.com>

Hi Roy,

> My brother has debugged the problem. He has posted a message on the 
> list, subject "Exception thrown in bbackupquery when reading form 
> stdin". That version works in our setup.

It works completely? I'm amazed. The change that he made should only 
affect bbackupquery, not bbackupd or bbackupctl.

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 |


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 19:49:54 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 19:49:54 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r489 - box
Message-ID: <20060223194954.D859695@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-23 19:49:53 +0000 (Thu, 23 Feb 2006)
New Revision: 489

Added:
   box/RELEASE/
Log:
Releases need a place to live


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 19:51:25 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 19:51:25 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r491 - in box/RELEASE/0.10: . distribution/boxbackup
Message-ID: <20060223195125.DCFA895@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-23 19:51:25 +0000 (Thu, 23 Feb 2006)
New Revision: 491

Modified:
   box/RELEASE/0.10/VERSION.txt
   box/RELEASE/0.10/distribution/boxbackup/VERSION.txt
Log:
Bump version number for release

Modified: box/RELEASE/0.10/VERSION.txt
===================================================================
--- box/RELEASE/0.10/VERSION.txt	2006-02-23 19:49:59 UTC (rev 490)
+++ box/RELEASE/0.10/VERSION.txt	2006-02-23 19:51:25 UTC (rev 491)
@@ -1,2 +1,2 @@
-0.09_trunk
+0.10
 boxbackup

Modified: box/RELEASE/0.10/distribution/boxbackup/VERSION.txt
===================================================================
--- box/RELEASE/0.10/distribution/boxbackup/VERSION.txt	2006-02-23 19:49:59 UTC (rev 490)
+++ box/RELEASE/0.10/distribution/boxbackup/VERSION.txt	2006-02-23 19:51:25 UTC (rev 491)
@@ -1,2 +1,2 @@
-0.09_plus3
+0.10
 boxbackup


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 19:49:59 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 19:49:59 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r490 - box/RELEASE
Message-ID: <20060223194959.BA24D95@s0g0.pems.testserver.co.uk>

Author: ben
Date: 2006-02-23 19:49:59 +0000 (Thu, 23 Feb 2006)
New Revision: 490

Added:
   box/RELEASE/0.10/
Log:
Create release

Copied: box/RELEASE/0.10 (from rev 489, box/trunk)


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 21:00:14 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Thu, 23 Feb 2006 21:00:14 +0000
Subject: [Box Backup-dev] Win32 binary
Message-ID: <08683CB9-E12E-4F69-96CC-CA65EEC1807C@fluffy.co.uk>

I suppose we should have an official Win32 binary. Chris should  
probably make something sensible from one of the many build options,  
and I'll upload it to sourceforge.

Ben




From boxbackup-dev@fluffy.co.uk  Thu Feb 23 21:08:10 2006
From: boxbackup-dev@fluffy.co.uk (Roy)
Date: Thu, 23 Feb 2006 22:08:10 +0100
Subject: [Box Backup-dev] Errors with client (Win32)
In-Reply-To: <Pine.LNX.4.62.0602232055390.14656@top.qwarx.com>
References: <43FA479D.6000301@hostingbrothers.nl> <Pine.LNX.4.62.0602202355550.14656@top.qwarx.com> <43FAEFE6.4020508@hostingbrothers.nl> <43FB7785.8010104@hostingbrothers.nl> <Pine.LNX.4.62.0602212119310.14656@top.qwarx.com> <43FB909A.3020404@hostingbrothers.nl> <Pine.LNX.4.62.0602212243430.14656@top.qwarx.com> <43FC9F64.5050208@hostingbrothers.nl> <Pine.LNX.4.62.0602222126500.14656@top.qwarx.com> <Pine.LNX.4.62.0602222136510.14656@top.qwarx.com> <43FCE641.2070603@hostingbrothers.nl> <Pine.LNX.4.62.0602230006410.14656@top.qwarx.com> <43FE1D95.4000100@hostingbrothers.nl> <Pine.LNX.4.62.0602232055390.14656@top.qwarx.com>
Message-ID: <43FE243A.1040607@hostingbrothers.nl>

Chris Wilson wrote:
> Hi Roy,
>
>> My brother has debugged the problem. He has posted a message on the 
>> list, subject "Exception thrown in bbackupquery when reading form 
>> stdin". That version works in our setup.
>
> It works completely? I'm amazed. The change that he made should only 
> affect bbackupquery, not bbackupd or bbackupctl.
>
> Cheers, Chris.
No, my mistake. Only bbackupquery works now. Problem in bbackupctl with 
the sync option is not yet found. Bbackupd now works fine, or maybe not, 
if this is the problem of that causes bbackupctl sync to hang indefinitely.

Gr.

Roy


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 21:31:06 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Thu, 23 Feb 2006 22:31:06 +0100
Subject: [Box Backup-dev] Exception thrown in bbackupquery when reading
 form stdin
In-Reply-To: <Pine.LNX.4.62.0602232052070.14656@top.qwarx.com>
References: <43FE1D22.2000905@hostingbrothers.nl> <Pine.LNX.4.62.0602232052070.14656@top.qwarx.com>
Message-ID: <43FE299A.2050003@hostingbrothers.nl>

Chris Wilson wrote:
> This code is there for a reason: standard read() cannot read unicode 
> characters on the input (returns zero), so it would be impossible to 
> enter a unicode filename in unicode mode without this code.
>
> I would expect _fileno(stdin) to return zero, and mFileHandle to be 
> zero as well, so that we call console_read, which should work.
>
> Could you look into why console_read is not working on your platform? 
> Thanks!
>
> Cheers, Chris.
Hi Chris,

The function ReadConsoleW(...) in emu.cpp on line 1207 returns error 
code 8. The code snippet where it goes wrong is:

if (!ReadConsoleW(
            hConsole,
            pWideBuffer,
            WideSize - 1,
            &numCharsRead,
            NULL // reserved
        ))
    {
        ::fprintf(stderr, "Failed to read from console: error %d\n",
            GetLastError());
        return -1;
    }

hConsole = 3
WideSize = 0
numCharsRead = 0

Do you know what is wrong?

Mark

From boxbackup-dev@fluffy.co.uk  Thu Feb 23 21:38:54 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Thu, 23 Feb 2006 22:38:54 +0100
Subject: [Box Backup-dev] Problem with console_read() on Windows XP
Message-ID: <43FE2B6E.9050306@hostingbrothers.nl>

Hi Chris,

I think the problem is that the BufferSize parameter of console_read(..) 
is only 4. This is weird, because the size of the buffer variable 
(mBuffer) as it is declared in FdGetLine is 1024. Something goes wrong 
with sizeof(mBuffer) I think.

Mark

From boxbackup-dev@fluffy.co.uk  Thu Feb 23 21:40:56 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Thu, 23 Feb 2006 21:40:56 +0000
Subject: [Box Backup-dev] Problem with console_read() on Windows XP
In-Reply-To: <43FE2B6E.9050306@hostingbrothers.nl>
References: <43FE2B6E.9050306@hostingbrothers.nl>
Message-ID: <1140730857.2735.0.camel@avenin.ebourne.me.uk>

On Thu, 2006-02-23 at 22:38 +0100, Mark wrote:
> Hi Chris,
> 
> I think the problem is that the BufferSize parameter of console_read(..) 
> is only 4. This is weird, because the size of the buffer variable 
> (mBuffer) as it is declared in FdGetLine is 1024. Something goes wrong 
> with sizeof(mBuffer) I think.

That'd be because it's turned it into a pointer, so you get size of
pointer, not array.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 21:55:00 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Thu, 23 Feb 2006 22:55:00 +0100
Subject: [Box Backup-dev] Problem with console_read() on Windows XP
In-Reply-To: <1140730857.2735.0.camel@avenin.ebourne.me.uk>
References: <43FE2B6E.9050306@hostingbrothers.nl> <1140730857.2735.0.camel@avenin.ebourne.me.uk>
Message-ID: <43FE2F34.6080204@hostingbrothers.nl>

Martin Ebourne wrote:
> On Thu, 2006-02-23 at 22:38 +0100, Mark wrote:
>   
>> Hi Chris,
>>
>> I think the problem is that the BufferSize parameter of console_read(..) 
>> is only 4. This is weird, because the size of the buffer variable 
>> (mBuffer) as it is declared in FdGetLine is 1024. Something goes wrong 
>> with sizeof(mBuffer) I think.
>>     
>
> That'd be because it's turned it into a pointer, so you get size of
> pointer, not array.
>
> Cheers,
>
> Martin.
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev
>   
Hi Martin and Chris,

If that is the case then would this code ever work:

int console_read(char* pBuffer, size_t BufferSize)
{
    HANDLE hConsole = GetStdHandle(STD_INPUT_HANDLE);

    if (hConsole == INVALID_HANDLE_VALUE)
    {
        ::fprintf(stderr, "Failed to get a handle on standard input: "
            "error %d\n", GetLastError());
        return -1;
    }

    int WideSize = BufferSize /
5;                                                        <<<<<<
WideSize = 0
    WCHAR* pWideBuffer = new WCHAR [WideSize];                   <<<<<<
No buffer

    if (!pWideBuffer)
    {
        ::perror("Failed to allocate wide character buffer");
        return -1;
    }

    DWORD numCharsRead = 0;

    if (!ReadConsoleW(
            hConsole,
            pWideBuffer,
            WideSize -
1,
<<<<<<<<<<< Read -1 characters from the console
            &numCharsRead,
            NULL // reserved
        ))
    {
        ::fprintf(stderr, "Failed to read from console: error %d\n",
            GetLastError());
        return -1;
    }


Or don't I get it, and is there nothings wrong with the code above?

If I understand the code, we ask the function ReadConsoleW(..) to read
-1 characters in a buffer with a length of zero.

Mark


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 21:58:59 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 23 Feb 2006 21:58:59 +0000 (GMT)
Subject: [Box Backup-dev] Exception thrown in bbackupquery when reading
 form stdin
In-Reply-To: <43FE299A.2050003@hostingbrothers.nl>
References: <43FE1D22.2000905@hostingbrothers.nl> <Pine.LNX.4.62.0602232052070.14656@top.qwarx.com>
 <43FE299A.2050003@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602232156550.14656@top.qwarx.com>

Hi Mark,

>>  Could you look into why console_read is not working on your platform? 
>>  Thanks!
>
> The function ReadConsoleW(...) in emu.cpp on line 1207 returns error code 8. 
> The code snippet where it goes wrong is:
>
> if (!ReadConsoleW(
>           hConsole,
>           pWideBuffer,
>           WideSize - 1,
>           &numCharsRead,
>           NULL // reserved
>        )) 
>   {
>        : : fprintf(stderr, "Failed to read from console: error %d\n",
>           GetLastError());
>       return -1;
>   }
>
> hConsole = 3
> WideSize = 0
> numCharsRead = 0
>
> Do you know what is wrong?

Yes! You need to modify the preprocessor options to define NDEBUG for all 
projects. Otherwise FdGetLine's buffer is 4 bytes long, which might not be 
enough to hold a single unicode character, so WideSize is zero, and no 
characters can be read.

Please could you submit updated project files for VS2003, since I don't 
have a copy to do this myself?

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 |


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 22:00:13 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 23 Feb 2006 22:00:13 +0000 (GMT)
Subject: [Box Backup-dev] Problem with console_read() on Windows XP
In-Reply-To: <43FE2B6E.9050306@hostingbrothers.nl>
References: <43FE2B6E.9050306@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602232159150.14656@top.qwarx.com>

Hi Mark,

> I think the problem is that the BufferSize parameter of console_read(..) 
> is only 4. This is weird, because the size of the buffer variable 
> (mBuffer) as it is declared in FdGetLine is 1024. Something goes wrong 
> with sizeof(mBuffer) I think.

You're right, this is the problem. It's because we don't define NDEBUG as 
a preprocessor option. Please could you update the project files and send 
me the fixed versions?

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 |


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 22:12:09 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 22:12:09 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r495 - box/chris/general/lib/common
Message-ID: <20060223221209.A184D95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-23 22:12:01 +0000 (Thu, 23 Feb 2006)
New Revision: 495

Modified:
   box/chris/general/lib/common/FdGetLine.h
Log:
* FdGetLine.h
- Make sure that the GetLine buffer is big enough for at least one UTF-8
  character from console_read, otherwise bbackupquery will fail in
  debug mode.


Modified: box/chris/general/lib/common/FdGetLine.h
===================================================================
--- box/chris/general/lib/common/FdGetLine.h	2006-02-23 20:43:13 UTC (rev 494)
+++ box/chris/general/lib/common/FdGetLine.h	2006-02-23 22:12:01 UTC (rev 495)
@@ -14,6 +14,10 @@
 
 #ifdef NDEBUG
 	#define FDGETLINE_BUFFER_SIZE		1024
+#elif defined WIN32
+	// need enough space for at least one unicode character 
+	// in UTF-8 when calling console_read() from bbackupquery
+	#define FDGETLINE_BUFFER_SIZE		5
 #else
 	#define FDGETLINE_BUFFER_SIZE		4
 #endif


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 22:15:33 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Thu, 23 Feb 2006 23:15:33 +0100
Subject: [Box Backup-dev] New project files for Visual Studio 2003 for the version of Chris
Message-ID: <43FE3405.7060401@hostingbrothers.nl>

This is a multi-part message in MIME format.
--------------000405010802060803000908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Chris,

Here are the new Project files for VS2003. All the programs now work 
(bbackupdeamon, bbackupquery and bbackupcntr)!!

So I'am a happy person!

Only one question left: What is the difference between your version and 
the trunk version? Because now I work with your version, but I have to 
move back to the trunk again to keep up with the changes I think?

Mark

--------------000405010802060803000908
Content-Type: application/octet-stream;
 name="VS2003_Projectfiles_Chris_Version.rar"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="VS2003_Projectfiles_Chris_Version.rar"

[encoded data, 240535 characters]
CJ0EUs+8OX68ebIScNZjLBUAssLJ9Qv3P/LEPXsAQAcA
--------------000405010802060803000908--

From boxbackup-dev@fluffy.co.uk  Thu Feb 23 22:21:43 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Thu, 23 Feb 2006 22:21:43 +0000 (GMT)
Subject: [Box Backup-dev] New project files for Visual Studio 2003 for
 the version of Chris
In-Reply-To: <43FE3405.7060401@hostingbrothers.nl>
References: <43FE3405.7060401@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602232219070.14656@top.qwarx.com>

Hi Mark,

> Here are the new Project files for VS2003. All the programs now work 
> (bbackupdeamon, bbackupquery and bbackupcntr)!!
>
> So I'am a happy person!

Excellent, thanks for the report and the new project files!

> Only one question left: What is the difference between your version and 
> the trunk version? Because now I work with your version, but I have to 
> move back to the trunk again to keep up with the changes I think?

You can see the changes with an "svn diff" command. The main one is that I 
fixed a number of race conditions and deadlocks in handling the command 
socket in bbackupd, which could cause the daemon to lock up or possibly 
crash. I will continue to merge new features from the trunk into my tree 
until the patches are accepted or become unnecessary. And I will put these 
new project files into my tree as well.

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 |


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 22:27:52 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 22:27:52 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r496 - box/chris/general/infrastructure/msvc/2003
Message-ID: <20060223222752.671BC95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-23 22:27:19 +0000 (Thu, 23 Feb 2006)
New Revision: 496

Modified:
   box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj
   box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj
   box/chris/general/infrastructure/msvc/2003/boxbackup.ncb
   box/chris/general/infrastructure/msvc/2003/boxbackup.sln
   box/chris/general/infrastructure/msvc/2003/boxbackup.suo
   box/chris/general/infrastructure/msvc/2003/boxquery.vcproj
   box/chris/general/infrastructure/msvc/2003/common.vcproj
   box/chris/general/infrastructure/msvc/2003/win32test.vcproj
Log:
* 2003/boxbackup.ncb
* 2003/boxquery.vcproj
* 2003/boxbackup.suo
* 2003/win32test.vcproj
* 2003/boxbackup.sln
* 2003/common.vcproj
* 2003/bbackupctl.vcproj
* 2003/bbackupd.vcproj
- Updated project files to define NDEBUG, supplied by 
  "Mark <boxbackup@hostingbrothers.nl>"


Modified: box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj	2006-02-23 22:12:01 UTC (rev 495)
+++ box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj	2006-02-23 22:27:19 UTC (rev 496)
@@ -20,7 +20,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"

Modified: box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj	2006-02-23 22:12:01 UTC (rev 495)
+++ box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj	2006-02-23 22:27:19 UTC (rev 496)
@@ -20,7 +20,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\include&quot;;&quot;$(SolutionDir)..\..\..\..\zlib\include&quot;;&quot;$(SolutionDir)..\..\..\lib\backupclient&quot;;&quot;$(SolutionDir)..\..\..\lib\server&quot;;&quot;$(SolutionDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\lib\compress&quot;;&quot;$(SolutionDir)..\..\..\lib\win32&quot;;&quot;$(SolutionDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"

Modified: box/chris/general/infrastructure/msvc/2003/boxbackup.ncb
===================================================================
(Binary files differ)

Modified: box/chris/general/infrastructure/msvc/2003/boxbackup.sln
===================================================================
--- box/chris/general/infrastructure/msvc/2003/boxbackup.sln	2006-02-23 22:12:01 UTC (rev 495)
+++ box/chris/general/infrastructure/msvc/2003/boxbackup.sln	2006-02-23 22:27:19 UTC (rev 496)
@@ -1,7 +1,6 @@
 Microsoft Visual Studio Solution File, Format Version 8.00
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boxquery", "boxquery.vcproj", "{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
 	ProjectSection(ProjectDependencies) = postProject
-		{98598F62-FEA7-4134-AA29-0AD2315A214F} = {98598F62-FEA7-4134-AA29-0AD2315A214F}
 		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
 	EndProjectSection
 EndProject
@@ -11,7 +10,6 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupd", "bbackupd.vcproj", "{22D325FB-9131-4BD6-B390-968F0491D687}"
 	ProjectSection(ProjectDependencies) = postProject
-		{98598F62-FEA7-4134-AA29-0AD2315A214F} = {98598F62-FEA7-4134-AA29-0AD2315A214F}
 		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
 	EndProjectSection
 EndProject
@@ -25,10 +23,6 @@
 		{A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_regex", "lib\win32\boost_regex.vcproj", "{98598F62-FEA7-4134-AA29-0AD2315A214F}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		Debug = Debug
@@ -55,10 +49,6 @@
 		{9FD51412-E945-4457-A17A-CA3C505CF431}.Debug.Build.0 = Debug|Win32
 		{9FD51412-E945-4457-A17A-CA3C505CF431}.Release.ActiveCfg = Release|Win32
 		{9FD51412-E945-4457-A17A-CA3C505CF431}.Release.Build.0 = Release|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Debug.ActiveCfg = Debug|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Debug.Build.0 = Debug|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Release.ActiveCfg = Release|Win32
-		{98598F62-FEA7-4134-AA29-0AD2315A214F}.Release.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 	EndGlobalSection

Modified: box/chris/general/infrastructure/msvc/2003/boxbackup.suo
===================================================================
(Binary files differ)

Modified: box/chris/general/infrastructure/msvc/2003/boxquery.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/boxquery.vcproj	2006-02-23 22:12:01 UTC (rev 495)
+++ box/chris/general/infrastructure/msvc/2003/boxquery.vcproj	2006-02-23 22:27:19 UTC (rev 496)
@@ -21,7 +21,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"

Modified: box/chris/general/infrastructure/msvc/2003/common.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/common.vcproj	2006-02-23 22:12:01 UTC (rev 495)
+++ box/chris/general/infrastructure/msvc/2003/common.vcproj	2006-02-23 22:27:19 UTC (rev 496)
@@ -20,7 +20,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0\&quot;"
-				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+				PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"

Modified: box/chris/general/infrastructure/msvc/2003/win32test.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/win32test.vcproj	2006-02-23 22:12:01 UTC (rev 495)
+++ box/chris/general/infrastructure/msvc/2003/win32test.vcproj	2006-02-23 22:27:19 UTC (rev 496)
@@ -20,7 +20,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 22:28:46 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Thu, 23 Feb 2006 22:28:46 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r497 - in box/chris/general: . bin/bbackupd distribution/boxbackup distribution/boxbackup/contrib/rpm infrastructure infrastructure/m4 infrastructure/msvc/2005
Message-ID: <20060223222846.7CFA995@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-23 22:28:38 +0000 (Thu, 23 Feb 2006)
New Revision: 497

Modified:
   box/chris/general/VERSION.txt
   box/chris/general/bin/bbackupd/BackupDaemon.cpp
   box/chris/general/configure.ac
   box/chris/general/distribution/boxbackup/LINUX.txt
   box/chris/general/distribution/boxbackup/contrib/rpm/boxbackup.spec
   box/chris/general/infrastructure/BoxPlatform.pm.in
   box/chris/general/infrastructure/m4/ax_check_mount_point.m4
   box/chris/general/infrastructure/msvc/2005/boxbackup.suo
Log:
* distribution/boxbackup/contrib/rpm/boxbackup.spec
* distribution/boxbackup/LINUX.txt
* infrastructure/m4/ax_check_mount_point.m4
* infrastructure/msvc/2005/boxbackup.suo
* infrastructure/BoxPlatform.pm.in
* configure.ac
* VERSION.txt
* bin/bbackupd/BackupDaemon.cpp
- Merged changes from trunk r483 to r495


Modified: box/chris/general/VERSION.txt
===================================================================
--- box/chris/general/VERSION.txt	2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/VERSION.txt	2006-02-23 22:28:38 UTC (rev 497)
@@ -1,2 +1,2 @@
-0.09_trunk
+USE_SVN_VERSION
 boxbackup

Modified: box/chris/general/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-23 22:28:38 UTC (rev 497)
@@ -1251,7 +1251,7 @@
 
 
 
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_NMTONNAME)
 	// string comparison ordering for when mount points are handled
 	// by code, rather than the OS.
 	typedef struct
@@ -1315,7 +1315,7 @@
 	int numIDMaps = 0;
 
 #ifdef HAVE_MOUNTS
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_MNTONNAME)
 	// Linux and others can't tell you where a directory is mounted. So we
 	// have to read the mount entries from /etc/mtab! Bizarre that the OS
 	// itself can't tell you, but there you go.
@@ -1389,7 +1389,7 @@
 		ASSERT(*i == "/");
 	}
 #endif // n NDEBUG
-#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME
+#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME || n HAVE_STRUCT_STATVFS_F_MNTONNAME
 #endif // HAVE_MOUNTS
 
 	// Then... go through each of the entries in the configuration,
@@ -1413,11 +1413,16 @@
 			// Do a fsstat on the pathname to find out which mount it's on
 			{
 
-#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32
+#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined HAVE_STRUCT_STATVFS_F_MNTONNAME || defined WIN32
 
 				// BSD style statfs -- includes mount point, which is nice.
+#ifdef HAVE_STRUCT_STATVFS_F_MNTONNAME
+				struct statvfs s;
+				if(::statvfs(ploc->mPath.c_str(), &s) != 0)
+#else // HAVE_STRUCT_STATVFS_F_MNTONNAME
 				struct statfs s;
 				if(::statfs(ploc->mPath.c_str(), &s) != 0)
+#endif // HAVE_STRUCT_STATVFS_F_MNTONNAME
 				{
 					THROW_EXCEPTION(CommonException, OSFileError)
 				}

Modified: box/chris/general/configure.ac
===================================================================
--- box/chris/general/configure.ac	2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/configure.ac	2006-02-23 22:28:38 UTC (rev 497)
@@ -136,7 +136,13 @@
 AC_FUNC_ERROR_AT_LINE
 AC_TYPE_SIGNAL
 AC_FUNC_STAT
-AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle getpid])
+AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid])
+# NetBSD implements kqueue too differently for us to get it fixed by 0.10
+# TODO: Remove this when NetBSD kqueue implementation is working
+netbsd_hack=`echo $target_os | sed 's/netbsd.*/netbsd/'`
+if test "$netbsd_hack" != "netbsd"; then
+  AC_CHECK_FUNCS([kqueue])
+fi
 AX_FUNC_SYSCALL
 AX_CHECK_SYSCALL_LSEEK
 AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr])

Modified: box/chris/general/distribution/boxbackup/LINUX.txt
===================================================================
--- box/chris/general/distribution/boxbackup/LINUX.txt	2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/distribution/boxbackup/LINUX.txt	2006-02-23 22:28:38 UTC (rev 497)
@@ -11,12 +11,14 @@
 Require zlib and openssl headers for compilation -- may not be included when
 installing the packages. (libssl-dev + libz-dev packages under debian)
 
-Bekerley DB v1 support is required. The configure script should find an
+Bekerley DB v1 or v4 support is required. The configure script should find an
 appropriate db package -- and if not, use an in-memory version of the code.
 However, the in-memory version is not desirable as it will lose information
 over restarts of the daemon.
 
-Ideally, include the readline headers -- libreadline4-dev, probably.
+Ideally, use libeditline as a readline replacement. If not available then use
+GNU readline (libreadline4-dev, probably) and pass --enable-gnu-readline to
+./configure.
 
 
 

Modified: box/chris/general/distribution/boxbackup/contrib/rpm/boxbackup.spec
===================================================================
--- box/chris/general/distribution/boxbackup/contrib/rpm/boxbackup.spec	2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/distribution/boxbackup/contrib/rpm/boxbackup.spec	2006-02-23 22:28:38 UTC (rev 497)
@@ -104,7 +104,7 @@
 %if %{is_suse}
 ln -s ../../%{init_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}/rcbbackupd
 %endif
-%define client_dir parcels/%{ident}-backup-client-Linux
+%define client_dir parcels/%{ident}-backup-client-linux-gnu
 install %{client_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}
 install %{client_dir}/bbackupquery $RPM_BUILD_ROOT%{_sbindir}
 install %{client_dir}/bbackupctl $RPM_BUILD_ROOT%{_sbindir}
@@ -117,7 +117,7 @@
 %if %{is_suse}
 ln -s ../../%{init_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}/rcbbstored
 %endif
-%define server_dir parcels/%{ident}-backup-server-Linux
+%define server_dir parcels/%{ident}-backup-server-linux-gnu
 install %{server_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_sbindir}
 install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_bindir}

Modified: box/chris/general/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/chris/general/infrastructure/BoxPlatform.pm.in	2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/infrastructure/BoxPlatform.pm.in	2006-02-23 22:28:38 UTC (rev 497)
@@ -34,6 +34,27 @@
 	$product_name = <VERSION>;
 	chomp $product_name;
 	close VERSION;
+	if($product_version eq 'USE_SVN_VERSION')
+	{
+		# for developers, use SVN version
+		my $svnversion = `svnversion .`;
+		chomp $svnversion;
+		$svnversion =~ tr/0-9A-Za-z/_/c;
+		open INFO,'svn info . |';
+		my $svnurl;
+		while(<INFO>)
+		{
+			if(m/^URL: (.+?)[\n\r]+/)
+			{
+				$svnurl = $1
+			}
+		}
+		close INFO;
+		$svnurl =~ m!box/(.+)$!;
+		my $svndir = $1;
+		$svndir =~ tr/0-9A-Za-z/_/c;
+		$product_version = $svndir.'_'.$svnversion;
+	}
 
 	# where to put the files
 	$install_into_dir = '@bindir_expanded@';

Modified: box/chris/general/infrastructure/m4/ax_check_mount_point.m4
===================================================================
--- box/chris/general/infrastructure/m4/ax_check_mount_point.m4	2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/infrastructure/m4/ax_check_mount_point.m4	2006-02-23 22:28:38 UTC (rev 497)
@@ -10,6 +10,7 @@
 dnl HAVE_STRUCT_MNTENT_MNT_DIR
 dnl HAVE_STRUCT_MNTTAB_MNT_MOUNTP
 dnl HAVE_STRUCT_STATFS_F_MNTONNAME
+dnl HAVE_STRUCT_STATVFS_F_MNTONNAME
 dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
 dnl
 dnl @category C
@@ -33,6 +34,13 @@
     #endif
     #include <sys/mount.h>
     ]])
+  # NetBSD
+  AC_CHECK_MEMBERS([struct statvfs.f_mntonname],,, [[
+    #ifdef HAVE_SYS_PARAM_H
+      #include <sys/param.h>
+    #endif
+    #include <sys/mount.h>
+    ]])
   # Linux
   AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])
   # Solaris
@@ -41,6 +49,7 @@
     #include <sys/mnttab.h>
     ]])
   if test "x$ac_cv_member_struct_statfs_f_mntonname" = "xyes" || \
+     test "x$ac_cv_member_struct_statvfs_f_mntonname" = "xyes" || \
      test "x$ac_cv_member_struct_mntent_mnt_dir" = "xyes" || \
      test "x$ac_cv_member_struct_mnttab_mnt_mountp" = "xyes"
   then

Modified: box/chris/general/infrastructure/msvc/2005/boxbackup.suo
===================================================================
(Binary files differ)


From boxbackup-dev@fluffy.co.uk  Thu Feb 23 23:01:49 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Thu, 23 Feb 2006 23:01:49 +0000
Subject: [Box Backup-dev] And 0.10 is out.
Message-ID: <2BDC2F9B-33E1-415D-822F-980E09B41AA4@fluffy.co.uk>

Thanks everyone! You've all made it a far better system.


Now, moving forward...

* I'd like to split into two branches. One is aimed at 0.11, which is  
a release to get Windows support working nicely, and the other aimed  
at 0.20.

* Clean up SVN. Let's delete the <username> directories now, there  
isn't anything useful there. Chris has started the first branch at  
chris/general. Maybe we should copy trunk@497 for the new features,  
and let Chris take over trunk?

* We need to agree the license. I'll send an email with a proposal  
shortly.

* I'd like the next release, 0.20, to have some big improvements to  
the functionality, enough to justify the leap to 0.20. The most  
important will add some extra crypto stuff, an improved and more  
resiliant store, and a shiny new way of going back in time for a  
restore. I'd like to get working on the designs on the wiki, and will  
try and type up some docs over the weekend for your comments.


Once again, thank you for all your hard work. This new release would  
not have happened without you.

Ben




From boxbackup-dev@fluffy.co.uk  Fri Feb 24 12:31:02 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 24 Feb 2006 12:31:02 +0000
Subject: [Box Backup-dev] And 0.10 is out.
Message-ID: <E5F3C4CB-97D0-4766-A837-FCAE6315F35F@fluffy.co.uk>

Thanks everyone! You've all made it a far better system.


Now, moving forward...

* I'd like to split into two branches. One is aimed at 0.11, which is  
a release to get Windows support working nicely, and the other aimed  
at 0.20.

* Clean up SVN. Let's delete the <username> directories now, there  
isn't anything useful there. Chris has started the first branch at  
chris/general. Maybe we should copy trunk@497 for the new features,  
and let Chris take over trunk?

* We need to agree the license. I'll send an email with a proposal  
shortly.

* I'd like the next release, 0.20, to have some big improvements to  
the functionality, enough to justify the leap to 0.20. The most  
important will add some extra crypto stuff, an improved and more  
resiliant store, and a shiny new way of going back in time for a  
restore. I'd like to get working on the designs on the wiki, and will  
try and type up some docs over the weekend for your comments.


Once again, thank you for all your hard work. This new release would  
not have happened without you.

Ben




From boxbackup-dev@fluffy.co.uk  Fri Feb 24 12:35:40 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Fri, 24 Feb 2006 12:35:40 +0000
Subject: [Box Backup-dev] Makefile.extra?
Message-ID: <43FEFD9C.6000407@netinertia.co.uk>

I'm updating the FreeBSD port to 0.10, and to use the autoconf magic.

I'm trying to make it PREFIX-clean as much as possible, so I'm patching
some files that include hard-coded perl paths, or just the word "perl"
(i.e. changing "/usr/local/bin/perl", "/usr/bin/perl" or "perl" to
${PERL}). (If I don't do this, then it could break on the FreeBSD
package build cluster.)

When doing a 'grep -r "perl " *', I see a lot of Makefile.extras that
say "perl $(something)" - so:

a) Is Makefile.extra automatically generated? If so, which file should I
patch to change "perl" to ${PERL}?
b) If they're not automatically generated, is it safe to just patch all
these files?

James


From boxbackup-dev@fluffy.co.uk  Fri Feb 24 12:38:18 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 24 Feb 2006 12:38:18 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <43FEFD9C.6000407@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>
Message-ID: <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>

On 24 Feb 2006, at 12:35, James O'Gorman wrote:

> I'm updating the FreeBSD port to 0.10, and to use the autoconf magic.
>
> I'm trying to make it PREFIX-clean as much as possible, so I'm  
> patching
> some files that include hard-coded perl paths, or just the word "perl"
> (i.e. changing "/usr/local/bin/perl", "/usr/bin/perl" or "perl" to
> ${PERL}). (If I don't do this, then it could break on the FreeBSD
> package build cluster.)
>
> When doing a 'grep -r "perl " *', I see a lot of Makefile.extras that
> say "perl $(something)" - so:
>
> a) Is Makefile.extra automatically generated? If so, which file  
> should I
> patch to change "perl" to ${PERL}?

No, it's part of the distribution.


> b) If they're not automatically generated, is it safe to just patch  
> all
> these files?

Yes.

What should we do for the next release to tidy this up?

Ben





From boxbackup-dev@fluffy.co.uk  Fri Feb 24 12:46:31 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Fri, 24 Feb 2006 12:46:31 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk> <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>
Message-ID: <43FF0027.60108@netinertia.co.uk>

Ben Summers wrote:
> 
> On 24 Feb 2006, at 12:35, James O'Gorman wrote:
>> a) Is Makefile.extra automatically generated? If so, which file should I
>> patch to change "perl" to ${PERL}?
> 
> No, it's part of the distribution.

OK, thanks.

>> b) If they're not automatically generated, is it safe to just patch all
>> these files?
> 
> Yes.
> 
> What should we do for the next release to tidy this up?

One thing I did notice was some inconsistency - sometimes "perl" was 
used, sometimes "/usr/bin/perl", sometimes "/usr/local/bin/perl".

I think on the whole, /usr/bin/perl is the safest to use, but either way 
I am still required to make the FreeBSD port "PREFIX-clean" if possible. 
So if someone decided to put perl in an obscure place, they can change 
their PREFIX and PERL variables in /etc/make.conf and in theory the port 
should respect that. The pointyhat build cluster tends to moan if files 
are installed outside of PREFIX, which means I get emails from portmgr 
telling me to fix it :-)

Does OpenBSD include perl in the base system? FreeBSD used to, but it is 
now a port, but it creates a symlink from /usr/local/bin/perl (or 
wherever perl was installed) to /usr/bin/perl.

I'm pretty sure most/all Linux distros install perl to /usr/bin/perl too?

James

From boxbackup-dev@fluffy.co.uk  Fri Feb 24 12:55:08 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 24 Feb 2006 12:55:08 +0000
Subject: [Box Backup-dev] Licensing issues
Message-ID: <E9B27928-D6D3-4E40-8038-3F0CD87ED0A8@fluffy.co.uk>

We never came to a conclusion about this, but now is the time to  
decide it once and for all.

I propose that the project stays with the BSD license (possibly even  
dropping the advertising clause). This is for my own self-interest,  
as I would like to be able to pull back changes for my own use.


In this case, I will contribute the following code to the project:

* Generic database interface, with drivers for sqlite, MySQL and  
Postgres: abstracts differences in APIs and SQL, makes queries a  
couple of lines of code. Autogeneration of query objects can be used  
to make type safe and nicely named results in your own.

* SMTP client: might be handy for sending alerts without hacking  
around with scripts.

* Web app framework: perl and C++ combine to generate standalone HTTP  
server web apps. All the boring stuff is done for you, leaving just  
the business logic. Templating and i18n done nicely. A bit of a  
"first go proof of concept" -- I would really want to make a lot of  
changes -- but good enough for doing commercial web sites and lovely  
for writing web apps which talk to Box * components.

These components would need autoconfing, but it should be little more  
than just changing the #defines (if any). They all basically rely on  
the lower level libraries, which have all been done nicely.


In addition, Charles L is keen to work on the Win32 side of things,  
but would need to contribute some code from his libraries to do this  
effectively. From my discussions with him, I think he requires a BSD  
license for much the same reason as I do. Hopefully he'll follow up  
with details.


As a compromise between those who want to use the GPL to protect  
themselves from people ripping off their code, I would be happy for  
the basic libraries to be BSD, but the Box Backup engine to become  
GPL. (To clarify, I mean the code in lib/backup*, bin/bb*). This will  
require a bit of work to separate out, but not a huge amount as the  
framework supports building stuff outside the main tree. Although the  
release packaging will have to be redone a bit to combine everything  
together.


I don't mean to impose my view onto anyone. I do realise that this  
latest release wouldn't have happened without all the other  
developers, and I would very much like to see the project continued  
by us all as a team. I just feel that unless something is laid down  
like this, we're just going to discuss it and never come up with  
anything.

I am more than happy to discuss this offlist with anyone, but would  
like conclusions to be posted here on -dev, and resolved quickly.

Many thanks,

Ben



From boxbackup-dev@fluffy.co.uk  Fri Feb 24 13:01:36 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 24 Feb 2006 13:01:36 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <43FF0027.60108@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk> <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk> <43FF0027.60108@netinertia.co.uk>
Message-ID: <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>

On 24 Feb 2006, at 12:46, James O'Gorman wrote:

> Ben Summers wrote:
>>> b) If they're not automatically generated, is it safe to just  
>>> patch all
>>> these files?
>> Yes.
>> What should we do for the next release to tidy this up?
>
> One thing I did notice was some inconsistency - sometimes "perl"  
> was used, sometimes "/usr/bin/perl", sometimes "/usr/local/bin/perl".

Probably a result of lots of different people touching it! Although  
there shouldn't be a /usr/local/bin/perl there.

>
> I think on the whole, /usr/bin/perl is the safest to use, but  
> either way I am still required to make the FreeBSD port "PREFIX- 
> clean" if possible. So if someone decided to put perl in an obscure  
> place, they can change their PREFIX and PERL variables in /etc/ 
> make.conf and in theory the port should respect that. The pointyhat  
> build cluster tends to moan if files are installed outside of  
> PREFIX, which means I get emails from portmgr telling me to fix it :-)
>
> Does OpenBSD include perl in the base system?

Yes. And I think it will stay that way, because the ports system  
requires it.


> FreeBSD used to, but it is now a port, but it creates a symlink  
> from /usr/local/bin/perl (or wherever perl was installed) to /usr/ 
> bin/perl.
>
> I'm pretty sure most/all Linux distros install perl to /usr/bin/ 
> perl too?

Sounds like the best thing to do is to autoconf it, and use  
Makefile.extra.in instead, which allows the prefix to be included.  
Then change all the C++ to use a #define for the location too.

Are you up for doing that? I know it won't help your current porting  
work, but would make it easier for next time.

Ben





From boxbackup-dev@fluffy.co.uk  Fri Feb 24 13:07:58 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Fri, 24 Feb 2006 13:07:58 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <43FF0027.60108@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>
 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>
 <43FF0027.60108@netinertia.co.uk>
Message-ID: <1140786478.5011.7.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-24 at 12:46 +0000, James O'Gorman wrote:
> I'm pretty sure most/all Linux distros install perl to /usr/bin/perl too?

Yes. Given it's so fundamental to so many things it would seem odd to
put it anywhere else. :)

The Linux Standards Base essentially says that /usr is for stuff
compiled by distributors, /usr/local by users, and /opt for third party
ISVs. Most people take that to mean anything properly packaged goes
in /usr, anything make install goes in /usr/local, and commercial binary
things not properly packaged go in /opt. For once a standards
organisation doing something sensible. :)

PREFIX clean is good though, and I'd be interested in taking any fixes
back into mainline.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Fri Feb 24 13:16:10 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Fri, 24 Feb 2006 13:16:10 +0000
Subject: [Box Backup-dev] Re: [Box Backup] Version 0.10 released
In-Reply-To: <C176B28B-C821-4BDF-B957-1CA078766725@fluffy.co.uk>
References: <C176B28B-C821-4BDF-B957-1CA078766725@fluffy.co.uk>
Message-ID: <1140786970.5454.0.camel@avenin.ebourne.me.uk>

[repost]

On Thu, 2006-02-23 at 22:45 +0000, Ben Summers wrote:
> The Box Backup developers have just released Box Backup 0.10.
> 
>     http://www.fluffy.co.uk/boxbackup/

Grand!

I've updated the wiki documentation for autoconf and other bits I found.
I think someone still needs to add how to configure the new features
(eg. keepalive).

Since the documentation on the main site is no longer up to date maybe
it should be removed?

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Fri Feb 24 13:27:07 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Fri, 24 Feb 2006 13:27:07 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk> <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk> <43FF0027.60108@netinertia.co.uk> <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
Message-ID: <43FF09AB.4080108@netinertia.co.uk>

Ben Summers wrote:
> 
> On 24 Feb 2006, at 12:46, James O'Gorman wrote:
> 
>> Ben Summers wrote:
>>>> b) If they're not automatically generated, is it safe to just patch all
>>>> these files?
>>> Yes.
>>> What should we do for the next release to tidy this up?
>>
>> One thing I did notice was some inconsistency - sometimes "perl" was 
>> used, sometimes "/usr/bin/perl", sometimes "/usr/local/bin/perl".
> 
> Probably a result of lots of different people touching it! Although 
> there shouldn't be a /usr/local/bin/perl there.

You're right - I must've run the grep after I'd already patched some 
things without realising.

> Sounds like the best thing to do is to autoconf it, and use 
> Makefile.extra.in instead, which allows the prefix to be included. Then 
> change all the C++ to use a #define for the location too.
> 
> Are you up for doing that? I know it won't help your current porting 
> work, but would make it easier for next time.

I can certainly give it a go!

FreeBSD is in a ports freeze at the moment anyway (preparing for 5.5/6.1 
releases) so my updates wouldn't go in for at least a month, which gives 
me time to look at doing this.

James

From boxbackup-dev@fluffy.co.uk  Fri Feb 24 13:29:21 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Fri, 24 Feb 2006 14:29:21 +0100
Subject: [Box Backup-dev] Problems with command line parsing in bbackupctl when using the force-sync
 option [Chris version of Box Backup]
Message-ID: <43FF0A31.9010207@hostingbrothers.nl>

When I execute bbackupctl on Windows XP with the sync option, everything 
works fine, but when I use the force-sync option I get an acces 
violation which I could trace back to the code in emu.h.

The function getopt(..) parses the first command line option -c perfect, 
but when it needs to parse the next option (which isn't there!) it fails 
at the instruction str = args[optind]; on line 225. This is because 
args[4] doesn't exist (it's a null pointer).

I think this problem is caused by the fact that the command line is 
searched for combinations of - and a letter, which goes wrong with 
force-sync, because there is a dash in it too.

Maybe I am wrong, but I do know that I can't do a force sync rigth now, 
and I don't know what to fix.

Does anybody know a fix for this problem?

Mark

From boxbackup-dev@fluffy.co.uk  Fri Feb 24 13:31:23 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Fri, 24 Feb 2006 13:31:23 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <1140786478.5011.7.camel@avenin.ebourne.me.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>	 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>	 <43FF0027.60108@netinertia.co.uk> <1140786478.5011.7.camel@avenin.ebourne.me.uk>
Message-ID: <43FF0AAB.8010307@netinertia.co.uk>

Martin Ebourne wrote:
> On Fri, 2006-02-24 at 12:46 +0000, James O'Gorman wrote:
>> I'm pretty sure most/all Linux distros install perl to /usr/bin/perl too?
> 
> Yes. Given it's so fundamental to so many things it would seem odd to
> put it anywhere else. :)

Yes, I did think that. I have seen some people posting on the FreeBSD 
lists though who like to do strange things like change PREFIX to 
/opt/$PORTNAME

> The Linux Standards Base essentially says that /usr is for stuff
> compiled by distributors, /usr/local by users, and /opt for third party
> ISVs. Most people take that to mean anything properly packaged goes
> in /usr, anything make install goes in /usr/local, and commercial binary
> things not properly packaged go in /opt. For once a standards
> organisation doing something sensible. :)

Ah, right, OK.

> PREFIX clean is good though, and I'd be interested in taking any fixes
> back into mainline.

My current "fixes" basically replace /usr/bin/perl or perl with ${PERL} 
- the ports infrastructure then replaces that with whatever the make 
PERL variable is set to (bsd.port.mk sets it to /usr/local/bin/perl by 
default).

Ben's suggestion of autoconfing it seems good though.

James

From boxbackup-dev@fluffy.co.uk  Fri Feb 24 13:39:06 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 24 Feb 2006 13:39:06 +0000
Subject: [Box Backup-dev] RC 3 testing: NetBSD 3.0 fails
In-Reply-To: <43FC0F4A.9030703@reedtz.com>
References: <20060221161914.f6q2fwnm88skkocc@ebourne.me.uk>	<43FB4E38.1000501@reedtz.com> <20060221175243.eg1kaycnk0wkkcsg@ebourne.me.uk> <43FB5653.3020306@reedtz.com> <88467BBA-BF6E-471E-83F4-839634744788@fluffy.co.uk> <43FB5A00.4010108@reedtz.com> <43FB5EDA.8050105@reedtz.com> <D1FEB768-5B0B-4F8F-B7F2-F60B47B3B7D5@fluffy.co.uk> <43FB69A1.5070704@reedtz.com> <43FBF7A4.7020102@reedtz.com> <0CE6F814-EC4F-4507-BC8D-35A52AD1E597@fluffy.co.uk> <43FC0F4A.9030703@reedtz.com>
Message-ID: <F24260D9-C9A5-423F-A4C5-730B461ADD06@fluffy.co.uk>

On 22 Feb 2006, at 07:14, Per Thomsen wrote:

> On 2/21/06 10:56 PM, Ben Summers wrote:
>>
>> On 22 Feb 2006, at 05:33, Per Thomsen wrote:
>>
>>> On 2/21/06 11:27 AM, Per Thomsen wrote:
>>>> On 2/21/06 10:48 AM, Ben Summers wrote:
>>>>
>>>>> On 21 Feb 2006, at 18:41, Per Thomsen wrote:
>>>>>
>>>>>> When run individually, backupstorepatch passed (problem appeared
>>>>>> to be a
>>>>>> non-dying bbstored from a previous test).
>>>>>>
>>>>>>
>>>>>> The bbackupd test, when run exits at this point in the test:
>>>>>>
>>>>>> [ 0 (of 0) differences probably due to file modifications after
>>>>>> the last
>>>>>> upload ]
>>>>>> Differences: 0 (0 dirs excluded, 0 files excluded)
>>>>>> ..
>>>>>> Add files with current time
>>>>>> --------
>>>>>> bbackupd: Add files with current time
>>>>>>
>>>>>>
>>>>>> I can't find a core file anywhere. I am re-running the test now.
>>>>>>
>>>> Here are the results (same as with HAVE_KQUEUE):
>>>>
>>>> : {240} grep -A 3 -B 3 FAIL debug-bbackupd-2.out
>>>> [ 11 (of 12) differences probably due to file modifications  
>>>> after the
>>>> last upload ]
>>>> Differences: 12 (3 dirs excluded, 4 files excluded)
>>>>
>>>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>>>> testbbackupd.cpp(837)
>>>> Rename directory
>>>> waiting: ............Local file 'testfiles/TestDir1/apropos'  
>>>> exists,
>>>> but
>>>> store file '/Test1/apropos' does not exist.
>>>> (the file above was modified after the last sync time -- might be
>>>> reason
>>>> for difference)
>>>> -- 
>>>> [ 5 (of 10) differences probably due to file modifications after  
>>>> the
>>>> last upload ]
>>>> Differences: 10 (3 dirs excluded, 4 files excluded)
>>>>
>>>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>>>> testbbackupd.cpp(845)
>>>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>>>> testbbackupd.cpp(849)
>>>> Rename files
>>>> waiting: ............Local file 'testfiles/TestDir1/ 
>>>> continousupdate'
>>>> does not exist, but store file '/Test1/continousupdate' does.
>>>> Local file 'testfiles/TestDir1/df324' does not exist, but store  
>>>> file
>>>> '/Test1/df324' does.
>>>> -- 
>>>> [ 9 (of 16) differences probably due to file modifications after  
>>>> the
>>>> last upload ]
>>>> Differences: 16 (3 dirs excluded, 4 files excluded)
>>>>
>>>> FAILURE: Condition [compareReturnValue == 1*256] failed at
>>>> testbbackupd.cpp(859)
>>>> Create a file with timestamp to way ahead in the future
>>>> waiting: ............
>>>> [ 0 (of 0) differences probably due to file modifications after the
>>>> last
>>>> upload ]
>>>> -- 
>>>> 00000052 -d---- 1970-01-01T00:00:00 0000000000000000
>>>> Test1/renamed-dir/dsfsfdslkjfkdsjf
>>>> 00000053 f----- 2006-02-21T11:23:27 6c56ee3b9bb9e1e8
>>>> Test1/fileaftermarker
>>>>
>>>> FAILED: 4 tests failed
>>>> --------
>>>> bbackupd: FAILED: 4 tests failed
>>>>
>>>>
>>> The bbackupquery return code is 512, and not 256, in every  
>>> failure. I
>>> will debug this, but is there a key to the return codes?
>>
>>
>> In bbackupquery, type "help compare", which includes:
>>
>>     If -c is set, then the return code (if quit is the next command)
>> will be
>>         1    Comparison was exact
>>         2    Differences were found
>>         3    An error occured
>>     This can be used for automated tests.
>>
>> Not the obvious location for the info!
>>
>>>
>>> I ran the bbackupd tests in release mode, just for laughs, and  
>>> all tests
>>> pass, and the return code from bbackupquery is 256 in the tests that
>>> failed in debug mode.
>>
>> I'm wondering if it's just a timing issue. There isn't enough context
>> in your listing to tell, though, as you miss out the bit which says
>> what it was doing at the time.
> The first failing debug test in bbackupd is "Add files with current
> time",  then "Rename directory" (2 FAILUREs), and finally "Rename
> files". I have attached the output.

Since ones after this are working, this means it just took a bit  
longer than expected to do it's magic.

I hate timing sensitive tests, but you can either have them being a  
bit annoying sometimes or taking hours to run.

Ben





From boxbackup-dev@fluffy.co.uk  Fri Feb 24 14:03:31 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Fri, 24 Feb 2006 15:03:31 +0100
Subject: [Box Backup-dev] Problems with command line parsing in getopt(..)
Message-ID: <43FF1233.80007@hostingbrothers.nl>

I think I've found a possible problem in the function getopt(..) in emu.h:

do
    {
        if (index != -1)
        {
            str = str.substr(index+1, str.size());
        }

        index = (int)str.find('-');

        if (index == -1) return -1;

        opt = str[1];

        optind ++;
        str = args[optind];
    }
    while ((opttolookfor = (int)interestin.find(opt)) == -1);  

Shouldn't there be a check in this while loop to ensure (optind < 
count), just like the check done at the start of the function?

From boxbackup-dev@fluffy.co.uk  Fri Feb 24 14:37:35 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 24 Feb 2006 14:37:35 +0000
Subject: [Box Backup-dev] Future work
Message-ID: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>

I have written up some notes about how I'd like to see the project  
develop:

    http://boxbackup.hostworks.ca/index.php/0.20_redesign

Comments welcomed!


Also, there's a mini-project suitable for one developer to do  
independently of everything else, making the raidfile support better  
and efficient in a cluster of three store servers:

   http://boxbackup.hostworks.ca/index.php/Raidfile_improvements

Anyone up for it?

Ben






From boxbackup-dev@fluffy.co.uk  Fri Feb 24 15:26:23 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Fri, 24 Feb 2006 15:26:23 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk> <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk> <43FF0027.60108@netinertia.co.uk> <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
Message-ID: <43FF259F.5000006@netinertia.co.uk>

This is a multi-part message in MIME format.
--------------010505050207080600070503
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ben Summers wrote:
> Sounds like the best thing to do is to autoconf it, and use 
> Makefile.extra.in instead, which allows the prefix to be included. Then 
> change all the C++ to use a #define for the location too.
> 
> Are you up for doing that? I know it won't help your current porting 
> work, but would make it easier for next time.

Well, here's my first effort. I'm sure Martin will want to take a look 
at this, as it's my first attempt at autoconf-foo! It's a fairly hefty 
patch as it renames a lot of files...

James

--------------010505050207080600070503
Content-Type: application/x-gzip; x-mac-type="0"; x-mac-creator="0";
 name="patch-ac-perl.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="patch-ac-perl.gz"

[encoded data, 66941 characters]
Vp8EAA==
--------------010505050207080600070503--

From boxbackup-dev@fluffy.co.uk  Fri Feb 24 15:48:09 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Fri, 24 Feb 2006 15:48:09 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <43FF259F.5000006@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>
 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>
 <43FF0027.60108@netinertia.co.uk>
 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
 <43FF259F.5000006@netinertia.co.uk>
Message-ID: <1140796089.5454.5.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-24 at 15:26 +0000, James O'Gorman wrote:
> Ben Summers wrote:
> > Sounds like the best thing to do is to autoconf it, and use 
> > Makefile.extra.in instead, which allows the prefix to be included. Then 
> > change all the C++ to use a #define for the location too.
> > 
> > Are you up for doing that? I know it won't help your current porting 
> > work, but would make it easier for next time.
> 
> Well, here's my first effort. I'm sure Martin will want to take a look 
> at this, as it's my first attempt at autoconf-foo! It's a fairly hefty 
> patch as it renames a lot of files...

Yes, unfortunately patch is pretty useless at that. It also makes it
near impossible to review.

Could you submit it instead as a series of file operations and then
diffs to the result?

ie.

mv Makefile.extra Makefile.extra.in
...

then a patch on top of that? Would make it much easier to follow, and
besides, that's how it'll have to be committed in svn anyway, or we
loose the history and make merging more awkward.

Regarding the configure.ac change - please use M4 quoting (ie. [])
following the rules in the autoconf info manual, or just follow the
style in the rest of the file. Also split lines at 80 characters or so.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Fri Feb 24 15:56:41 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 24 Feb 2006 15:56:41 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <43FF259F.5000006@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk> <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk> <43FF0027.60108@netinertia.co.uk> <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk> <43FF259F.5000006@netinertia.co.uk>
Message-ID: <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>

On 24 Feb 2006, at 15:26, James O'Gorman wrote:

> Ben Summers wrote:
>> Sounds like the best thing to do is to autoconf it, and use  
>> Makefile.extra.in instead, which allows the prefix to be included.  
>> Then change all the C++ to use a #define for the location too.
>> Are you up for doing that? I know it won't help your current  
>> porting work, but would make it easier for next time.
>
> Well, here's my first effort. I'm sure Martin will want to take a  
> look at this, as it's my first attempt at autoconf-foo! It's a  
> fairly hefty patch as it renames a lot of files...

My thoughts...

1) It's really nasty to use this for cpp files, because to make a  
change you've then got to ./configure again, which means a complete  
rebuild. There must be a way to get autoconf to put the path to perl  
in a #define, in which case you can use that instead.

2) There are lots of scripts which need parsing. Maybe it would be  
nicer to modify makebuildenv.pl to go through and modify the first  
line of every perl script?

3) Please work from an SVN checkout. Release files have the license  
prepended, and working from those makes merging more difficult. Also  
it means you can just do 'svn diff' to get the diff.

Ben






From boxbackup-dev@fluffy.co.uk  Fri Feb 24 17:17:12 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Fri, 24 Feb 2006 17:17:12 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk> <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk> <43FF0027.60108@netinertia.co.uk> <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk> <43FF259F.5000006@netinertia.co.uk> <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>
Message-ID: <43FF3F98.3070501@netinertia.co.uk>

Ben Summers wrote:
> My thoughts...
> 
> 1) It's really nasty to use this for cpp files, because to make a change 
> you've then got to ./configure again, which means a complete rebuild. 
> There must be a way to get autoconf to put the path to perl in a 
> #define, in which case you can use that instead.

I agree in principal, but maybe this is because my knowledge of compiled 
programs is slim, but what difference would it make to use a #define? 
You would still have to recompile wouldn't you? Excuse my ignorance if 
I'm completely missing the point here.

> 2) There are lots of scripts which need parsing. Maybe it would be nicer 
> to modify makebuildenv.pl to go through and modify the first line of 
> every perl script?

Yes, perhaps. I'll have a look at that.

> 3) Please work from an SVN checkout. Release files have the license 
> prepended, and working from those makes merging more difficult. Also it 
> means you can just do 'svn diff' to get the diff.

OK. Should I work from HEAD or from the 0.10 release? (In which case 
which revision is the release? That commit email seems to have 
disappeared into the ether since Alaric blew everything up...)

James

From boxbackup-dev@fluffy.co.uk  Fri Feb 24 17:24:44 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Fri, 24 Feb 2006 17:24:44 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <43FF3F98.3070501@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>
 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>
 <43FF0027.60108@netinertia.co.uk>
 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
 <43FF259F.5000006@netinertia.co.uk>
 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>
 <43FF3F98.3070501@netinertia.co.uk>
Message-ID: <1140801885.5454.10.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-24 at 17:17 +0000, James O'Gorman wrote:
> I agree in principal, but maybe this is because my knowledge of compiled 
> programs is slim, but what difference would it make to use a #define? 
> You would still have to recompile wouldn't you? Excuse my ignorance if 
> I'm completely missing the point here.

Ben's right, you never pass C source code through autoconf. We've got
dozens of autoconf macros already and they're all #defines of course.

The issue isn't about recompiling, it's about making changes. Autoconf
only substitutes in files when you run configure. You really aren't
going to do that after every change to a source file!

> OK. Should I work from HEAD or from the 0.10 release? (In which case 
> which revision is the release? That commit email seems to have 
> disappeared into the ether since Alaric blew everything up...)

Make the change to a checkout of the latest trunk. We can always merge
it back to a branch for 0.10 if needed.

Don't use svn diff by itself in this one case though. As I said before,
the diffs aren't really useable. Give the list of mv commands, then the
diffs of just the changes on top of that.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Fri Feb 24 18:34:02 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Fri, 24 Feb 2006 18:34:02 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <1140801885.5454.10.camel@avenin.ebourne.me.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>	 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>	 <43FF0027.60108@netinertia.co.uk>	 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>	 <43FF259F.5000006@netinertia.co.uk>	 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>	 <43FF3F98.3070501@netinertia.co.uk> <1140801885.5454.10.camel@avenin.ebourne.me.uk>
Message-ID: <43FF519A.8020104@netinertia.co.uk>

This is a multi-part message in MIME format.
--------------000308010903010407020400
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Martin Ebourne wrote:
> On Fri, 2006-02-24 at 17:17 +0000, James O'Gorman wrote:
>> I agree in principal, but maybe this is because my knowledge of compiled 
>> programs is slim, but what difference would it make to use a #define? 
>> You would still have to recompile wouldn't you? Excuse my ignorance if 
>> I'm completely missing the point here.
> 
> Ben's right, you never pass C source code through autoconf. We've got
> dozens of autoconf macros already and they're all #defines of course.

OK. I'll need someone's help with that then. I'm assuming C++ doesn't 
let you do "easy" string concatenation like Perl.

> The issue isn't about recompiling, it's about making changes. Autoconf
> only substitutes in files when you run configure. You really aren't
> going to do that after every change to a source file!

Right, got it.

>> OK. Should I work from HEAD or from the 0.10 release? (In which case 
>> which revision is the release? That commit email seems to have 
>> disappeared into the ether since Alaric blew everything up...)
> 
> Make the change to a checkout of the latest trunk. We can always merge
> it back to a branch for 0.10 if needed.
> 
> Don't use svn diff by itself in this one case though. As I said before,
> the diffs aren't really useable. Give the list of mv commands, then the
> diffs of just the changes on top of that.

Well I made the changes to my svn working copy, but for some reason 'svn 
diff .' only showed the changes to configure.ac. Maybe I did something 
wrong. svn status did show that I had renamed a load of files though.

I've attached a tar/gzip archive that has a shell script to rename the 
necessary files, and a directory with the individual patches I created 
with diff (not svn diff). I've also attached the single diff I got from 
svn diff for configure.ac.

Is the svn diff the preferable format? If so I'll see what's going on 
with that and submit a new set of patches.

James

--------------000308010903010407020400
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
 name="perl-patch-configure.ac"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="perl-patch-configure.ac"

Index: configure.ac
===================================================================
--- configure.ac	(revision 503)
+++ configure.ac	(working copy)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([Box Backup], 0.09, [box@fluffy.co.uk])
+AC_INIT([Box Backup], 0.10, [box@fluffy.co.uk])
 AC_CONFIG_SRCDIR([lib/common/Box.h])
 AC_CONFIG_HEADERS([lib/common/BoxConfig.h])
 
@@ -26,6 +26,8 @@
   # Use -rdynamic if we have gcc. This is needed for backtrace
   AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic'])
 fi
+AC_PROG_PATH([PERL], [perl], [/usr/bin/perl])
+AC_SUBST([PERL])
 
 
 ### Checks for libraries.
@@ -76,6 +78,8 @@
 if test "$target_os" != "mingw32"; then
   AC_HEADER_DIRENT
 fi
+AC_PROG_PATH([PERL], [perl], [/usr/bin/perl])
+AC_SUBST([PERL])
 
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
@@ -203,7 +207,25 @@
 
 
 ### Output files
-AC_CONFIG_FILES([infrastructure/BoxPlatform.pm])
+AC_CONFIG_FILES([infrastructure/BoxPlatform.pm bin/bbackupd/bbackupd-config.in
+		 bin/bbackupquery/Makefile.extra.in
+		 bin/bbackupquery/makedocumentation.pl.in
+		 bin/bbstored/Makefile.extra.in bin/bbstored/bbstored-certs.in
+		 bin/bbstored/bbstored-config.in
+		 contrib/cygwin/install-cygwin-service.pl.in
+		 infrastructure/makebuildenv.pl.in
+		 infrastructure/makeparcels.pl.in
+		 lib/backupclient/Makefile.extra.in
+		 lib/common/Makefile.extra.in lib/common/makeexception.pl.in
+		 lib/compress/Makefile.extra.in lib/crypto/Makefile.extra.in
+		 lib/raidfile/Makefile.extra.in lib/raidfile/raidfile-config.in
+		 lib/server/Makefile.extra.in lib/server/makeprotocol.pl.in
+		 test/backupstorefix/testfiles/testbackupstorefix.pl.in
+		 test/backupstorefix/testbackupstorefix.cpp.in
+		 test/basicserver/Makefile.extra.in
+		 test/bbackupd/testfiles/extcheck2.pl.in
+		 test/bbackupd/testfiles/extcheck1.pl.in
+		 test/bbackupd/testfiles/notifyscript.pl.in runtest.pl.in])
 AC_OUTPUT
 
 # Configure the Box build system

--------------000308010903010407020400
Content-Type: application/x-gzip; x-mac-type="0"; x-mac-creator="0";
 name="perl-ac-patches.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="perl-ac-patches.tar.gz"

[encoded data, 4964 characters]
SSWVVFJJJZVUUkkllRSn/wMuLrM4AKAAAA==
--------------000308010903010407020400--

From boxbackup-dev@fluffy.co.uk  Fri Feb 24 18:57:09 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Fri, 24 Feb 2006 18:57:09 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <43FF519A.8020104@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>	 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>	 <43FF0027.60108@netinertia.co.uk>	 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>	 <43FF259F.5000006@netinertia.co.uk>	 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>	 <43FF3F98.3070501@netinertia.co.uk> <1140801885.5454.10.camel@avenin.ebourne.me.uk> <43FF519A.8020104@netinertia.co.uk>
Message-ID: <475E02A3-E790-480C-BABD-39FA758FD5F5@fluffy.co.uk>

On 24 Feb 2006, at 18:34, James O'Gorman wrote:

> Martin Ebourne wrote:
>> On Fri, 2006-02-24 at 17:17 +0000, James O'Gorman wrote:
>>> I agree in principal, but maybe this is because my knowledge of  
>>> compiled programs is slim, but what difference would it make to  
>>> use a #define? You would still have to recompile wouldn't you?  
>>> Excuse my ignorance if I'm completely missing the point here.
>> Ben's right, you never pass C source code through autoconf. We've got
>> dozens of autoconf macros already and they're all #defines of course.
>
> OK. I'll need someone's help with that then. I'm assuming C++  
> doesn't let you do "easy" string concatenation like Perl.

If you have

   #define PERL_EXECUTABLE "/usr/bin/perl"

and you want to change the string constant

   "perl somescript.pl args"

to use it, you would use

   PERL_EXECUTABLE " somescript.pl args"

This should fit all of the cases in the code, which is restricted to  
the test environment anyway. The runtime does not require perl,  
except to configure it.

Ben






From boxbackup-dev@fluffy.co.uk  Sat Feb 25 12:34:49 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 25 Feb 2006 12:34:49 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <43FF519A.8020104@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>
 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>
 <43FF0027.60108@netinertia.co.uk>
 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
 <43FF259F.5000006@netinertia.co.uk>
 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>
 <43FF3F98.3070501@netinertia.co.uk>
 <1140801885.5454.10.camel@avenin.ebourne.me.uk>
 <43FF519A.8020104@netinertia.co.uk>
Message-ID: <1140870889.5454.17.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-24 at 18:34 +0000, James O'Gorman wrote:
> Well I made the changes to my svn working copy, but for some reason 'svn 
> diff .' only showed the changes to configure.ac. Maybe I did something 
> wrong. svn status did show that I had renamed a load of files though.

That's odd, because the diffs appear to have been taken from the
released version, not the svn version. They've all got the copyright
notices in, which will break the diffs.

> I've attached a tar/gzip archive that has a shell script to rename the 
> necessary files, and a directory with the individual patches I created 
> with diff (not svn diff). I've also attached the single diff I got from 
> svn diff for configure.ac.
> 
> Is the svn diff the preferable format? If so I'll see what's going on 
> with that and submit a new set of patches.

How you've submitted them this time is fine. It should be quite easy to
get them in from that. Just need the C++ stuff fixed, and to be done
from the svn working copy.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 13:11:41 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 25 Feb 2006 13:11:41 +0000
Subject: [Box Backup-dev] Future work
In-Reply-To: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>
References: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>
Message-ID: <1140873101.5454.51.camel@avenin.ebourne.me.uk>

On Fri, 2006-02-24 at 14:37 +0000, Ben Summers wrote:
> I have written up some notes about how I'd like to see the project  
> develop:
> 
>     http://boxbackup.hostworks.ca/index.php/0.20_redesign
> 
> Comments welcomed!

File selection
- Agreed

Upload engine 
- Agreed

Streams in files 
- I prefer properly supporting multiple streams, although I'm not
against the multiple files idea if we can demonstrate it is
significantly simpler.

Attributes 
- Agreed

Store 
- Agreed

Directory structure 
        I would like to completely change the way directories are
        stored. This allows 1) the directories to be signed and 2) to
        have a lovely way of going back in time.
- Both good

        The directory is a hierarchy, as now, with a directory referring
        to subdirectories. However, we have a new object, which is a
        "backup set". This specifies a root directory, and a list of
        grafts.
        A graft is a pair of (original dir ID, replacement dir ID). So
        when you are scanning a tree, if you see a reference to the
        original dir ID, you use the replacement one instead. This
        allows efficient replacement of leaves of the tree -- otherwise
        we would have to duplicate it from the root.
- Ok

        Filenames are no longer encrypted as separate objects, as this
        was shown to be a pain and annoying inefficient. Instead, the
        directory is stored as a single encrypted stream. This is
        possible as the store no longer needs to modify them. However,
        the referred object IDs need to be stored in the clear so the
        server can use them, but of course, these are included in the
        signed data so the server can't modify them without detection.
- Mostly agreed, though I'd be concerned about the use case where there
is a directory with many entries which has small changes to it. Think
news spool, Maildir directories, etc. Ideally wouldn't have to reupload
the whole thing on every change.

        Attributes are only stored in the directory, never in the file.
        (Although, what about xattrs, which could be "big"? But
        relevant, because they can store ACLs.)
- Attributes includes things such as mtime and size? Presumably we don't
back up atime? I'd be concerned that we'd upload the whole directory
object just for one frequently changing file.

        Each time bbackupd connects, it makes a new backup set, marked
        with the current time. Rules are specified to the server (or
        client?) to say when a backup set can be automatically deleted.
        By default bbackupquery will use the latest backup set, but can
        be instructed to use a different one.
- Don't really like this. Doesn't sound like it works well for lazy
mode, which you confirmed below.

Lazy mode 
        This was the only mode the original supported. It has it's pros
        and cons. The original decision was made to ensure a slow
        trickle of data across a broadband connection.
        The above may make supporting lazy mode a bit tricky, and we
        should decide whether we want to keep it, and if so, in what
        form. For example, directory entries may need to be marked as
        "changed but not included", prompting the restore to look in
        future versions.
- Lazy mode is essential for me. It's my favourite feature of Box and is
what makes it ideal for backing up over a DSL link. With the addition of
inotify (or equivalent file notification support) and restart resume it
will finally work perfectly. I can't see the point in going to all the
trouble of adding inotify support if we then just end up batching it up
at the other end of bbackupd instead!

Rather than making it messy, I think we'd be better off coming up with a
design whereby lazy mode worked very well. I was thinking of something
like your grafts, but each would have a time range. ie. When you fetch
an object it has multiple possibilities, all with a valid from/valid to
range.

You could go into the store and enter any time as view time and then for
every object you saw you'd get the version valid at that moment.

Snapshot mode would be identical, with the addition that every time it
did an upload it would record the time in a list. Then it would be
simple to select the view time from the list of snapshots.

> Also, there's a mini-project suitable for one developer to do  
> independently of everything else, making the raidfile support better  
> and efficient in a cluster of three store servers:
> 
>    http://boxbackup.hostworks.ca/index.php/Raidfile_improvements
> 
> Anyone up for it?

I'm not convinced of the advantage of building in raid support. I prefer
to backup to two stores on different machines rather than raid.
Obviously for companies providing the service raid would be well worth
having, but raid is so available these days that you can guarantee
they've got it already.

Maybe the three server cluster is a bonus, but there might be a much
less complicated way of achieving that rather than using raid.


What I'm up for:
- inotify support in linux, as I already stated. Hence I'd be happy to
join in with that section of redesign to abstract the file searching
interface out. If we decide this would also benefit from a db backend
then I guess I'll help on that too.

- Switching to ostreams to remove the hundreds of warnings and increase
robustness. This will probably also include changing the logging as
Chris has already suggested. Ideally this should be in 0.11.

- Making the underlying box libraries into shared libs so that other
projects (eg. boxi) can use them easily without having to bastardise the
box source. Other possible build things such as supporting PREFIX etc
properly.

- Changing the store to allow simple point-in-time retrieval, as
discussed above. This could be quite a big job though and like everyone
else I don't have a whole lot of time, but I'll try and help out with
this one.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 13:57:03 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 25 Feb 2006 13:57:03 +0000 (GMT)
Subject: [Box Backup-dev] Future work
In-Reply-To: <1140873101.5454.51.camel@avenin.ebourne.me.uk>
References: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>
 <1140873101.5454.51.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602251352130.14656@top.qwarx.com>

Hi all,

Than you Ben for the brilliant ideas and great start to the proposals. I 
agree with Martin's assessment. I also have a couple of suggestions, which 
I've added to the wiki page, tagged with my name.

> - Making the underlying box libraries into shared libs so that other
> projects (eg. boxi) can use them easily without having to bastardise the
> box source. Other possible build things such as supporting PREFIX etc
> properly.

I don't mind linking statically against them as at present. Until and 
unless the Boxi changes are merged, I will have to build against a 
modified tree anyway, but the modifications are really new features and 
build system fixes, not strictly necessary to link against Box.

Please let me know if you would like to assign me any new feature to work 
on, either for 0.11 or 0.20. I'm about to go to Ghana for three months, 
where I will have limited connectivity but probably a lot of time to work 
on Box and Boxi.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 14:02:19 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 25 Feb 2006 14:02:19 +0000 (GMT)
Subject: [Box Backup-dev] Problems with command line parsing in bbackupctl
 when using the force-sync option [Chris version of Box Backup]
In-Reply-To: <43FF0A31.9010207@hostingbrothers.nl>
References: <43FF0A31.9010207@hostingbrothers.nl>
Message-ID: <Pine.LNX.4.62.0602251400300.14656@top.qwarx.com>

Hi Mark,

> When I execute bbackupctl on Windows XP with the sync option, everything 
> works fine, but when I use the force-sync option I get an acces violation 
> which I could trace back to the code in emu.h.
>
> The function getopt(..) parses the first command line option -c perfect, but 
> when it needs to parse the next option (which isn't there!) it fails at the 
> instruction str = args[optind]; on line 225. This is because args[4] doesn't 
> exist (it's a null pointer).
>
> I think this problem is caused by the fact that the command line is searched 
> for combinations of - and a letter, which goes wrong with force-sync, because 
> there is a dash in it too.
>
> Maybe I am wrong, but I do know that I can't do a force sync rigth now, and I 
> don't know what to fix.
>
> Does anybody know a fix for this problem?

You're absolutely right. The getopt emulation code is badly broken. I 
hadn't noticed before, because I build with mingw which supplies a working 
getopt, so I don't use the emulated version.

I will rewrite the getopt emulation, but it's a tricky bit of code and 
will take some time to get right. In the mean time I will work around it 
by removing the dashes from the bbackupctl options which contain them. I 
will check that workaround into my SVN tree shortly.

Thanks for pointing this out!

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 14:07:29 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 25 Feb 2006 14:07:29 +0000
Subject: [Box Backup-dev] Problems with command line parsing in
 bbackupctl when using the force-sync option [Chris version of Box Backup]
In-Reply-To: <Pine.LNX.4.62.0602251400300.14656@top.qwarx.com>
References: <43FF0A31.9010207@hostingbrothers.nl>
 <Pine.LNX.4.62.0602251400300.14656@top.qwarx.com>
Message-ID: <1140876449.7610.1.camel@avenin.ebourne.me.uk>

On Sat, 2006-02-25 at 14:02 +0000, Chris Wilson wrote:
> I will rewrite the getopt emulation, but it's a tricky bit of code and 

Surely there must be a BSD licensed getopt somewhere. What about one of
the BSD libcs?

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 14:14:08 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 25 Feb 2006 14:14:08 +0000
Subject: [Box Backup-dev] Future work
In-Reply-To: <Pine.LNX.4.62.0602251352130.14656@top.qwarx.com>
References: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>
 <1140873101.5454.51.camel@avenin.ebourne.me.uk>
 <Pine.LNX.4.62.0602251352130.14656@top.qwarx.com>
Message-ID: <1140876848.7736.4.camel@avenin.ebourne.me.uk>

On Sat, 2006-02-25 at 13:57 +0000, Chris Wilson wrote:
> Please let me know if you would like to assign me any new feature to work 
> on, either for 0.11 or 0.20.

This is open source, not work... You work on what you want to or can
work on, nothing is mandatory!

>  I'm about to go to Ghana for three months, 
> where I will have limited connectivity but probably a lot of time to work 
> on Box and Boxi.

Cool. Approximately how soon is 'about to go'? The logging changes are
not the sort of thing that could easily be done like that because of the
invasiveness. You really need something a bit more meaty that is
realistic to merge afterwards.

Cheers,
Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 14:25:52 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 14:25:52 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r504 - box/chris/general/bin/bbackupctl
Message-ID: <20060225142552.48EEC95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 14:25:50 +0000 (Sat, 25 Feb 2006)
New Revision: 504

Modified:
   box/chris/general/bin/bbackupctl/bbackupctl.cpp
Log:
* bin/bbackupctl/bbackupctl.cpp
- Changed dashes in command names to underscores, to work around bugs with
  the current getopt emulation under win32/MSVC


Modified: box/chris/general/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/chris/general/bin/bbackupctl/bbackupctl.cpp	2006-02-24 01:55:27 UTC (rev 503)
+++ box/chris/general/bin/bbackupctl/bbackupctl.cpp	2006-02-25 14:25:50 UTC (rev 504)
@@ -33,17 +33,17 @@
 	printf("Usage: bbackupctl [-q] [-c config_file] <command>\n"
 	"Commands are:\n"
 	"  sync -- start a syncronisation run now\n"
-	"  force-sync -- force the start of a syncronisation run, "
+	"  force_sync -- force the start of a syncronisation run, "
 	"even if SyncAllowScript says no\n"
 	"  reload -- reload daemon configuration\n"
 	"  terminate -- terminate daemon now\n"
-	"  wait-for-sync -- wait until the next sync starts, then exit\n"
-	"  sync-and-wait -- start sync, wait until it finishes, then exit\n"
+	"  wait_for_sync -- wait until the next sync starts, then exit\n"
+	"  sync_and_wait -- start sync, wait until it finishes, then exit\n"
 	);
 	exit(1);
 }
 
-int main(int argc, const char *argv[])
+int main(int argc, char *argv[])
 {
 	int returnCode = 0;
 
@@ -64,7 +64,7 @@
 	
 	// See if there's another entry on the command line
 	int c;
-	while((c = getopt(argc, (char * const *)argv, "qc:l:")) != -1)
+	while((c = getopt(argc, argv, "qc:l:")) != -1)
 	{
 		switch(c)
 		{
@@ -189,12 +189,13 @@
 	// Print summary?
 	if(!quiet)
 	{
-		printf("Daemon configuration summary:\n"	\
-			   "  AutomaticBackup = %s\n"			\
-			   "  UpdateStoreInterval = %d seconds\n"	\
-			   "  MinimumFileAge = %d seconds\n"	\
-			   "  MaxUploadWait = %d seconds\n",
-			   autoBackup?"true":"false", updateStoreInterval, minimumFileAge, maxUploadWait);
+		printf("Daemon configuration summary:\n"
+			"  AutomaticBackup = %s\n"
+			"  UpdateStoreInterval = %d seconds\n"
+			"  MinimumFileAge = %d seconds\n"
+			"  MaxUploadWait = %d seconds\n",
+			autoBackup?"true":"false", updateStoreInterval, 
+			minimumFileAge, maxUploadWait);
 	}
 
 	std::string stateLine;
@@ -220,19 +221,30 @@
 	bool areWaitingForSync = false;
 	bool areWaitingForSyncEnd = false;
 
-	if(::strcmp(argv[0], "wait-for-sync") == 0)
+	if(::strcmp(argv[0], "force_sync") == 0)
 	{
-		// Check that it's not in non-automatic mode, because then it'll never start
+		argv[0] = "force-sync";
+	}
+
+	if(::strcmp(argv[0], "wait-for-sync") == 0 ||
+		::strcmp(argv[0], "wait_for_sync") == 0)
+	{
+		// Check that it's not in non-automatic mode, 
+		// because then it'll never start
+
 		if(!autoBackup)
 		{
-			printf("ERROR: Daemon is not in automatic mode -- sync will never start!\n");
+			printf("ERROR: Daemon is not in automatic mode -- "
+				"sync will never start!\n");
 			return 1;
 		}
 	
-		// Yes... set the flag so we know what we're waiting for a sync to start
+		// Yes... set the flag so we know what we're 
+		// waiting for a sync to start
 		areWaitingForSync = true;
 	}
-	else if (::strcmp(argv[0], "sync-and-wait") == 0)
+	else if (::strcmp(argv[0], "sync-and-wait") == 0 ||
+		::strcmp(argv[0], "sync_and_wait") == 0)
 	{
 		// send a sync command
 		std::string cmd("force-sync\n");


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 17:52:57 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 25 Feb 2006 17:52:57 +0000
Subject: [Box Backup-dev] Problems with command line parsing in bbackupctl when using the force-sync option [Chris version of Box Backup]
In-Reply-To: <1140876449.7610.1.camel@avenin.ebourne.me.uk>
References: <43FF0A31.9010207@hostingbrothers.nl> <Pine.LNX.4.62.0602251400300.14656@top.qwarx.com> <1140876449.7610.1.camel@avenin.ebourne.me.uk>
Message-ID: <C4A98D44-3988-48C6-82CD-315A10974732@fluffy.co.uk>

On 25 Feb 2006, at 14:07, Martin Ebourne wrote:

> On Sat, 2006-02-25 at 14:02 +0000, Chris Wilson wrote:
>> I will rewrite the getopt emulation, but it's a tricky bit of code  
>> and
>
> Surely there must be a BSD licensed getopt somewhere. What about  
> one of
> the BSD libcs?

For example...

http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib/libc/stdlib/ 
getopt_long.c?rev=1.20&content-type=text/plain

Not exactly short though.

Ben



From boxbackup-dev@fluffy.co.uk  Sat Feb 25 17:56:29 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 25 Feb 2006 17:56:29 +0000
Subject: [Box Backup-dev] SVN repository
Message-ID: <5C911A0D-906E-4445-8533-BBFFA8E6F821@fluffy.co.uk>

Sourceforge now offer SVN repositories.

    http://sourceforge.net/docs/E09/

Any advantages in moving?

Ben





From boxbackup-dev@fluffy.co.uk  Sat Feb 25 18:04:45 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 25 Feb 2006 18:04:45 +0000 (GMT)
Subject: [Box Backup-dev] Future work
In-Reply-To: <1140876848.7736.4.camel@avenin.ebourne.me.uk>
References: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>
 <1140873101.5454.51.camel@avenin.ebourne.me.uk>  <Pine.LNX.4.62.0602251352130.14656@top.qwarx.com>
 <1140876848.7736.4.camel@avenin.ebourne.me.uk>
Message-ID: <Pine.LNX.4.62.0602251801130.14656@top.qwarx.com>

Hi Martin,

>> Please let me know if you would like to assign me any new feature to work
>> on, either for 0.11 or 0.20.
>
> This is open source, not work... You work on what you want to or can
> work on, nothing is mandatory!

I thought it might help to assign me something or at least agree that it 
would be a useful thing for me to work on, especially given a possible 
lack of connectivity and interactivity for three months :-)

> Cool. Approximately how soon is 'about to go'? The logging changes are 
> not the sort of thing that could easily be done like that because of the 
> invasiveness. You really need something a bit more meaty that is 
> realistic to merge afterwards.

My leaving date is currently 20th March, but might be a week or two later. 
I can try to get the logging changes done before then, but no promises.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 18:35:07 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 25 Feb 2006 18:35:07 +0000
Subject: [Box Backup-dev] Future work
In-Reply-To: <Pine.LNX.4.62.0602251801130.14656@top.qwarx.com>
References: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>  <1140873101.5454.51.camel@avenin.ebourne.me.uk>  <Pine.LNX.4.62.0602251352130.14656@top.qwarx.com> <1140876848.7736.4.camel@avenin.ebourne.me.uk> <Pine.LNX.4.62.0602251801130.14656@top.qwarx.com>
Message-ID: <2A966ACF-C589-4006-9987-AC14D43659C3@fluffy.co.uk>

On 25 Feb 2006, at 18:04, Chris Wilson wrote:

> Hi Martin,
>
>>> Please let me know if you would like to assign me any new feature  
>>> to work
>>> on, either for 0.11 or 0.20.
>>
>> This is open source, not work... You work on what you want to or can
>> work on, nothing is mandatory!
>
> I thought it might help to assign me something or at least agree  
> that it would be a useful thing for me to work on, especially given  
> a possible lack of connectivity and interactivity for three months :-)

I'd prefer it if people choose the bits they wanted to do. I agree  
with Martin; this is about doing stuff we want to do.

The raidfile modifications are suitable, but not very "sexy" and may  
not be to your taste. But it is highly self-contained. I think  
there's still some advantage in having them. RAID hardware isn't well  
supported on the *BSDs (slight issues such as not reporting disc  
failures!), raidframe is annoying to set up. But perhaps most  
interestingly, with a bit of extra work it would allow us to RAID the  
entire machine, not just the discs, building resilient clusters of  
three servers.

On the other hand, we could really do with a nice GUI based front  
end, so why not continue making Boxi wonderful?

>
>> Cool. Approximately how soon is 'about to go'? The logging changes  
>> are not the sort of thing that could easily be done like that  
>> because of the invasiveness. You really need something a bit more  
>> meaty that is realistic to merge afterwards.
>
> My leaving date is currently 20th March, but might be a week or two  
> later. I can try to get the logging changes done before then, but  
> no promises.

It would be useful if you wrote some notes about your idea GUI  
integration features on the wiki before you leave. I would really  
like to leave the daemon doing it's stuff, and the GUI just  
connecting over a local socket to control it. Perhaps even making a  
brestored which handles the actual talking to the server.

Have you considered having multiple users sharing the same store when  
a whole machine is being backed up?

I'm not sure whether to be amazed at your enthusiasm for Box Backup  
or worried about your sanity when I hear you're considering doing  
lots of coding for the project while traveling around the world.

Ben

PS: Some replies to your notes on the wiki.



From boxbackup-dev@fluffy.co.uk  Sat Feb 25 19:02:47 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 25 Feb 2006 19:02:47 +0000 (GMT)
Subject: [Box Backup-dev] Future work
In-Reply-To: <2A966ACF-C589-4006-9987-AC14D43659C3@fluffy.co.uk>
References: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>
 <1140873101.5454.51.camel@avenin.ebourne.me.uk>  <Pine.LNX.4.62.0602251352130.14656@top.qwarx.com>
 <1140876848.7736.4.camel@avenin.ebourne.me.uk> <Pine.LNX.4.62.0602251801130.14656@top.qwarx.com>
 <2A966ACF-C589-4006-9987-AC14D43659C3@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602251851230.14656@top.qwarx.com>

Hi Ben,

> I'd prefer it if people choose the bits they wanted to do. I agree with 
> Martin; this is about doing stuff we want to do.

Well, I want Box to be successful and to meet people's needs, because that 
in turn will make Boxi successful and important, and make me rich and 
famous </dream>.

> The raidfile modifications are suitable, but not very "sexy" and may not 
> be to your taste. But it is highly self-contained. I think there's still 
> some advantage in having them. RAID hardware isn't well supported on the 
> *BSDs (slight issues such as not reporting disc failures!), raidframe is 
> annoying to set up. But perhaps most interestingly, with a bit of extra 
> work it would allow us to RAID the entire machine, not just the discs, 
> building resilient clusters of three servers.

I'm not sure about raidfile. I have a feeling that hardware and OS-level 
RAID is a better way to go in the long run, since it benefits applications 
other than Box. I don't use it myself, and I might feel that my time was 
better spent making OpenBSD's software raid better. But if there is a 
geenral consensus that raidfile is useful and worth doing, then I'll do 
it.

> On the other hand, we could really do with a nice GUI based front end, 
> so why not continue making Boxi wonderful?

I'd love to do that, but unless Box works well - really well - there's no 
point. The single most important feature for me, out of the proposals for 
0.20, would be snapshots, but there's no way I can do that myself, or that 
you would accept the resulting code if I tried.

> It would be useful if you wrote some notes about your idea GUI 
> integration features on the wiki before you leave. I would really like 
> to leave the daemon doing it's stuff, and the GUI just connecting over a 
> local socket to control it. Perhaps even making a brestored which 
> handles the actual talking to the server.

The problem I have with the separate process is the number of variables. 
There can be so many more reasons why bbackupd.exe won't start or won't 
talk to Boxi over the command socket, that it's very difficult for users 
to diagnose and fix the problem. My idea was to offer both options - a 
quick way to do a full backup and see the status, and a way to manage and 
control the background service over the command socket.

> Have you considered having multiple users sharing the same store when a 
> whole machine is being backed up?

Sorry, I'm not sure what you mean here. Is it multiple bbackupds (boxes) 
sharing a single account, or multiple users (of a single machine) having 
access to their own files on the remote store?

The former is something that I would like to see support for, along with 
multiple, selectable encryption keys per account, to allow users to use a 
Box store as a secure place to store and exchange files. The latter sounds 
like a potential security risk, but if I start getting requests from users 
to back up shared servers, I would consider it.

> I'm not sure whether to be amazed at your enthusiasm for Box Backup or 
> worried about your sanity when I hear you're considering doing lots of 
> coding for the project while traveling around the world.

I would worry for my sanity - everybody else does. Fortunately I found an 
employer where the other employees make me feel sane by comparison, so it 
doesn't bother me that much any more. :-)

> PS: Some replies to your notes on the wiki.

Thanks! Will look at them and get back to you.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 19:14:09 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sat, 25 Feb 2006 19:14:09 +0000
Subject: [Box Backup-dev] Future work
In-Reply-To: <Pine.LNX.4.62.0602251851230.14656@top.qwarx.com>
References: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk>  <1140873101.5454.51.camel@avenin.ebourne.me.uk>  <Pine.LNX.4.62.0602251352130.14656@top.qwarx.com> <1140876848.7736.4.camel@avenin.ebourne.me.uk> <Pine.LNX.4.62.0602251801130.14656@top.qwarx.com> <2A966ACF-C589-4006-9987-AC14D43659C3@fluffy.co.uk> <Pine.LNX.4.62.0602251851230.14656@top.qwarx.com>
Message-ID: <849F8EE5-37FA-490C-99CD-412D02ADA670@fluffy.co.uk>

On 25 Feb 2006, at 19:02, Chris Wilson wrote:

> Hi Ben,
>
>> I'd prefer it if people choose the bits they wanted to do. I agree  
>> with Martin; this is about doing stuff we want to do.
>
> Well, I want Box to be successful and to meet people's needs,  
> because that in turn will make Boxi successful and important, and  
> make me rich and famous </dream>.

Interesting plan. :-)

>
>> The raidfile modifications are suitable, but not very "sexy" and  
>> may not be to your taste. But it is highly self-contained. I think  
>> there's still some advantage in having them. RAID hardware isn't  
>> well supported on the *BSDs (slight issues such as not reporting  
>> disc failures!), raidframe is annoying to set up. But perhaps most  
>> interestingly, with a bit of extra work it would allow us to RAID  
>> the entire machine, not just the discs, building resilient  
>> clusters of three servers.
>
> I'm not sure about raidfile. I have a feeling that hardware and OS- 
> level RAID is a better way to go in the long run, since it benefits  
> applications other than Box. I don't use it myself, and I might  
> feel that my time was better spent making OpenBSD's software raid  
> better. But if there is a geenral consensus that raidfile is useful  
> and worth doing, then I'll do it.

I personally am wondering whether it might be better to drop this  
feature. Maybe we should do a quick poll on the main list to see who  
uses it, and who would be upset if it went away?

>
>> On the other hand, we could really do with a nice GUI based front  
>> end, so why not continue making Boxi wonderful?
>
> I'd love to do that, but unless Box works well - really well -  
> there's no point. The single most important feature for me, out of  
> the proposals for 0.20, would be snapshots, but there's no way I  
> can do that myself, or that you would accept the resulting code if  
> I tried.

Yes, the snapshots is the most important thing. You sort of could do  
it with clever algorithms in the existing store, but it would be  
nasty. Also, the existing housekeeping stuff can fail. So it all  
needs changing.

>
>> It would be useful if you wrote some notes about your idea GUI  
>> integration features on the wiki before you leave. I would really  
>> like to leave the daemon doing it's stuff, and the GUI just  
>> connecting over a local socket to control it. Perhaps even making  
>> a brestored which handles the actual talking to the server.
>
> The problem I have with the separate process is the number of  
> variables. There can be so many more reasons why bbackupd.exe won't  
> start or won't talk to Boxi over the command socket, that it's very  
> difficult for users to diagnose and fix the problem. My idea was to  
> offer both options - a quick way to do a full backup and see the  
> status, and a way to manage and control the background service over  
> the command socket.

Shouldn't we improve bbackupd to give better feedback in a way that  
the GUI can pick up? That benefits command line users as well.


>
>> Have you considered having multiple users sharing the same store  
>> when a whole machine is being backed up?
>
> Sorry, I'm not sure what you mean here. Is it multiple bbackupds  
> (boxes) sharing a single account, or multiple users (of a single  
> machine) having access to their own files on the remote store?
>
> The former is something that I would like to see support for, along  
> with multiple, selectable encryption keys per account, to allow  
> users to use a Box store as a secure place to store and exchange  
> files.

I think that sounds really scary and complex. Maybe a nice feature,  
but it can be achieved in other ways (multiple accounts!) and makes  
the code and the tests far more complex. I really think everything  
should be as simple as it possible could be, engineering the whole  
thing for reliability. We can't risk people's data.


> The latter sounds like a potential security risk, but if I start  
> getting requests from users to back up shared servers, I would  
> consider it.

Let's say you backup /home on a multi-user machine, in a single  
account. It'd be nice to allow each user GUI access to their own  
files. However, you can't do that because they can access other files.

The solution, as I see it, is a brestored which arbitrates access. So  
the GUI contacts brestored to talk to the client. It looks at the  
socket to see which user is connecting, and only allows them to see  
their files. And, as a bonus, only root needs to be able to read the  
key and certs files. And the GUI can be completely independent of all  
the protocol stuff too.

It might be that this is abstracting things too much, but it is what  
I had in mind when I originally designed the system -- a single lazy  
daemon which backed up files for an office of users and allowed them  
all access to the old versions through a nice GUI.

Ben



From boxbackup-dev@fluffy.co.uk  Sat Feb 25 19:31:08 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 19:31:08 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r505 - box/chris/general/bin/bbackupctl
Message-ID: <20060225193108.36B2395@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 19:31:06 +0000 (Sat, 25 Feb 2006)
New Revision: 505

Modified:
   box/chris/general/bin/bbackupctl/bbackupctl.cpp
Log:
* bbackupctl.cpp
- Revert underscore changes now that getopt works on MSVC


Modified: box/chris/general/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/chris/general/bin/bbackupctl/bbackupctl.cpp	2006-02-25 14:25:50 UTC (rev 504)
+++ box/chris/general/bin/bbackupctl/bbackupctl.cpp	2006-02-25 19:31:06 UTC (rev 505)
@@ -33,17 +33,17 @@
 	printf("Usage: bbackupctl [-q] [-c config_file] <command>\n"
 	"Commands are:\n"
 	"  sync -- start a syncronisation run now\n"
-	"  force_sync -- force the start of a syncronisation run, "
+	"  force-sync -- force the start of a syncronisation run, "
 	"even if SyncAllowScript says no\n"
 	"  reload -- reload daemon configuration\n"
 	"  terminate -- terminate daemon now\n"
-	"  wait_for_sync -- wait until the next sync starts, then exit\n"
-	"  sync_and_wait -- start sync, wait until it finishes, then exit\n"
+	"  wait-for-sync -- wait until the next sync starts, then exit\n"
+	"  sync-and-wait -- start sync, wait until it finishes, then exit\n"
 	);
 	exit(1);
 }
 
-int main(int argc, char *argv[])
+int main(int argc, const char *argv[])
 {
 	int returnCode = 0;
 
@@ -64,7 +64,7 @@
 	
 	// See if there's another entry on the command line
 	int c;
-	while((c = getopt(argc, argv, "qc:l:")) != -1)
+	while((c = getopt(argc, (char * const *)argv, "qc:l:")) != -1)
 	{
 		switch(c)
 		{
@@ -108,7 +108,10 @@
 	// Check there's a socket defined in the config file
 	if(!conf.KeyExists("CommandSocket"))
 	{
-		printf("Daemon isn't using a control socket, could not execute command.\nAdd a CommandSocket declaration to the bbackupd.conf file.\n");
+		printf("Daemon isn't using a control socket, "
+			"could not execute command.\n"
+			"Add a CommandSocket declaration to the "
+			"bbackupd.conf file.\n");
 		return 1;
 	}
 	
@@ -221,17 +224,10 @@
 	bool areWaitingForSync = false;
 	bool areWaitingForSyncEnd = false;
 
-	if(::strcmp(argv[0], "force_sync") == 0)
+	if(::strcmp(argv[0], "wait-for-sync") == 0)
 	{
-		argv[0] = "force-sync";
-	}
-
-	if(::strcmp(argv[0], "wait-for-sync") == 0 ||
-		::strcmp(argv[0], "wait_for_sync") == 0)
-	{
 		// Check that it's not in non-automatic mode, 
 		// because then it'll never start
-
 		if(!autoBackup)
 		{
 			printf("ERROR: Daemon is not in automatic mode -- "
@@ -239,12 +235,11 @@
 			return 1;
 		}
 	
-		// Yes... set the flag so we know what we're 
-		// waiting for a sync to start
+		// Yes... set the flag so we know that 
+		// we're waiting for a sync to start
 		areWaitingForSync = true;
 	}
-	else if (::strcmp(argv[0], "sync-and-wait") == 0 ||
-		::strcmp(argv[0], "sync_and_wait") == 0)
+	else if (::strcmp(argv[0], "sync-and-wait") == 0)
 	{
 		// send a sync command
 		std::string cmd("force-sync\n");


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 19:32:38 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 19:32:38 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r507 - box/chris/general/test/win32
Message-ID: <20060225193238.0E3A295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 19:32:35 +0000 (Sat, 25 Feb 2006)
New Revision: 507

Modified:
   box/chris/general/test/win32/testlibwin32.cpp
Log:
* testlibwin32.cpp
- Added unit tests for getopt


Modified: box/chris/general/test/win32/testlibwin32.cpp
===================================================================
--- box/chris/general/test/win32/testlibwin32.cpp	2006-02-25 19:32:04 UTC (rev 506)
+++ box/chris/general/test/win32/testlibwin32.cpp	2006-02-25 19:32:35 UTC (rev 507)
@@ -6,6 +6,8 @@
 
 #ifdef WIN32
 
+#include <assert.h>
+
 #include "../../bin/bbackupd/BackupDaemon.h"
 #include "BoxPortsAndFiles.h"
 #include "emu.h"
@@ -55,38 +57,60 @@
 	stat("c:\\windows", &ourfs);
 	stat("c:\\autoexec.bat", &ourfs);
 	printf("Finished dir read");
-#if 0
-	//remove - sleepycat include a version of getopt - mine never REALLY worked !
+
 	//test our getopt function
-	std::string commline("-q -c fgfgfg -f -l hello");
+	char * test_argv[] = 
+	{
+		"foobar.exe",
+		"-qwc",
+		"-",
+		"-c",
+		"fgfgfg",
+		"-f",
+		"-l",
+		"hello",
+		"-",
+		"force-sync",
+		NULL
+	};
+	int test_argc;
+	for (test_argc = 0; test_argv[test_argc]; test_argc++) { }
+	const char* opts = "qwc:l:";
 
-	int c;
-	while((c = getopt(commline.size(), (char * const *)commline.c_str(), "qwc:l:")) != -1)
-	{
-		printf("switch = %c, param is %s\r\n", c, optarg);
-	}
-#endif
+	assert(getopt(test_argc, test_argv, opts) == 'q');
+	assert(getopt(test_argc, test_argv, opts) == 'w');
+	assert(getopt(test_argc, test_argv, opts) == 'c');
+	assert(strcmp(optarg, "-") == 0);
+	assert(getopt(test_argc, test_argv, opts) == 'c');
+	assert(strcmp(optarg, "fgfgfg") == 0);
+	assert(getopt(test_argc, test_argv, opts) == '?');
+	assert(optopt == 'f');
+	assert(getopt(test_argc, test_argv, opts) == 'l');
+	assert(strcmp(optarg, "hello") == 0);
+	assert(getopt(test_argc, test_argv, opts) == -1);
+	// assert(optopt == 0); // no more options
+	assert(strcmp(test_argv[optind], "-") == 0);
+	assert(strcmp(test_argv[optind+1], "force-sync") == 0);
 	//end of getopt test
 	
 	//now test our statfs funct
 	stat("c:\\cert.cer", &ourfs);
-	
-	
 
 	char *timee;
 	
 	timee = ctime(&ourfs.st_mtime);
 
-	if ( S_ISREG(ourfs.st_mode))
+	if (S_ISREG(ourfs.st_mode))
 	{
 		printf("is a normal file");
 	}
 	else
 	{
 		printf("is a directory?");
+		exit(1);
 	}
 
-	lstat("c:\\windows", &ourfs);
+	lstat(getenv("WINDIR"), &ourfs);
 
 	if ( S_ISDIR(ourfs.st_mode))
 	{
@@ -95,6 +119,7 @@
 	else
 	{
 		printf("is a file?");
+		exit(1);
 	}
 
 	//test the syslog functions
@@ -108,12 +133,13 @@
 	//first off get the path name for the default 
 	char buf[MAX_PATH];
 	
+	/*
 	GetModuleFileName(NULL, buf, sizeof(buf));
 	std::string buffer(buf);
 	std::string conf("-c " + buffer.substr(0,(buffer.find("win32test.exe"))) + "bbackupd.conf");
 	//std::string conf( "-c " + buffer.substr(0,(buffer.find("bbackupd.exe"))) + "bbackupd.conf");
+	*/
 
-
 	return 0;
 }
 


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 19:32:16 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 19:32:16 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r506 - box/chris/general/lib/win32
Message-ID: <20060225193216.C423B95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 19:32:04 +0000 (Sat, 25 Feb 2006)
New Revision: 506

Added:
   box/chris/general/lib/win32/getopt.h
   box/chris/general/lib/win32/getopt_long.cxx
Modified:
   box/chris/general/lib/win32/emu.cpp
   box/chris/general/lib/win32/emu.h
Log:
* win32/getopt_long.cxx, win32/getopt.h
- Added a working getopt implementation, stolen from OpenBSD

* win32/emu.cpp, win32/emu.h
- Use OpenBSD's getopt on MSVC


Modified: box/chris/general/lib/win32/emu.cpp
===================================================================
--- box/chris/general/lib/win32/emu.cpp	2006-02-25 19:31:06 UTC (rev 505)
+++ box/chris/general/lib/win32/emu.cpp	2006-02-25 19:32:04 UTC (rev 506)
@@ -544,15 +544,6 @@
 	return hdir;
 }
 
-// MinGW provides a getopt implementation
-#ifndef __MINGW32__
-//works with getopt
-char *optarg;
-//optind looks like an index into the string - how far we have moved along
-int optind = 1;
-char nextchar = -1;
-#endif
-
 // --------------------------------------------------------------------------
 //
 // Function

Modified: box/chris/general/lib/win32/emu.h
===================================================================
--- box/chris/general/lib/win32/emu.h	2006-02-25 19:31:06 UTC (rev 505)
+++ box/chris/general/lib/win32/emu.h	2006-02-25 19:32:04 UTC (rev 506)
@@ -184,59 +184,7 @@
 
 // MinGW provides a getopt implementation
 #ifndef __MINGW32__
-
-// this will need to be implemented if we see fit that command line
-// options are going to be used! (probably then:)
-// where the calling function looks for the parsed parameter
-extern char *optarg;
-
-// optind looks like an index into the string - how far we have moved along
-extern int optind;
-extern char nextchar;
-
-inline int getopt(int count, char * const * args, const char * tolookfor)
-{
-	if (optind >= count) return -1;
-
-	std::string str((const char *)args[optind]);
-	std::string interestin(tolookfor);
-	int opttolookfor = 0;
-	int index = -1;
-	// just initialize the string - just in case it is used.
-	// optarg[0] = 0;
-	std::string opt;
-
-	if (count == 0) return -1;
-
-	do 
-	{
-		if (index != -1)
-		{
-			str = str.substr(index+1, str.size());
-		}
-
-		index = (int)str.find('-');
-
-		if (index == -1) return -1;
-
-		opt = str[1];
-
-		optind ++;
-		str = args[optind];
-	}
-	while ((opttolookfor = (int)interestin.find(opt)) == -1);
-
-	if (interestin[opttolookfor+1] == ':') 
-	{
-
-		// strcpy(optarg, str.c_str());
-		optarg = args[optind];
-		optind ++;
-	}
-
-	// indicate we have finished
-	return opt[0];
-}
+#include "getopt.h"
 #endif // !__MINGW32__
 
 #define timespec timeval

Added: box/chris/general/lib/win32/getopt.h
===================================================================
--- box/chris/general/lib/win32/getopt.h	2006-02-25 19:31:06 UTC (rev 505)
+++ box/chris/general/lib/win32/getopt.h	2006-02-25 19:32:04 UTC (rev 506)
@@ -0,0 +1,98 @@
+/*	$OpenBSD: getopt.h,v 1.1 2002/12/03 20:24:29 millert Exp $	*/
+/*	$NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $	*/
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _GETOPT_H_
+#define _GETOPT_H_
+
+// copied from: http://www.la.utexas.edu/lab/software/devtool/gnu/libtool/C_header_files.html
+
+/* __BEGIN_DECLS should be used at the beginning of your declarations,
+   so that C++ compilers don't mangle their names.  Use __END_DECLS at
+   the end of C declarations. */
+#undef __BEGIN_DECLS
+#undef __END_DECLS
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS /* empty */
+# define __END_DECLS /* empty */
+#endif
+
+/*
+ * GNU-like getopt_long() and 4.4BSD getsubopt()/optreset extensions
+ */
+#define no_argument        0
+#define required_argument  1
+#define optional_argument  2
+
+struct option {
+	/* name of long option */
+	const char *name;
+	/*
+	 * one of no_argument, required_argument, and optional_argument:
+	 * whether option takes an argument
+	 */
+	int has_arg;
+	/* if not NULL, set *flag to val when option found */
+	int *flag;
+	/* if flag not NULL, value to set *flag to; else return value */
+	int val;
+};
+
+__BEGIN_DECLS
+int	 getopt_long(int, char * const *, const char *,
+	    const struct option *, int *);
+int	 getopt_long_only(int, char * const *, const char *,
+	    const struct option *, int *);
+#ifndef _GETOPT_DEFINED_
+#define _GETOPT_DEFINED_
+int	 getopt(int, char * const *, const char *);
+int	 getsubopt(char **, char * const *, char **);
+
+extern   char *optarg;                  /* getopt(3) external variables */
+extern   int opterr;
+extern   int optind;
+extern   int optopt;
+extern   int optreset;
+extern   char *suboptarg;               /* getsubopt(3) external variable */
+#endif
+__END_DECLS
+ 
+#endif /* !_GETOPT_H_ */


Property changes on: box/chris/general/lib/win32/getopt.h
___________________________________________________________________
Name: svn:executable
   + *

Added: box/chris/general/lib/win32/getopt_long.cxx
===================================================================
--- box/chris/general/lib/win32/getopt_long.cxx	2006-02-25 19:31:06 UTC (rev 505)
+++ box/chris/general/lib/win32/getopt_long.cxx	2006-02-25 19:32:04 UTC (rev 506)
@@ -0,0 +1,546 @@
+/*	$OpenBSD: getopt_long.c,v 1.20 2005/10/25 15:49:37 jmc Exp $	*/
+/*	$NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $	*/
+// Adapted for Box Backup by Chris Wilson <chris+boxbackup@qwirx.com>
+
+/*
+ * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Sponsored in part by the Defense Advanced Research Projects
+ * Agency (DARPA) and Air Force Research Laboratory, Air Force
+ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
+ */
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "Box.h"
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _MSC_VER
+#define	REPLACE_GETOPT		/* use this getopt as the system getopt(3) */
+#endif
+
+#ifdef REPLACE_GETOPT
+int	opterr = 1;		/* if error message should be printed */
+int	optind = 1;		/* index into parent argv vector */
+int	optopt = '?';		/* character checked for validity */
+int	optreset;		/* reset getopt */
+char    *optarg;		/* argument associated with option */
+#endif
+
+#define PRINT_ERROR	((opterr) && (*options != ':'))
+
+#define FLAG_PERMUTE	0x01	/* permute non-options to the end of argv */
+#define FLAG_ALLARGS	0x02	/* treat non-options as args to option "-1" */
+#define FLAG_LONGONLY	0x04	/* operate as getopt_long_only */
+
+/* return values */
+#define	BADCH		(int)'?'
+#define	BADARG		((*options == ':') ? (int)':' : (int)'?')
+#define	INORDER 	(int)1
+
+#define	EMSG		""
+
+static void warnx(const char* fmt, ...)
+{
+	va_list ap;
+	va_start(ap, fmt);
+	vfprintf(stderr, fmt, ap);
+	va_end(ap);
+}
+
+static int getopt_internal(int, char * const *, const char *,
+			   const struct option *, int *, int);
+static int parse_long_options(char * const *, const char *,
+			      const struct option *, int *, int);
+static int gcd(int, int);
+static void permute_args(int, int, int, char * const *);
+
+static char *place = EMSG; /* option letter processing */
+
+/* XXX: set optreset to 1 rather than these two */
+static int nonopt_start = -1; /* first non option argument (for permute) */
+static int nonopt_end = -1;   /* first option after non options (for permute) */
+
+/* Error messages */
+static const char recargchar[] = "option requires an argument -- %c";
+static const char recargstring[] = "option requires an argument -- %s";
+static const char ambig[] = "ambiguous option -- %.*s";
+static const char noarg[] = "option doesn't take an argument -- %.*s";
+static const char illoptchar[] = "unknown option -- %c";
+static const char illoptstring[] = "unknown option -- %s";
+
+/*
+ * Compute the greatest common divisor of a and b.
+ */
+static int
+gcd(int a, int b)
+{
+	int c;
+
+	c = a % b;
+	while (c != 0) {
+		a = b;
+		b = c;
+		c = a % b;
+	}
+
+	return (b);
+}
+
+/*
+ * Exchange the block from nonopt_start to nonopt_end with the block
+ * from nonopt_end to opt_end (keeping the same order of arguments
+ * in each block).
+ */
+static void
+permute_args(int panonopt_start, int panonopt_end, int opt_end,
+	char * const *nargv)
+{
+	int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
+	char *swap;
+
+	/*
+	 * compute lengths of blocks and number and size of cycles
+	 */
+	nnonopts = panonopt_end - panonopt_start;
+	nopts = opt_end - panonopt_end;
+	ncycle = gcd(nnonopts, nopts);
+	cyclelen = (opt_end - panonopt_start) / ncycle;
+
+	for (i = 0; i < ncycle; i++) {
+		cstart = panonopt_end+i;
+		pos = cstart;
+		for (j = 0; j < cyclelen; j++) {
+			if (pos >= panonopt_end)
+				pos -= nnonopts;
+			else
+				pos += nopts;
+			swap = nargv[pos];
+			/* LINTED const cast */
+			((char **) nargv)[pos] = nargv[cstart];
+			/* LINTED const cast */
+			((char **)nargv)[cstart] = swap;
+		}
+	}
+}
+
+/*
+ * parse_long_options --
+ *	Parse long options in argc/argv argument vector.
+ * Returns -1 if short_too is set and the option does not match long_options.
+ */
+static int
+parse_long_options(char * const *nargv, const char *options,
+	const struct option *long_options, int *idx, int short_too)
+{
+	char *current_argv, *has_equal;
+	size_t current_argv_len;
+	int i, match;
+
+	current_argv = place;
+	match = -1;
+
+	optind++;
+
+	if ((has_equal = strchr(current_argv, '=')) != NULL) {
+		/* argument found (--option=arg) */
+		current_argv_len = has_equal - current_argv;
+		has_equal++;
+	} else
+		current_argv_len = strlen(current_argv);
+
+	for (i = 0; long_options[i].name; i++) {
+		/* find matching long option */
+		if (strncmp(current_argv, long_options[i].name,
+		    current_argv_len))
+			continue;
+
+		if (strlen(long_options[i].name) == current_argv_len) {
+			/* exact match */
+			match = i;
+			break;
+		}
+		/*
+		 * If this is a known short option, don't allow
+		 * a partial match of a single character.
+		 */
+		if (short_too && current_argv_len == 1)
+			continue;
+
+		if (match == -1)	/* partial match */
+			match = i;
+		else {
+			/* ambiguous abbreviation */
+			if (PRINT_ERROR)
+				warnx(ambig, (int)current_argv_len,
+				     current_argv);
+			optopt = 0;
+			return (BADCH);
+		}
+	}
+	if (match != -1) {		/* option found */
+		if (long_options[match].has_arg == no_argument
+		    && has_equal) {
+			if (PRINT_ERROR)
+				warnx(noarg, (int)current_argv_len,
+				     current_argv);
+			/*
+			 * XXX: GNU sets optopt to val regardless of flag
+			 */
+			if (long_options[match].flag == NULL)
+				optopt = long_options[match].val;
+			else
+				optopt = 0;
+			return (BADARG);
+		}
+		if (long_options[match].has_arg == required_argument ||
+		    long_options[match].has_arg == optional_argument) {
+			if (has_equal)
+				optarg = has_equal;
+			else if (long_options[match].has_arg ==
+			    required_argument) {
+				/*
+				 * optional argument doesn't use next nargv
+				 */
+				optarg = nargv[optind++];
+			}
+		}
+		if ((long_options[match].has_arg == required_argument)
+		    && (optarg == NULL)) {
+			/*
+			 * Missing argument; leading ':' indicates no error
+			 * should be generated.
+			 */
+			if (PRINT_ERROR)
+				warnx(recargstring,
+				    current_argv);
+			/*
+			 * XXX: GNU sets optopt to val regardless of flag
+			 */
+			if (long_options[match].flag == NULL)
+				optopt = long_options[match].val;
+			else
+				optopt = 0;
+			--optind;
+			return (BADARG);
+		}
+	} else {			/* unknown option */
+		if (short_too) {
+			--optind;
+			return (-1);
+		}
+		if (PRINT_ERROR)
+			warnx(illoptstring, current_argv);
+		optopt = 0;
+		return (BADCH);
+	}
+	if (idx)
+		*idx = match;
+	if (long_options[match].flag) {
+		*long_options[match].flag = long_options[match].val;
+		return (0);
+	} else
+		return (long_options[match].val);
+}
+
+/*
+ * getopt_internal --
+ *	Parse argc/argv argument vector.  Called by user level routines.
+ */
+static int
+getopt_internal(int nargc, char * const *nargv, const char *options,
+	const struct option *long_options, int *idx, int flags)
+{
+	const char * oli; /* option letter list index */
+	int optchar, short_too;
+	static int posixly_correct = -1;
+
+	if (options == NULL)
+		return (-1);
+
+	/*
+	 * Disable GNU extensions if POSIXLY_CORRECT is set or options
+	 * string begins with a '+'.
+	 */
+	if (posixly_correct == -1)
+		posixly_correct = (getenv("POSIXLY_CORRECT") != NULL);
+	if (posixly_correct || *options == '+')
+		flags &= ~FLAG_PERMUTE;
+	else if (*options == '-')
+		flags |= FLAG_ALLARGS;
+	if (*options == '+' || *options == '-')
+		options++;
+
+	/*
+	 * XXX Some GNU programs (like cvs) set optind to 0 instead of
+	 * XXX using optreset.  Work around this braindamage.
+	 */
+	if (optind == 0)
+		optind = optreset = 1;
+
+	optarg = NULL;
+	if (optreset)
+		nonopt_start = nonopt_end = -1;
+start:
+	if (optreset || !*place) {		/* update scanning pointer */
+		optreset = 0;
+		if (optind >= nargc) {          /* end of argument vector */
+			place = EMSG;
+			if (nonopt_end != -1) {
+				/* do permutation, if we have to */
+				permute_args(nonopt_start, nonopt_end,
+				    optind, nargv);
+				optind -= nonopt_end - nonopt_start;
+			}
+			else if (nonopt_start != -1) {
+				/*
+				 * If we skipped non-options, set optind
+				 * to the first of them.
+				 */
+				optind = nonopt_start;
+			}
+			nonopt_start = nonopt_end = -1;
+			return (-1);
+		}
+		if (*(place = nargv[optind]) != '-' ||
+		    (place[1] == '\0' && strchr(options, '-') == NULL)) {
+			place = EMSG;		/* found non-option */
+			if (flags & FLAG_ALLARGS) {
+				/*
+				 * GNU extension:
+				 * return non-option as argument to option 1
+				 */
+				optarg = nargv[optind++];
+				return (INORDER);
+			}
+			if (!(flags & FLAG_PERMUTE)) {
+				/*
+				 * If no permutation wanted, stop parsing
+				 * at first non-option.
+				 */
+				return (-1);
+			}
+			/* do permutation */
+			if (nonopt_start == -1)
+				nonopt_start = optind;
+			else if (nonopt_end != -1) {
+				permute_args(nonopt_start, nonopt_end,
+				    optind, nargv);
+				nonopt_start = optind -
+				    (nonopt_end - nonopt_start);
+				nonopt_end = -1;
+			}
+			optind++;
+			/* process next argument */
+			goto start;
+		}
+		if (nonopt_start != -1 && nonopt_end == -1)
+			nonopt_end = optind;
+
+		/*
+		 * If we have "-" do nothing, if "--" we are done.
+		 */
+		if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {
+			optind++;
+			place = EMSG;
+			/*
+			 * We found an option (--), so if we skipped
+			 * non-options, we have to permute.
+			 */
+			if (nonopt_end != -1) {
+				permute_args(nonopt_start, nonopt_end,
+				    optind, nargv);
+				optind -= nonopt_end - nonopt_start;
+			}
+			nonopt_start = nonopt_end = -1;
+			return (-1);
+		}
+	}
+
+	/*
+	 * Check long options if:
+	 *  1) we were passed some
+	 *  2) the arg is not just "-"
+	 *  3) either the arg starts with -- we are getopt_long_only()
+	 */
+	if (long_options != NULL && place != nargv[optind] &&
+	    (*place == '-' || (flags & FLAG_LONGONLY))) {
+		short_too = 0;
+		if (*place == '-')
+			place++;		/* --foo long option */
+		else if (*place != ':' && strchr(options, *place) != NULL)
+			short_too = 1;		/* could be short option too */
+
+		optchar = parse_long_options(nargv, options, long_options,
+		    idx, short_too);
+		if (optchar != -1) {
+			place = EMSG;
+			return (optchar);
+		}
+	}
+
+	if ((optchar = (int)*place++) == (int)':' ||
+	    optchar == (int)'-' && *place != '\0' ||
+	    (oli = strchr(options, optchar)) == NULL) {
+		/*
+		 * If the user specified "-" and  '-' isn't listed in
+		 * options, return -1 (non-option) as per POSIX.
+		 * Otherwise, it is an unknown option character (or ':').
+		 */
+		if (optchar == (int)'-' && *place == '\0')
+			return (-1);
+		if (!*place)
+			++optind;
+		if (PRINT_ERROR)
+			warnx(illoptchar, optchar);
+		optopt = optchar;
+		return (BADCH);
+	}
+	if (long_options != NULL && optchar == 'W' && oli[1] == ';') {
+		/* -W long-option */
+		if (*place)			/* no space */
+			/* NOTHING */;
+		else if (++optind >= nargc) {	/* no arg */
+			place = EMSG;
+			if (PRINT_ERROR)
+				warnx(recargchar, optchar);
+			optopt = optchar;
+			return (BADARG);
+		} else				/* white space */
+			place = nargv[optind];
+		optchar = parse_long_options(nargv, options, long_options,
+		    idx, 0);
+		place = EMSG;
+		return (optchar);
+	}
+	if (*++oli != ':') {			/* doesn't take argument */
+		if (!*place)
+			++optind;
+	} else {				/* takes (optional) argument */
+		optarg = NULL;
+		if (*place)			/* no white space */
+			optarg = place;
+		/* XXX: disable test for :: if PC? (GNU doesn't) */
+		else if (oli[1] != ':') {	/* arg not optional */
+			if (++optind >= nargc) {	/* no arg */
+				place = EMSG;
+				if (PRINT_ERROR)
+					warnx(recargchar, optchar);
+				optopt = optchar;
+				return (BADARG);
+			} else
+				optarg = nargv[optind];
+		} else if (!(flags & FLAG_PERMUTE)) {
+			/*
+			 * If permutation is disabled, we can accept an
+			 * optional arg separated by whitespace so long
+			 * as it does not start with a dash (-).
+			 */
+			if (optind + 1 < nargc && *nargv[optind + 1] != '-')
+				optarg = nargv[++optind];
+		}
+		place = EMSG;
+		++optind;
+	}
+	/* dump back option letter */
+	return (optchar);
+}
+
+#ifdef REPLACE_GETOPT
+/*
+ * getopt --
+ *	Parse argc/argv argument vector.
+ *
+ * [eventually this will replace the BSD getopt]
+ */
+int
+getopt(int nargc, char * const *nargv, const char *options)
+{
+
+	/*
+	 * We don't pass FLAG_PERMUTE to getopt_internal() since
+	 * the BSD getopt(3) (unlike GNU) has never done this.
+	 *
+	 * Furthermore, since many privileged programs call getopt()
+	 * before dropping privileges it makes sense to keep things
+	 * as simple (and bug-free) as possible.
+	 */
+	return (getopt_internal(nargc, nargv, options, NULL, NULL, 0));
+}
+#endif /* REPLACE_GETOPT */
+
+/*
+ * getopt_long --
+ *	Parse argc/argv argument vector.
+ */
+int
+getopt_long(int nargc, char * const *nargv, const char *options,
+    const struct option *long_options, int *idx)
+{
+
+	return (getopt_internal(nargc, nargv, options, long_options, idx,
+	    FLAG_PERMUTE));
+}
+
+/*
+ * getopt_long_only --
+ *	Parse argc/argv argument vector.
+ */
+int
+getopt_long_only(int nargc, char * const *nargv, const char *options,
+    const struct option *long_options, int *idx)
+{
+
+	return (getopt_internal(nargc, nargv, options, long_options, idx,
+	    FLAG_PERMUTE|FLAG_LONGONLY));
+}
+


Property changes on: box/chris/general/lib/win32/getopt_long.cxx
___________________________________________________________________
Name: svn:executable
   + *


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 19:38:36 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 19:38:36 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r508 - box/chris/general/infrastructure/msvc/2005
Message-ID: <20060225193836.E942C95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 19:38:31 +0000 (Sat, 25 Feb 2006)
New Revision: 508

Modified:
   box/chris/general/infrastructure/msvc/2005/boxbackup.suo
   box/chris/general/infrastructure/msvc/2005/common.vcproj
   box/chris/general/infrastructure/msvc/2005/win32test.vcproj
Log:
* infrastructure/msvc/2005/boxbackup.suo
* infrastructure/msvc/2005/win32test.vcproj
* infrastructure/msvc/2005/common.vcproj
- Added getopt_long.cxx and getopt.h to project


Modified: box/chris/general/infrastructure/msvc/2005/boxbackup.suo
===================================================================
(Binary files differ)

Modified: box/chris/general/infrastructure/msvc/2005/common.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2005/common.vcproj	2006-02-25 19:32:35 UTC (rev 507)
+++ box/chris/general/infrastructure/msvc/2005/common.vcproj	2006-02-25 19:38:31 UTC (rev 508)
@@ -394,6 +394,10 @@
 						>
 					</File>
 					<File
+						RelativePath="..\..\..\lib\win32\getopt_long.cxx"
+						>
+					</File>
+					<File
 						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.cpp"
 						>
 					</File>
@@ -764,6 +768,10 @@
 						>
 					</File>
 					<File
+						RelativePath="..\..\..\lib\win32\getopt.h"
+						>
+					</File>
+					<File
 						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.h"
 						>
 					</File>

Modified: box/chris/general/infrastructure/msvc/2005/win32test.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2005/win32test.vcproj	2006-02-25 19:32:35 UTC (rev 507)
+++ box/chris/general/infrastructure/msvc/2005/win32test.vcproj	2006-02-25 19:38:31 UTC (rev 508)
@@ -41,7 +41,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;NDEBUG"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 19:45:49 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 19:45:49 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r509 - box/chris/general/infrastructure/msvc/2003
Message-ID: <20060225194549.EDE5595@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 19:45:47 +0000 (Sat, 25 Feb 2006)
New Revision: 509

Removed:
   box/chris/general/infrastructure/msvc/2003/boxbackup.ncb
Modified:
   box/chris/general/infrastructure/msvc/2003/common.vcproj
   box/chris/general/infrastructure/msvc/2003/win32test.vcproj
Log:
* 2003/boxbackup.ncb
- Not needed in project, MSVC will regenerate

* 2003/win32test.vcproj, 2003/common.vcproj
- Added getopt.h, getopt_long.cxx and WinNamedPipeStream.* to project


Deleted: box/chris/general/infrastructure/msvc/2003/boxbackup.ncb
===================================================================
(Binary files differ)

Modified: box/chris/general/infrastructure/msvc/2003/common.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/common.vcproj	2006-02-25 19:38:31 UTC (rev 508)
+++ box/chris/general/infrastructure/msvc/2003/common.vcproj	2006-02-25 19:45:47 UTC (rev 509)
@@ -287,6 +287,12 @@
 					<File
 						RelativePath="..\..\..\lib\win32\emu.cpp">
 					</File>
+					<File
+						RelativePath="..\..\..\lib\win32\getopt_long.cxx">
+					</File>
+					<File
+						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.cpp">
+					</File>
 				</Filter>
 				<Filter
 					Name="server"
@@ -569,6 +575,12 @@
 					<File
 						RelativePath="..\..\..\lib\win32\emu.h">
 					</File>
+					<File
+						RelativePath="..\..\..\lib\win32\getopt.h">
+					</File>
+					<File
+						RelativePath="..\..\..\lib\win32\WinNamedPipeStream.h">
+					</File>
 				</Filter>
 				<Filter
 					Name="server"

Modified: box/chris/general/infrastructure/msvc/2003/win32test.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/win32test.vcproj	2006-02-25 19:38:31 UTC (rev 508)
+++ box/chris/general/infrastructure/msvc/2003/win32test.vcproj	2006-02-25 19:45:47 UTC (rev 509)
@@ -20,7 +20,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 20:05:12 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sat, 25 Feb 2006 20:05:12 +0000 (GMT)
Subject: [Box Backup-dev] Problems with command line parsing in bbackupctl
 when using the force-sync option [Chris version of Box Backup]
In-Reply-To: <Pine.LNX.4.62.0602251400300.14656@top.qwarx.com>
References: <43FF0A31.9010207@hostingbrothers.nl> <Pine.LNX.4.62.0602251400300.14656@top.qwarx.com>
Message-ID: <Pine.LNX.4.62.0602252003100.14656@top.qwarx.com>

Hi Mark,

On Sat, 25 Feb 2006, Chris Wilson wrote:
>>  When I execute bbackupctl on Windows XP with the sync option, everything 
>>  works fine, but when I use the force-sync option I get an acces violation 
>>  which I could trace back to the code in emu.h.
>
> You're absolutely right. The getopt emulation code is badly broken. I hadn't 
> noticed before, because I build with mingw which supplies a working getopt, 
> so I don't use the emulated version.
>
> I will rewrite the getopt emulation, but it's a tricky bit of code and will 
> take some time to get right...

Thanks to Martin and Ben, I've added a working getopt to my tree. Please 
could you check out the updated version, and let me know whether or not it 
fixes the problem? Please use the original command names, not the 
underscored versions.

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 |


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 20:07:51 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 20:07:51 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r510 - in box/chris/general/infrastructure/msvc: 2003 2005
Message-ID: <20060225200751.8AE5895@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 20:07:48 +0000 (Sat, 25 Feb 2006)
New Revision: 510

Removed:
   box/chris/general/infrastructure/msvc/2003/boxbackup.suo
   box/chris/general/infrastructure/msvc/2005/boxbackup.suo
Log:
* msvc/2003/boxbackup.suo
* msvc/2005/boxbackup.suo
- Removed the SUO files from repository, since they aren't needed and
  may conflict with user changes


Deleted: box/chris/general/infrastructure/msvc/2003/boxbackup.suo
===================================================================
(Binary files differ)

Deleted: box/chris/general/infrastructure/msvc/2005/boxbackup.suo
===================================================================
(Binary files differ)


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 20:08:12 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 20:08:12 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r511 - box/chris/general/test/win32
Message-ID: <20060225200812.80B9095@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 20:08:11 +0000 (Sat, 25 Feb 2006)
New Revision: 511

Modified:
   box/chris/general/test/win32/testlibwin32.cpp
Log:
* win32/testlibwin32.cpp
- Removed an unused local variable


Modified: box/chris/general/test/win32/testlibwin32.cpp
===================================================================
--- box/chris/general/test/win32/testlibwin32.cpp	2006-02-25 20:07:48 UTC (rev 510)
+++ box/chris/general/test/win32/testlibwin32.cpp	2006-02-25 20:08:11 UTC (rev 511)
@@ -130,10 +130,10 @@
 
 	closelog();
 
+	/*
 	//first off get the path name for the default 
 	char buf[MAX_PATH];
 	
-	/*
 	GetModuleFileName(NULL, buf, sizeof(buf));
 	std::string buffer(buf);
 	std::string conf("-c " + buffer.substr(0,(buffer.find("win32test.exe"))) + "bbackupd.conf");


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 20:37:16 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sat, 25 Feb 2006 20:37:16 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r512 - box/chris/win32/releases
Message-ID: <20060225203716.EE63195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-25 20:32:24 +0000 (Sat, 25 Feb 2006)
New Revision: 512

Added:
   box/chris/win32/releases/boxbackup-0.10_general_r511-backup-client-mingw32.zip
Log:
* boxbackup-0.10_general_r511-backup-client-mingw32.zip
- New Win32 native build, fixes timestamp listing in bbackupquery


Added: box/chris/win32/releases/boxbackup-0.10_general_r511-backup-client-mingw32.zip
===================================================================
(Binary files differ)


Property changes on: box/chris/win32/releases/boxbackup-0.10_general_r511-backup-client-mingw32.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 21:04:05 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sat, 25 Feb 2006 21:04:05 +0000
Subject: [Box Backup-dev] SVN repository
In-Reply-To: <5C911A0D-906E-4445-8533-BBFFA8E6F821@fluffy.co.uk>
References: <5C911A0D-906E-4445-8533-BBFFA8E6F821@fluffy.co.uk>
Message-ID: <1140901445.7736.6.camel@avenin.ebourne.me.uk>

On Sat, 2006-02-25 at 17:56 +0000, Ben Summers wrote:
> Sourceforge now offer SVN repositories.
> 
>     http://sourceforge.net/docs/E09/
> 
> Any advantages in moving?

None that I can see. I guess we could use their bug trackers and stuff,
but they're really not the best.

You mentioned installing trac before, that would be really good. trac &
svn are an excellent combination.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sat Feb 25 22:57:52 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Sat, 25 Feb 2006 22:57:52 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <1140870889.5454.17.camel@avenin.ebourne.me.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>	 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>	 <43FF0027.60108@netinertia.co.uk>	 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>	 <43FF259F.5000006@netinertia.co.uk>	 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>	 <43FF3F98.3070501@netinertia.co.uk>	 <1140801885.5454.10.camel@avenin.ebourne.me.uk>	 <43FF519A.8020104@netinertia.co.uk> <1140870889.5454.17.camel@avenin.ebourne.me.uk>
Message-ID: <4400E0F0.3080105@netinertia.co.uk>

Martin Ebourne wrote:
> On Fri, 2006-02-24 at 18:34 +0000, James O'Gorman wrote:
>> Well I made the changes to my svn working copy, but for some reason 'svn 
>> diff .' only showed the changes to configure.ac. Maybe I did something 
>> wrong. svn status did show that I had renamed a load of files though.
> 
> That's odd, because the diffs appear to have been taken from the
> released version, not the svn version. They've all got the copyright
> notices in, which will break the diffs.

Sorry, I forgot to redo the diffs after testing against the svn checkout 
instead of the release tarball. I'll post those tomorrow if I get time 
to do it.

>> I've attached a tar/gzip archive that has a shell script to rename the 
>> necessary files, and a directory with the individual patches I created 
>> with diff (not svn diff). I've also attached the single diff I got from 
>> svn diff for configure.ac.
>>
>> Is the svn diff the preferable format? If so I'll see what's going on 
>> with that and submit a new set of patches.
> 
> How you've submitted them this time is fine. It should be quite easy to
> get them in from that. Just need the C++ stuff fixed, and to be done
> from the svn working copy.

OK, I'll give that a go.

James

From boxbackup-dev@fluffy.co.uk  Sun Feb 26 00:25:52 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 00:25:52 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r513 - box/chris/general/lib/backupclient
Message-ID: <20060226002552.9F96595@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 00:25:44 +0000 (Sun, 26 Feb 2006)
New Revision: 513

Modified:
   box/chris/general/lib/backupclient/BackupClientRestore.h
Log:
* BackupClientRestore.h
- Additional return codes from BackupClientRestore when the parent directory
  of the restore target does not exist


Modified: box/chris/general/lib/backupclient/BackupClientRestore.h
===================================================================
--- box/chris/general/lib/backupclient/BackupClientRestore.h	2006-02-25 20:32:24 UTC (rev 512)
+++ box/chris/general/lib/backupclient/BackupClientRestore.h	2006-02-26 00:25:44 UTC (rev 513)
@@ -16,7 +16,9 @@
 {
 	Restore_Complete = 0,
 	Restore_ResumePossible = 1,
-	Restore_TargetExists = 2
+	Restore_TargetExists = 2,
+	Restore_TargetPathNotFound = 3,
+	Restore_UnknownError = 4,
 };
 
 int BackupClientRestore(BackupProtocolClient &rConnection, int64_t DirectoryID, const char *LocalDirectoryName,


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 00:26:28 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 00:26:28 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r514 - box/chris/general/bin/bbackupquery
Message-ID: <20060226002628.6A75095@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 00:26:26 +0000 (Sun, 26 Feb 2006)
New Revision: 514

Modified:
   box/chris/general/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Unix compile fix
- Detect and report failed restore due to parent directory of restore target
  not existing


Modified: box/chris/general/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/general/bin/bbackupquery/BackupQueries.cpp	2006-02-26 00:25:44 UTC (rev 513)
+++ box/chris/general/bin/bbackupquery/BackupQueries.cpp	2006-02-26 00:26:26 UTC (rev 514)
@@ -863,7 +863,7 @@
 		if(!ConvertConsoleToUtf8(args[0].c_str(), fileName))
 			return;
 #else
-		const std::string& fileName(args[0]);
+		std::string fileName(args[0]);
 #endif
 
 		if(!opts['i'])
@@ -1756,6 +1756,12 @@
 		printf("The target directory exists. You cannot restore over an existing directory.\n");
 		break;
 		
+	case Restore_TargetPathNotFound:
+		printf("The target directory path does not exist.\n"
+			"To restore to a directory whose parent "
+			"does not exist, create the parent first.\n");
+		break;
+
 	default:
 		printf("ERROR: Unknown restore result.\n");
 		break;


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 00:27:48 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 00:27:48 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r515 - box/chris/general/bin/bbackupd
Message-ID: <20060226002748.C0A7995@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 00:27:45 +0000 (Sun, 26 Feb 2006)
New Revision: 515

Modified:
   box/chris/general/bin/bbackupd/BackupDaemon.cpp
Log:
* BackupDaemon.cpp
- Fixed an infinite loop after a backup fails to complete when 
  StoreInfoObjectFile is disabled (sorry!)
- Unix compile fix


Modified: box/chris/general/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-26 00:26:26 UTC (rev 514)
+++ box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-26 00:27:45 UTC (rev 515)
@@ -580,6 +580,7 @@
 
  	bool deserialised = DeserializeStoreObjectInfo(clientStoreMarker, 
 		lastSyncTime, nextSyncTime);
+	bool was_deserialised = deserialised;
  
 	// --------------------------------------------------------------------------------------------
 	
@@ -696,6 +697,7 @@
 			// In case the backup throws an exception,
 			// we should not try to delete the store info
 			// object file again.
+			was_deserialised = deserialised;
 			deserialised = false;
 			
 			// Do sync
@@ -809,7 +811,7 @@
 				SerializeStoreObjectInfo(clientStoreMarker, lastSyncTime, nextSyncTime);
 				// Next time around, make sure we delete
 				// the store info object file.
-				deserialised = true;
+				deserialised = was_deserialised;
 
 				// --------------------------------------------------------------------------------------------
 			}
@@ -1237,8 +1239,8 @@
 			LeaveCriticalSection(&mMessageQueueLock);
 #else
 			message += "\n";
-			mpCommandSocketInfo->mpConnectedSocket->Write(message,
-				strlen(message));
+			mpCommandSocketInfo->mpConnectedSocket->Write(
+				message.c_str(), message.size());
 #endif
 		}
 		catch(...)


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 00:28:24 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 00:28:24 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r516 - box/chris/general/lib/backupclient
Message-ID: <20060226002824.7892295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 00:28:22 +0000 (Sun, 26 Feb 2006)
New Revision: 516

Modified:
   box/chris/general/lib/backupclient/BackupClientRestore.cpp
Log:
* BackupClientRestore.cpp
- Detect when the user tries to restore to a directory whose parent does not
  exist, and return an appropriate error


Modified: box/chris/general/lib/backupclient/BackupClientRestore.cpp
===================================================================
--- box/chris/general/lib/backupclient/BackupClientRestore.cpp	2006-02-26 00:27:45 UTC (rev 515)
+++ box/chris/general/lib/backupclient/BackupClientRestore.cpp	2006-02-26 00:28:22 UTC (rev 516)
@@ -206,7 +206,7 @@
 //		Created: 23/11/03
 //
 // --------------------------------------------------------------------------
-static void BackupClientRestoreDir(BackupProtocolClient &rConnection, int64_t DirectoryID, std::string &rLocalDirectoryName,
+static int BackupClientRestoreDir(BackupProtocolClient &rConnection, int64_t DirectoryID, std::string &rLocalDirectoryName,
 	RestoreParams &Params, RestoreResumeInfo &rLevel)
 {
 	// If we're resuming... check that we haven't got a next level to look at
@@ -222,12 +222,11 @@
 		// Remove the level for the recursed directory
 		rLevel.RemoveLevel();		
 	}
-	
-	// Save the resumption information
-	Params.mResumeInfo.Save(Params.mRestoreResumeInfoFilename);
 
 	// Create the local directory (if not already done) -- path and owner set later, just use restrictive owner mode
-	switch(ObjectExists(rLocalDirectoryName.c_str()))
+	int exists = ObjectExists(rLocalDirectoryName.c_str());
+
+	switch(exists)
 	{
 		case ObjectExists_Dir:
 			// Do nothing
@@ -244,16 +243,64 @@
 			}
 			// follow through to... (no break)
 		case ObjectExists_NoObject:
-			if(::mkdir(rLocalDirectoryName.c_str(), S_IRWXU) != 0)
-			{
-				THROW_EXCEPTION(CommonException, OSFileError);
-			}
 			break;
 		default:
 			ASSERT(false);
 			break;
 	}
+
+	std::string parentDirectoryName(rLocalDirectoryName);
+	if(parentDirectoryName[parentDirectoryName.size() - 1] == '/')
+	{
+		parentDirectoryName.resize(parentDirectoryName.size() - 1);
+	}
+
+	int lastSlash = parentDirectoryName.rfind(DIRECTORY_SEPARATOR_ASCHAR);
+	if(lastSlash != std::string::npos)
+	{
+		// the target directory is a deep path, remove the last
+		// directory name and check that the resulting parent
+		// exists, otherwise the restore should fail.
+		parentDirectoryName.resize(lastSlash);
+		switch(ObjectExists(parentDirectoryName.c_str()))
+		{
+			case ObjectExists_Dir:
+				// this is fine, do nothing
+				break;
+
+			case ObjectExists_File:
+				fprintf(stderr, "Failed to restore: '%s' "
+					"is a file, but should be a "
+					"directory.\n", 
+					parentDirectoryName.c_str());
+				return Restore_TargetPathNotFound;
+
+			case ObjectExists_NoObject:
+				fprintf(stderr, "Failed to restore: "
+					"parent '%s' of target directory "
+					"does not exist.\n",
+					parentDirectoryName.c_str());
+				return Restore_TargetPathNotFound;
+
+			default:
+				fprintf(stderr, "Failed to restore: "
+					"unknown result from "
+					"ObjectExists('%s').\n",
+					parentDirectoryName.c_str());
+				return Restore_UnknownError;
+		}
+	}
+
+	if((exists == ObjectExists_NoObject ||
+		exists == ObjectExists_File) && 
+		::mkdir(rLocalDirectoryName.c_str(), S_IRWXU) != 0)
+	{
+		THROW_EXCEPTION(CommonException, OSFileError);
+	}
 	
+	// Save the resumption information
+	Params.mResumeInfo.Save(Params.mRestoreResumeInfoFilename);
+	
 	// Fetch the directory listing from the server -- getting a list of files which is approparite to the restore type
 	rConnection.QueryListDirectory(
 			DirectoryID,
@@ -347,7 +394,7 @@
 	}
 
 	
-	// Recuse to directories
+	// Recurse to directories
 	{
 		BackupStoreDirectory::Iterator i(dir);
 		BackupStoreDirectory::Entry *en = 0;
@@ -364,7 +411,14 @@
 				RestoreResumeInfo &rnextLevel(rLevel.AddLevel(en->GetObjectID(), nm.GetClearFilename()));
 				
 				// Recurse
-				BackupClientRestoreDir(rConnection, en->GetObjectID(), localDirname, Params, rnextLevel);
+				int result = BackupClientRestoreDir(
+					rConnection, en->GetObjectID(), 
+					localDirname, Params, rnextLevel);
+
+				if (result != Restore_Complete)
+				{
+					return result;
+				}
 				
 				// Remove the level for the above call
 				rLevel.RemoveLevel();
@@ -373,7 +427,9 @@
 				rLevel.mRestoredObjects.insert(en->GetObjectID());
 			}
 		}
-	}	
+	}
+
+	return Restore_Complete;
 }
 
 
@@ -444,7 +500,12 @@
 	
 	// Restore the directory
 	std::string localName(LocalDirectoryName);
-	BackupClientRestoreDir(rConnection, DirectoryID, localName, params, params.mResumeInfo);
+	int result = BackupClientRestoreDir(rConnection, DirectoryID, 
+		localName, params, params.mResumeInfo);
+	if (result != Restore_Complete)
+	{
+		return result;
+	}
 
 	// Undelete the directory on the server?
 	if(RestoreDeleted && UndeleteAfterRestoreDeleted)


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 00:28:56 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 00:28:56 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r517 - box/chris/general/test/bbackupd
Message-ID: <20060226002856.7270295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 00:28:54 +0000 (Sun, 26 Feb 2006)
New Revision: 517

Modified:
   box/chris/general/test/bbackupd/testbbackupd.cpp
Log:
* testbbackupd.cpp
- Unit test for restoring to a directory whose parent does not exist


Modified: box/chris/general/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/general/test/bbackupd/testbbackupd.cpp	2006-02-26 00:28:22 UTC (rev 516)
+++ box/chris/general/test/bbackupd/testbbackupd.cpp	2006-02-26 00:28:54 UTC (rev 517)
@@ -815,6 +815,13 @@
 			// Make sure you can't restore a restored directory
 			TEST_THAT(BackupClientRestore(protocol, restoredirid, "testfiles/restore-Test1", true /* print progress dots */) == Restore_TargetExists);
 			
+			// Make sure you can't restore to a nonexistant path
+			printf("Try to restore to a path that doesn't exist\n");
+			TEST_THAT(BackupClientRestore(protocol, restoredirid, 
+				"testfiles/no-such-path/subdir", 
+				true /* print progress dots */) 
+				== Restore_TargetPathNotFound);
+			
 			// Find ID of the deleted directory
 			deldirid = GetDirID(protocol, "x1", restoredirid);
 			TEST_THAT(deldirid != 0);


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 11:40:48 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 11:40:48 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r518 - box/chris/general/lib/backupclient
Message-ID: <20060226114048.B0D0195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 11:40:46 +0000 (Sun, 26 Feb 2006)
New Revision: 518

Modified:
   box/chris/general/lib/backupclient/BackupClientRestore.cpp
Log:
* BackupClientRestore.cpp
- Use the correct separator when removing trailing slashes


Modified: box/chris/general/lib/backupclient/BackupClientRestore.cpp
===================================================================
--- box/chris/general/lib/backupclient/BackupClientRestore.cpp	2006-02-26 00:28:54 UTC (rev 517)
+++ box/chris/general/lib/backupclient/BackupClientRestore.cpp	2006-02-26 11:40:46 UTC (rev 518)
@@ -250,7 +250,8 @@
 	}
 
 	std::string parentDirectoryName(rLocalDirectoryName);
-	if(parentDirectoryName[parentDirectoryName.size() - 1] == '/')
+	if(parentDirectoryName[parentDirectoryName.size() - 1] == 
+		DIRECTORY_SEPARATOR_ASCHAR)
 	{
 		parentDirectoryName.resize(parentDirectoryName.size() - 1);
 	}


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 11:42:09 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 11:42:09 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r519 - box/chris/general/lib/win32
Message-ID: <20060226114209.128C195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 11:42:08 +0000 (Sun, 26 Feb 2006)
New Revision: 519

Modified:
   box/chris/general/lib/win32/emu.cpp
Log:
* emu.cpp
- Report Windows' path not found errors as ENOENT, just like file not found


Modified: box/chris/general/lib/win32/emu.cpp
===================================================================
--- box/chris/general/lib/win32/emu.cpp	2006-02-26 11:40:46 UTC (rev 518)
+++ box/chris/general/lib/win32/emu.cpp	2006-02-26 11:42:08 UTC (rev 519)
@@ -695,7 +695,8 @@
 	{
 		DWORD err = GetLastError();
 
-		if (err == ERROR_FILE_NOT_FOUND)
+		if (err == ERROR_FILE_NOT_FOUND ||
+			err == ERROR_PATH_NOT_FOUND)
 		{
 			errno = ENOENT;
 		}


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 12:14:05 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Sun, 26 Feb 2006 12:14:05 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk> <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk> <43FF0027.60108@netinertia.co.uk> <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk> <43FF259F.5000006@netinertia.co.uk> <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>
Message-ID: <44019B8D.6010900@netinertia.co.uk>

OK, I've been having a better look at this.

Ben Summers wrote:
> 1) It's really nasty to use this for cpp files, because to make a change 
> you've then got to ./configure again, which means a complete rebuild. 
> There must be a way to get autoconf to put the path to perl in a 
> #define, in which case you can use that instead.

I take it you still wouldn't want #define @PERL@ in the .cpp file - 
which means there'd need to be something in infrastructure/m4? In which 
case, I think Martin may have to look at that, if possible. I really 
have no idea what's going on there!

> 2) There are lots of scripts which need parsing. Maybe it would be nicer 
> to modify makebuildenv.pl to go through and modify the first line of 
> every perl script?

This bit is certainly doable. My Perl-foo is at least half-decent! (I hope.)

To make sure the path to perl is right though, should I move 
makebuildenv.pl to makebuildenv.pl.in, set the first line to #!@PERL@, 
and then set something like: my $perl_executable = @PERL@; ?

James

From boxbackup-dev@fluffy.co.uk  Sun Feb 26 12:39:31 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sun, 26 Feb 2006 12:39:31 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <44019B8D.6010900@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>
 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>
 <43FF0027.60108@netinertia.co.uk>
 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
 <43FF259F.5000006@netinertia.co.uk>
 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>
 <44019B8D.6010900@netinertia.co.uk>
Message-ID: <1140957571.7736.11.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-26 at 12:14 +0000, James O'Gorman wrote:
> I take it you still wouldn't want #define @PERL@ in the .cpp file - 
> which means there'd need to be something in infrastructure/m4? In which 
> case, I think Martin may have to look at that, if possible. I really 
> have no idea what's going on there!

Have a look at BoxConfig.h. Your define is probably already there. If
not, then AC_SUBST it.

> > 2) There are lots of scripts which need parsing. Maybe it would be nicer 
> > to modify makebuildenv.pl to go through and modify the first line of 
> > every perl script?
> 
> This bit is certainly doable. My Perl-foo is at least half-decent! (I hope.)
> 
> To make sure the path to perl is right though, should I move 
> makebuildenv.pl to makebuildenv.pl.in, set the first line to #!@PERL@, 
> and then set something like: my $perl_executable = @PERL@; ?

Sounds like a reasonable plan. I have to say that I don't see why Ben
prefers having a perl script that modifies all the files compared to
autoconf doing it. Am I missing something?

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 14:17:43 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 14:17:43 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r520 - box/chris/general/bin/bbackupd
Message-ID: <20060226141743.D424F95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 14:17:40 +0000 (Sun, 26 Feb 2006)
New Revision: 520

Modified:
   box/chris/general/bin/bbackupd/Win32ServiceFunctions.cpp
Log:
* Win32ServiceFunctions.cpp
- InstallService and RemoveService return a result code, 0 for success,
  1 for failure
- InstallService and OurService take an optional configuration file name
  parameter
- Better logging of failure to install, remove or start service


Modified: box/chris/general/bin/bbackupd/Win32ServiceFunctions.cpp
===================================================================
--- box/chris/general/bin/bbackupd/Win32ServiceFunctions.cpp	2006-02-26 11:42:08 UTC (rev 519)
+++ box/chris/general/bin/bbackupd/Win32ServiceFunctions.cpp	2006-02-26 14:17:40 UTC (rev 520)
@@ -93,28 +93,30 @@
 // It also returns on any error because the
 // service cannot start if there is an eror.
 
+static char* spConfigFileName;
+
 VOID ServiceMain(DWORD argc, LPTSTR *argv) 
 {
-    // initialise service status
-    gServiceStatus.dwServiceType = SERVICE_WIN32;
-    gServiceStatus.dwCurrentState = SERVICE_STOPPED;
-    gServiceStatus.dwControlsAccepted = 0;
-    gServiceStatus.dwWin32ExitCode = NO_ERROR;
-    gServiceStatus.dwServiceSpecificExitCode = NO_ERROR;
-    gServiceStatus.dwCheckPoint = 0;
-    gServiceStatus.dwWaitHint = 0;
+	// initialise service status
+	gServiceStatus.dwServiceType = SERVICE_WIN32;
+	gServiceStatus.dwCurrentState = SERVICE_STOPPED;
+	gServiceStatus.dwControlsAccepted = 0;
+	gServiceStatus.dwWin32ExitCode = NO_ERROR;
+	gServiceStatus.dwServiceSpecificExitCode = NO_ERROR;
+	gServiceStatus.dwCheckPoint = 0;
+	gServiceStatus.dwWaitHint = 0;
 
-    gServiceStatusHandle = RegisterServiceCtrlHandler(gServiceName, 
-	ServiceControlHandler);
+	gServiceStatusHandle = RegisterServiceCtrlHandler(gServiceName, 
+		ServiceControlHandler);
 
-    if (gServiceStatusHandle)
-    {
-        // service is starting
-        gServiceStatus.dwCurrentState = SERVICE_START_PENDING;
-        SetServiceStatus(gServiceStatusHandle, &gServiceStatus);
+	if (gServiceStatusHandle)
+	{
+		// service is starting
+		gServiceStatus.dwCurrentState = SERVICE_START_PENDING;
+		SetServiceStatus(gServiceStatusHandle, &gServiceStatus);
 
-        // do initialisation here
-        gStopServiceEvent = CreateEvent( 0, TRUE, FALSE, 0 );
+		// do initialisation here
+		gStopServiceEvent = CreateEvent(0, TRUE, FALSE, 0);
 		if (!gStopServiceEvent)
 		{
 			gServiceStatus.dwControlsAccepted &= 
@@ -129,7 +131,7 @@
 			NULL,
 			0,
 			RunService,
-			0,
+			spConfigFileName,
 			CREATE_SUSPENDED,
 			NULL);
 
@@ -138,7 +140,7 @@
 
 		// we are now running so tell the SCM
 		gServiceStatus.dwControlsAccepted |= 
-		(SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN);
+			(SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN);
 		gServiceStatus.dwCurrentState = SERVICE_RUNNING;
 		SetServiceStatus(gServiceStatusHandle, &gServiceStatus);
 
@@ -156,11 +158,13 @@
 			~(SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN);
 		gServiceStatus.dwCurrentState = SERVICE_STOPPED;
 		SetServiceStatus(gServiceStatusHandle, &gServiceStatus);
-    }
+	}
 }
 
-void OurService(void)
+void OurService(char* pConfigFileName)
 {
+	spConfigFileName = pConfigFileName;
+
 	SERVICE_TABLE_ENTRY serviceTable[] = 
 	{ 
 		{ SERVICE_NAME, (LPSERVICE_MAIN_FUNCTION) ServiceMain },
@@ -179,28 +183,51 @@
 	}
 }
 
-void InstallService(void)
+int InstallService(const char* pConfigFileName)
 {
-	SC_HANDLE newService, scm;
+	if (pConfigFileName != NULL)
+	{
+		struct stat st;
 
-	scm = OpenSCManager(0,0,SC_MANAGER_CREATE_SERVICE);
+		if (emu_stat(pConfigFileName, &st) != 0)
+		{
+			syslog(LOG_ERR, "Failed to open configuration file: "
+				"%s: %s", pConfigFileName, strerror(errno));
+			return 1;
+		}
 
+		if (! st.st_mode & S_IFREG)
+		{
+	
+			syslog(LOG_ERR, "Failed to open configuration file: "
+				"%s: not a file", pConfigFileName);
+			return 1;
+		}
+	}
+
+	SC_HANDLE scm = OpenSCManager(0,0,SC_MANAGER_CREATE_SERVICE);
+
 	if (!scm) 
 	{
 		syslog(LOG_ERR, "Failed to open service control manager: "
 			"error %d", GetLastError());
-		return;
+		return 1;
 	}
 
 	char cmd[MAX_PATH];
 	GetModuleFileName(NULL, cmd, sizeof(cmd)-1);
 	cmd[sizeof(cmd)-1] = 0;
 
-	char cmd_args[MAX_PATH];
-	_snprintf(cmd_args, sizeof(cmd_args)-1, "%s --service", cmd);
-	cmd_args[sizeof(cmd_args)-1] = 0;
+	std::string cmdWithArgs(cmd);
+	cmdWithArgs += " --service";
 
-	newService = CreateService(
+	if (pConfigFileName != NULL)
+	{
+		cmdWithArgs += " ";
+		cmdWithArgs += pConfigFileName;
+	}
+
+	SC_HANDLE newService = CreateService(
 		scm, 
 		SERVICE_NAME, 
 		"Box Backup", 
@@ -208,14 +235,30 @@
 		SERVICE_WIN32_OWN_PROCESS, 
 		SERVICE_AUTO_START, 
 		SERVICE_ERROR_NORMAL, 
-		cmd_args, 
+		cmdWithArgs.c_str(),
 		0,0,0,0,0);
 
+	DWORD err = GetLastError();
+	CloseServiceHandle(scm);
+
 	if (!newService) 
 	{
-		::syslog(LOG_ERR, "Failed to create Box Backup service: "
-			"error %d", GetLastError());
-		return;
+		if (err == ERROR_SERVICE_EXISTS)
+		{
+			::syslog(LOG_ERR, "Failed to create Box Backup "
+				"service: it already exists");
+		}
+		else if (err == ERROR_SERVICE_MARKED_FOR_DELETE)
+		{
+			::syslog(LOG_ERR, "Failed to create Box Backup "
+				"service: it is waiting to be deleted");
+		}
+		else
+		{
+			::syslog(LOG_ERR, "Failed to create Box Backup "
+				"service: error %d", err);
+		}
+		return 1;
 	}
 
 	::syslog(LOG_INFO, "Created Box Backup service");
@@ -231,45 +274,75 @@
 	}
 
 	CloseServiceHandle(newService);
-	CloseServiceHandle(scm);
+
+	return 0;
 }
 
-void RemoveService(void)
+int RemoveService(void)
 {
-	SC_HANDLE service, scm;
-	SERVICE_STATUS status;
+	SC_HANDLE scm = OpenSCManager(0,0,SC_MANAGER_CREATE_SERVICE);
 
-	scm = OpenSCManager(0,0,SC_MANAGER_CREATE_SERVICE);
-
 	if (!scm) 
 	{
 		syslog(LOG_ERR, "Failed to open service control manager: "
 			"error %d", GetLastError());
-		return;
+		return 1;
 	}
 
-	service = OpenService(scm, SERVICE_NAME, SERVICE_ALL_ACCESS|DELETE);
-	ControlService(service, SERVICE_CONTROL_STOP, &status);
+	SC_HANDLE service = OpenService(scm, SERVICE_NAME, 
+		SERVICE_ALL_ACCESS|DELETE);
+	DWORD err = GetLastError();
+	CloseServiceHandle(scm);
 
 	if (!service)
 	{
-		syslog(LOG_ERR, "Failed to open Box Backup service: "
-			"error %d", GetLastError());
-		return;
+		if (err == ERROR_SERVICE_DOES_NOT_EXIST ||
+			err == ERROR_IO_PENDING) 
+			// hello microsoft? anyone home?
+		{
+			syslog(LOG_ERR, "Failed to open Box Backup service: "
+				"not installed or not found");
+		}
+		else
+		{
+			syslog(LOG_ERR, "Failed to open Box Backup service: "
+				"error %d", err);
+		}
+		return 1;
 	}
 
-	if (DeleteService(service))
+	SERVICE_STATUS status;
+	if (!ControlService(service, SERVICE_CONTROL_STOP, &status))
 	{
+		err = GetLastError();
+		if (err != ERROR_SERVICE_NOT_ACTIVE)
+		{
+			syslog(LOG_WARNING, "Failed to stop Box Backup "
+				"service: error %d", err);
+		}
+	}
+
+	BOOL deleted = DeleteService(service);
+	err = GetLastError();
+	CloseServiceHandle(service);
+
+	if (deleted)
+	{
 		syslog(LOG_INFO, "Box Backup service deleted");
+		return 0;
 	}
+	else if (err == ERROR_SERVICE_MARKED_FOR_DELETE)
+	{
+		syslog(LOG_ERR, "Failed to remove Box Backup service: "
+			"it is already being deleted");
+	}
 	else
 	{
 		syslog(LOG_ERR, "Failed to remove Box Backup service: "
-			"error %d", GetLastError());
+			"error %d", err);
 	}
 
-	CloseServiceHandle(service);
-	CloseServiceHandle(scm);
+	return 1;
 }
 
 #endif // WIN32


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 14:18:48 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 14:18:48 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r521 - box/chris/general/lib/server
Message-ID: <20060226141848.95A4B95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 14:18:43 +0000 (Sun, 26 Feb 2006)
New Revision: 521

Modified:
   box/chris/general/lib/server/Daemon.cpp
Log:
* Daemon.cpp
- Don't call openlog on Win32, since we already opened the log in 
  bbackupd.cpp, with a better program name than DaemonName().


Modified: box/chris/general/lib/server/Daemon.cpp
===================================================================
--- box/chris/general/lib/server/Daemon.cpp	2006-02-26 14:17:40 UTC (rev 520)
+++ box/chris/general/lib/server/Daemon.cpp	2006-02-26 14:18:43 UTC (rev 521)
@@ -263,10 +263,11 @@
 				break;
 			}
 		}
-#endif // ! WIN32
 
 		// open the log
 		::openlog(DaemonName(), LOG_PID, LOG_LOCAL6);
+#endif // ! WIN32
+
 		// Log the start message
 		::syslog(LOG_INFO, "Starting daemon (config: %s) (version " 
 			BOX_VERSION ")", mConfigFileName.c_str());


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 14:20:48 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 14:20:48 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r522 - box/chris/general/bin/bbackupd
Message-ID: <20060226142048.E273495@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 14:20:45 +0000 (Sun, 26 Feb 2006)
New Revision: 522

Modified:
   box/chris/general/bin/bbackupd/Win32BackupService.cpp
   box/chris/general/bin/bbackupd/Win32BackupService.h
Log:
* Win32BackupService.cpp, Win32BackupService.h
- Accept configuration file name as parameter to RunService, and pass it
  to Win32BackupService::WinService()
- Cleaned up generation of default config file name in WinService


Modified: box/chris/general/bin/bbackupd/Win32BackupService.cpp
===================================================================
--- box/chris/general/bin/bbackupd/Win32BackupService.cpp	2006-02-26 14:18:43 UTC (rev 521)
+++ box/chris/general/bin/bbackupd/Win32BackupService.cpp	2006-02-26 14:20:45 UTC (rev 522)
@@ -17,8 +17,8 @@
 
 unsigned int WINAPI RunService(LPVOID lpParameter)
 {
-	DWORD retVal = gpDaemonService->WinService();
-	SetEvent( gStopServiceEvent );
+	DWORD retVal = gpDaemonService->WinService((const char*) lpParameter);
+	SetEvent(gStopServiceEvent);
 	return retVal;
 }
 
@@ -27,25 +27,36 @@
 	gpDaemonService->SetTerminateWanted();
 }
 
-DWORD Win32BackupService::WinService(void)
+DWORD Win32BackupService::WinService(const char* pConfigFileName)
 {
-	int argc = 2;
-	//first off get the path name for the default 
-	char buf[MAX_PATH];
+	char exepath[MAX_PATH];
+	GetModuleFileName(NULL, exepath, sizeof(exepath));
+
+	std::string configfile;
 	
-	GetModuleFileName(NULL, buf, sizeof(buf));
-	std::string buffer(buf);
-	std::string conf( "-c");
-	std::string cfile(buffer.substr(0,(buffer.find("bbackupd.exe"))) 
-			+ "bbackupd.conf");
+	if (pConfigFileName != NULL)
+	{
+		configfile = pConfigFileName;
+	}
+	else
+	{
+		// make the default config file name,
+		// based on the program path
+		configfile = exepath;
+		configfile = configfile.substr(0,
+			configfile.rfind(DIRECTORY_SEPARATOR_ASCHAR));
+		configfile += DIRECTORY_SEPARATOR "bbackupd.conf";
+	}
 
-	const char *argv[] = {conf.c_str(), cfile.c_str()};
+	const char *argv[] = {exepath, "-c", configfile.c_str()};
+	int argc = sizeof(argv) / sizeof(*argv);
+	DWORD ret;
 
 	MAINHELPER_START
+	ret = this->Main(BOX_FILE_BBACKUPD_DEFAULT_CONFIG, argc, argv);
+	MAINHELPER_END
 
-	return this->Main(BOX_FILE_BBACKUPD_DEFAULT_CONFIG, argc, argv);
-
-	MAINHELPER_END
+	return ret;
 }
 
 #endif // WIN32

Modified: box/chris/general/bin/bbackupd/Win32BackupService.h
===================================================================
--- box/chris/general/bin/bbackupd/Win32BackupService.h	2006-02-26 14:18:43 UTC (rev 521)
+++ box/chris/general/bin/bbackupd/Win32BackupService.h	2006-02-26 14:20:45 UTC (rev 522)
@@ -12,7 +12,7 @@
 class Win32BackupService : public BackupDaemon
 {
 public:
-	DWORD WinService(void);
+	DWORD WinService(const char* pConfigFileName);
 };
 
 #endif // WIN32


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 14:23:11 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 14:23:11 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r523 - box/chris/general/bin/bbackupd
Message-ID: <20060226142311.DDB8695@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 14:23:11 +0000 (Sun, 26 Feb 2006)
New Revision: 523

Modified:
   box/chris/general/bin/bbackupd/bbackupd.cpp
Log:
* bbackupd.cpp
- openlog() on Win32 with the same options as Daemon.cpp, not that it matters
- Return exit codes from InstallService and RemoveService
- Pass configuration file name, if given on command line, to InstallService
  and OurService (allows configuration file to be specified for service)
- Log service shutdown as well as startup


Modified: box/chris/general/bin/bbackupd/bbackupd.cpp
===================================================================
--- box/chris/general/bin/bbackupd/bbackupd.cpp	2006-02-26 14:20:45 UTC (rev 522)
+++ box/chris/general/bin/bbackupd/bbackupd.cpp	2006-02-26 14:23:11 UTC (rev 523)
@@ -28,7 +28,7 @@
 
 #ifdef WIN32
 
-	::openlog("Box Backup (bbackupd)", 0, 0);
+	::openlog("Box Backup (bbackupd)", LOG_PID, LOG_LOCAL6);
 
 	if(argc == 2 &&
 		(::strcmp(argv[1], "--help") == 0 ||
@@ -40,17 +40,20 @@
 	}
 	if(argc == 2 && ::strcmp(argv[1], "-r") == 0)
 	{
-		RemoveService();
-		return 0;
+		return RemoveService();
 	}
-	if(argc == 2 && ::strcmp(argv[1], "-i") == 0)
+	if((argc == 2 || argc == 3) && ::strcmp(argv[1], "-i") == 0)
 	{
-		InstallService();
-		return 0;
+		const char* config = NULL;
+		if (argc == 3)
+		{
+			config = argv[2];
+		}
+		return InstallService(config);
 	}
 
 	bool runAsWin32Service = false;
-	if (argc == 2 && ::strcmp(argv[1], "--service") == 0)
+	if ((argc == 2 || argc == 3) && ::strcmp(argv[1], "--service") == 0)
 	{
 		runAsWin32Service = true;
 	}
@@ -75,8 +78,22 @@
 
 	if (runAsWin32Service)
 	{
-		syslog(LOG_INFO,"Starting Box Backup Service");
-		OurService();
+		syslog(LOG_INFO, "Box Backup service starting");
+
+		char* config = NULL;
+		if (argc == 3)
+		{
+			config = strdup(argv[2]);
+		}
+
+		OurService(config);
+
+		if (config)
+		{
+			free(config);
+		}
+
+		syslog(LOG_INFO, "Box Backup service shut down");
 	}
 	else
 	{


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 14:23:32 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 14:23:32 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r524 - box/chris/general/bin/bbackupd
Message-ID: <20060226142332.5036495@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 14:23:30 +0000 (Sun, 26 Feb 2006)
New Revision: 524

Modified:
   box/chris/general/bin/bbackupd/Win32ServiceFunctions.h
Log:
* Win32ServiceFunctions.h
- Updated prototypes


Modified: box/chris/general/bin/bbackupd/Win32ServiceFunctions.h
===================================================================
--- box/chris/general/bin/bbackupd/Win32ServiceFunctions.h	2006-02-26 14:23:11 UTC (rev 523)
+++ box/chris/general/bin/bbackupd/Win32ServiceFunctions.h	2006-02-26 14:23:30 UTC (rev 524)
@@ -12,8 +12,8 @@
 #ifndef WIN32SERVICEFUNCTIONS_H
 #define WIN32SERVICEFUNCTIONS_H
 
-void RemoveService(void);
-void InstallService(void);
-void OurService(void);
+int  RemoveService(void);
+int  InstallService(const char* pConfigFilePath);
+void OurService(char* pConfigFileName);
 
 #endif


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 16:33:33 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 16:33:33 +0000
Subject: [Box Backup-dev] COMMIT r516 - box/chris/general/lib/backupclient
In-Reply-To: <20060226002824.7892295@s0g0.pems.testserver.co.uk>
References: <20060226002824.7892295@s0g0.pems.testserver.co.uk>
Message-ID: <D58F6D65-28C8-4DB5-ABB9-6C9009AF6CE6@fluffy.co.uk>

What's wrong with exceptions?

Ben


On 26 Feb 2006, at 00:28, subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-26 00:28:22 +0000 (Sun, 26 Feb 2006)
> New Revision: 516
>
> Modified:
>    box/chris/general/lib/backupclient/BackupClientRestore.cpp
> Log:
> * BackupClientRestore.cpp
> - Detect when the user tries to restore to a directory whose parent  
> does not
>   exist, and return an appropriate error
>
>
> Modified: box/chris/general/lib/backupclient/BackupClientRestore.cpp
> ===================================================================
> --- box/chris/general/lib/backupclient/BackupClientRestore.cpp	 
> 2006-02-26 00:27:45 UTC (rev 515)
> +++ box/chris/general/lib/backupclient/BackupClientRestore.cpp	 
> 2006-02-26 00:28:22 UTC (rev 516)
> @@ -206,7 +206,7 @@
>  //		Created: 23/11/03
>  //
>  //  
> ---------------------------------------------------------------------- 
> ----
> -static void BackupClientRestoreDir(BackupProtocolClient  
> &rConnection, int64_t DirectoryID, std::string &rLocalDirectoryName,
> +static int BackupClientRestoreDir(BackupProtocolClient  
> &rConnection, int64_t DirectoryID, std::string &rLocalDirectoryName,
>  	RestoreParams &Params, RestoreResumeInfo &rLevel)
>  {
>  	// If we're resuming... check that we haven't got a next level to  
> look at
> @@ -222,12 +222,11 @@
>  		// Remove the level for the recursed directory
>  		rLevel.RemoveLevel();		
>  	}
> -	
> -	// Save the resumption information
> -	Params.mResumeInfo.Save(Params.mRestoreResumeInfoFilename);
>
>  	// Create the local directory (if not already done) -- path and  
> owner set later, just use restrictive owner mode
> -	switch(ObjectExists(rLocalDirectoryName.c_str()))
> +	int exists = ObjectExists(rLocalDirectoryName.c_str());
> +
> +	switch(exists)
>  	{
>  		case ObjectExists_Dir:
>  			// Do nothing
> @@ -244,16 +243,64 @@
>  			}
>  			// follow through to... (no break)
>  		case ObjectExists_NoObject:
> -			if(::mkdir(rLocalDirectoryName.c_str(), S_IRWXU) != 0)
> -			{
> -				THROW_EXCEPTION(CommonException, OSFileError);
> -			}
>  			break;
>  		default:
>  			ASSERT(false);
>  			break;
>  	}
> +
> +	std::string parentDirectoryName(rLocalDirectoryName);
> +	if(parentDirectoryName[parentDirectoryName.size() - 1] == '/')
> +	{
> +		parentDirectoryName.resize(parentDirectoryName.size() - 1);
> +	}
> +
> +	int lastSlash = parentDirectoryName.rfind 
> (DIRECTORY_SEPARATOR_ASCHAR);
> +	if(lastSlash != std::string::npos)
> +	{
> +		// the target directory is a deep path, remove the last
> +		// directory name and check that the resulting parent
> +		// exists, otherwise the restore should fail.
> +		parentDirectoryName.resize(lastSlash);
> +		switch(ObjectExists(parentDirectoryName.c_str()))
> +		{
> +			case ObjectExists_Dir:
> +				// this is fine, do nothing
> +				break;
> +
> +			case ObjectExists_File:
> +				fprintf(stderr, "Failed to restore: '%s' "
> +					"is a file, but should be a "
> +					"directory.\n",
> +					parentDirectoryName.c_str());
> +				return Restore_TargetPathNotFound;
> +
> +			case ObjectExists_NoObject:
> +				fprintf(stderr, "Failed to restore: "
> +					"parent '%s' of target directory "
> +					"does not exist.\n",
> +					parentDirectoryName.c_str());
> +				return Restore_TargetPathNotFound;
> +
> +			default:
> +				fprintf(stderr, "Failed to restore: "
> +					"unknown result from "
> +					"ObjectExists('%s').\n",
> +					parentDirectoryName.c_str());
> +				return Restore_UnknownError;
> +		}
> +	}
> +
> +	if((exists == ObjectExists_NoObject ||
> +		exists == ObjectExists_File) &&
> +		::mkdir(rLocalDirectoryName.c_str(), S_IRWXU) != 0)
> +	{
> +		THROW_EXCEPTION(CommonException, OSFileError);
> +	}
>  	
> +	// Save the resumption information
> +	Params.mResumeInfo.Save(Params.mRestoreResumeInfoFilename);
> +	
>  	// Fetch the directory listing from the server -- getting a list  
> of files which is approparite to the restore type
>  	rConnection.QueryListDirectory(
>  			DirectoryID,
> @@ -347,7 +394,7 @@
>  	}
>
>  	
> -	// Recuse to directories
> +	// Recurse to directories
>  	{
>  		BackupStoreDirectory::Iterator i(dir);
>  		BackupStoreDirectory::Entry *en = 0;
> @@ -364,7 +411,14 @@
>  				RestoreResumeInfo &rnextLevel(rLevel.AddLevel(en->GetObjectID 
> (), nm.GetClearFilename()));
>  				
>  				// Recurse
> -				BackupClientRestoreDir(rConnection, en->GetObjectID(),  
> localDirname, Params, rnextLevel);
> +				int result = BackupClientRestoreDir(
> +					rConnection, en->GetObjectID(),
> +					localDirname, Params, rnextLevel);
> +
> +				if (result != Restore_Complete)
> +				{
> +					return result;
> +				}
>  				
>  				// Remove the level for the above call
>  				rLevel.RemoveLevel();
> @@ -373,7 +427,9 @@
>  				rLevel.mRestoredObjects.insert(en->GetObjectID());
>  			}
>  		}
> -	}	
> +	}
> +
> +	return Restore_Complete;
>  }
>
>
> @@ -444,7 +500,12 @@
>  	
>  	// Restore the directory
>  	std::string localName(LocalDirectoryName);
> -	BackupClientRestoreDir(rConnection, DirectoryID, localName,  
> params, params.mResumeInfo);
> +	int result = BackupClientRestoreDir(rConnection, DirectoryID,
> +		localName, params, params.mResumeInfo);
> +	if (result != Restore_Complete)
> +	{
> +		return result;
> +	}
>
>  	// Undelete the directory on the server?
>  	if(RestoreDeleted && UndeleteAfterRestoreDeleted)
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 16:35:02 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 16:35:02 +0000
Subject: [Box Backup-dev] Coding standards (was: COMMIT r515 - box/chris/general/bin/bbackupd)
In-Reply-To: <20060226002748.C0A7995@s0g0.pems.testserver.co.uk>
References: <20060226002748.C0A7995@s0g0.pems.testserver.co.uk>
Message-ID: <00A70203-12E2-423B-B8FA-8A64A1DD6567@fluffy.co.uk>

On 26 Feb 2006, at 00:27, subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-26 00:27:45 +0000 (Sun, 26 Feb 2006)
> New Revision: 515
>
>
> +	bool was_deserialised = deserialised;


Now I know the coding standards set our are not "right" (in the sense  
that any coding standard is to a certain extent, completely  
arbitrary), but it would be nice to have all the code looking  
consistent.

Not that I wish to put you off coding, quite the contrary, but I  
think we need to keep the source nice and neat.

Thanks

Ben




From boxbackup-dev@fluffy.co.uk  Sun Feb 26 17:03:33 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 26 Feb 2006 17:03:33 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r516 - box/chris/general/lib/backupclient
In-Reply-To: <D58F6D65-28C8-4DB5-ABB9-6C9009AF6CE6@fluffy.co.uk>
References: <20060226002824.7892295@s0g0.pems.testserver.co.uk>
 <D58F6D65-28C8-4DB5-ABB9-6C9009AF6CE6@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602261702380.14767@top.qwarx.com>

Hi Ben,

> What's wrong with exceptions?

Nothing really, it just seemed like a more public name space, and more 
intrusive. What exception would you like it to throw?

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 17:03:59 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 26 Feb 2006 17:03:59 +0000 (GMT)
Subject: [Box Backup-dev] Coding standards (was: COMMIT r515 -
 box/chris/general/bin/bbackupd)
In-Reply-To: <00A70203-12E2-423B-B8FA-8A64A1DD6567@fluffy.co.uk>
References: <20060226002748.C0A7995@s0g0.pems.testserver.co.uk>
 <00A70203-12E2-423B-B8FA-8A64A1DD6567@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602261703350.14767@top.qwarx.com>

Hi Ben,

On Sun, 26 Feb 2006, Ben Summers wrote:

>>  +	bool was_deserialised = deserialised;
>
> Now I know the coding standards set our are not "right" (in the sense that 
> any coding standard is to a certain extent, completely arbitrary), but it 
> would be nice to have all the code looking consistent.

What should it be called, wasDeserialised?

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 17:13:22 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 17:13:22 +0000
Subject: [Box Backup-dev] Coding standards (was: COMMIT r515 - box/chris/general/bin/bbackupd)
In-Reply-To: <Pine.LNX.4.62.0602261703350.14767@top.qwarx.com>
References: <20060226002748.C0A7995@s0g0.pems.testserver.co.uk> <00A70203-12E2-423B-B8FA-8A64A1DD6567@fluffy.co.uk> <Pine.LNX.4.62.0602261703350.14767@top.qwarx.com>
Message-ID: <3002B27E-A900-4927-B270-DE8B79B5BC26@fluffy.co.uk>

On 26 Feb 2006, at 17:03, Chris Wilson wrote:

> Hi Ben,
>
> On Sun, 26 Feb 2006, Ben Summers wrote:
>
>>>  +	bool was_deserialised = deserialised;
>>
>> Now I know the coding standards set our are not "right" (in the  
>> sense that any coding standard is to a certain extent, completely  
>> arbitrary), but it would be nice to have all the code looking  
>> consistent.
>
> What should it be called, wasDeserialised?

Yep. Sorry to be picky.

   http://boxbackup.hostworks.ca/index.php/Coding_style

Ben



From boxbackup-dev@fluffy.co.uk  Sun Feb 26 18:05:08 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Sun, 26 Feb 2006 18:05:08 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <1140957571.7736.11.camel@avenin.ebourne.me.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>	 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>	 <43FF0027.60108@netinertia.co.uk>	 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>	 <43FF259F.5000006@netinertia.co.uk>	 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>	 <44019B8D.6010900@netinertia.co.uk> <1140957571.7736.11.camel@avenin.ebourne.me.uk>
Message-ID: <4401EDD4.4020706@netinertia.co.uk>

Martin Ebourne wrote:
> On Sun, 2006-02-26 at 12:14 +0000, James O'Gorman wrote:
>> I take it you still wouldn't want #define @PERL@ in the .cpp file - 
>> which means there'd need to be something in infrastructure/m4? In which 
>> case, I think Martin may have to look at that, if possible. I really 
>> have no idea what's going on there!
> 
> Have a look at BoxConfig.h. Your define is probably already there. If
> not, then AC_SUBST it.

It wasn't in BoxConfig.h. Adding these lines into configure.ac does it, 
but is this OK, and should these stay in configure.ac or in the 
infrastructure/m4 directory?

AC_PROG_PATH([PERL], [perl], [no])
if test "x$PERL" != "xno"; then
   AC_SUBST([PERL])
   AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the 
perl executable])
fi

>>> 2) There are lots of scripts which need parsing. Maybe it would be nicer 
>>> to modify makebuildenv.pl to go through and modify the first line of 
>>> every perl script?
>> This bit is certainly doable. My Perl-foo is at least half-decent! (I hope.)
>>
>> To make sure the path to perl is right though, should I move 
>> makebuildenv.pl to makebuildenv.pl.in, set the first line to #!@PERL@, 
>> and then set something like: my $perl_executable = @PERL@; ?
> 
> Sounds like a reasonable plan. I have to say that I don't see why Ben
> prefers having a perl script that modifies all the files compared to
> autoconf doing it. Am I missing something?

I'm happy to do it either way (and I've already got the patches to do it 
the autoconf way).

James

From boxbackup-dev@fluffy.co.uk  Sun Feb 26 18:09:28 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 18:09:28 +0000
Subject: [Box Backup-dev] COMMIT r516 - box/chris/general/lib/backupclient
In-Reply-To: <Pine.LNX.4.62.0602261702380.14767@top.qwarx.com>
References: <20060226002824.7892295@s0g0.pems.testserver.co.uk> <D58F6D65-28C8-4DB5-ABB9-6C9009AF6CE6@fluffy.co.uk> <Pine.LNX.4.62.0602261702380.14767@top.qwarx.com>
Message-ID: <A7B1A483-766F-495A-A679-A934F0FB1528@fluffy.co.uk>

On 26 Feb 2006, at 17:03, Chris Wilson wrote:

> Hi Ben,
>
>> What's wrong with exceptions?
>
> Nothing really, it just seemed like a more public name space, and  
> more intrusive. What exception would you like it to throw?

Oh, it's probably OK as it is, as the function isn't called in more  
than one place (or by itself). It's just that returning error codes  
isn't the C++ way, at least in this project.

Ben




From boxbackup-dev@fluffy.co.uk  Sun Feb 26 18:10:22 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 18:10:22 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <1140957571.7736.11.camel@avenin.ebourne.me.uk>
References: <43FEFD9C.6000407@netinertia.co.uk> <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk> <43FF0027.60108@netinertia.co.uk> <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk> <43FF259F.5000006@netinertia.co.uk> <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk> <44019B8D.6010900@netinertia.co.uk> <1140957571.7736.11.camel@avenin.ebourne.me.uk>
Message-ID: <8B584595-A11C-4143-8CDA-BC489AAC9827@fluffy.co.uk>

On 26 Feb 2006, at 12:39, Martin Ebourne wrote:

> On Sun, 2006-02-26 at 12:14 +0000, James O'Gorman wrote:
>> To make sure the path to perl is right though, should I move
>> makebuildenv.pl to makebuildenv.pl.in, set the first line to #! 
>> @PERL@,
>> and then set something like: my $perl_executable = @PERL@; ?
>
> Sounds like a reasonable plan. I have to say that I don't see why Ben
> prefers having a perl script that modifies all the files compared to
> autoconf doing it. Am I missing something?

Er, actually probably not.

Developers will have to make sure they edit the right perl script,  
and run ./configure afterwards, I suppose.

Ben





From boxbackup-dev@fluffy.co.uk  Sun Feb 26 19:20:01 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 19:20:01 +0000
Subject: [Box Backup-dev] Future work
In-Reply-To: <1140873101.5454.51.camel@avenin.ebourne.me.uk>
References: <867045CE-8ABB-486E-9950-A43E51A1284E@fluffy.co.uk> <1140873101.5454.51.camel@avenin.ebourne.me.uk>
Message-ID: <EFEC0D52-BC1F-4447-953B-BDF2870656E6@fluffy.co.uk>

On 25 Feb 2006, at 13:11, Martin Ebourne wrote:

> On Fri, 2006-02-24 at 14:37 +0000, Ben Summers wrote:
>> I have written up some notes about how I'd like to see the project
>> develop:
>>
>>     http://boxbackup.hostworks.ca/index.php/0.20_redesign
>>
>> Comments welcomed!
>
> File selection
> - Agreed
>
> Upload engine
> - Agreed
>
> Streams in files
> - I prefer properly supporting multiple streams, although I'm not
> against the multiple files idea if we can demonstrate it is
> significantly simpler.

I thought it best to support streams "properly". Whether they're done  
as multiple references to files within a single entry, multiple  
entries, or streams within the file, is a difficult choice. Multiple  
entries is a bit nasty though.


[snip]
>
>
>         Filenames are no longer encrypted as separate objects, as this
>         was shown to be a pain and annoying inefficient. Instead, the
>         directory is stored as a single encrypted stream. This is
>         possible as the store no longer needs to modify them. However,
>         the referred object IDs need to be stored in the clear so the
>         server can use them, but of course, these are included in the
>         signed data so the server can't modify them without detection.
> - Mostly agreed, though I'd be concerned about the use case where  
> there
> is a directory with many entries which has small changes to it. Think
> news spool, Maildir directories, etc. Ideally wouldn't have to  
> reupload
> the whole thing on every change.

Good point -- maybe difficult to achieve though.

I wonder if there's a neat way to do this by using the existing  
diffing infrastructure for the files themselves? Or whether this just  
becomes nasty.


>
>         Attributes are only stored in the directory, never in the  
> file.
>         (Although, what about xattrs, which could be "big"? But
>         relevant, because they can store ACLs.)
> - Attributes includes things such as mtime and size?

Yes.

> Presumably we don't
> back up atime?

For completeness, I think we do.

> I'd be concerned that we'd upload the whole directory
> object just for one frequently changing file.

Yes...

>
>         Each time bbackupd connects, it makes a new backup set, marked
>         with the current time. Rules are specified to the server (or
>         client?) to say when a backup set can be automatically  
> deleted.
>         By default bbackupquery will use the latest backup set, but  
> can
>         be instructed to use a different one.
> - Don't really like this. Doesn't sound like it works well for lazy
> mode, which you confirmed below.
>
> Lazy mode
>         This was the only mode the original supported. It has it's  
> pros
>         and cons. The original decision was made to ensure a slow
>         trickle of data across a broadband connection.
>         The above may make supporting lazy mode a bit tricky, and we
>         should decide whether we want to keep it, and if so, in what
>         form. For example, directory entries may need to be marked as
>         "changed but not included", prompting the restore to look in
>         future versions.
> - Lazy mode is essential for me. It's my favourite feature of Box  
> and is
> what makes it ideal for backing up over a DSL link. With the  
> addition of
> inotify (or equivalent file notification support) and restart  
> resume it
> will finally work perfectly. I can't see the point in going to all the
> trouble of adding inotify support if we then just end up batching  
> it up
> at the other end of bbackupd instead!
>
> Rather than making it messy, I think we'd be better off coming up  
> with a
> design whereby lazy mode worked very well. I was thinking of something
> like your grafts, but each would have a time range. ie. When you fetch
> an object it has multiple possibilities, all with a valid from/ 
> valid to
> range.
>
> You could go into the store and enter any time as view time and  
> then for
> every object you saw you'd get the version valid at that moment.
>
> Snapshot mode would be identical, with the addition that every time it
> did an upload it would record the time in a list. Then it would be
> simple to select the view time from the list of snapshots.


I've been thinking about this (which is why didn't rely very quickly)  
and it seems like there are a few conflicting design goals here.

Basically, the snapshots and the lazy mode stuff conflict, and make  
the reference counting store more difficult. To do them both well  
seems to require a conflicting infrastructure.

I suppose you could have a sort of transient "current" hierarchy,  
which records the lazy uploads and work in progress of the snapshots,  
then the client "solidifies" it at intervals into a snapshot of the  
directory structure, which is signed and everything.

Maybe we could keep the existing directory entries, and then have  
separate signed versions for the backup sets? We could still go  
reference counted with this.

Or we could simply make backups sets as cheap as possible, and not  
worry about it. Lazy mode just means you get one set every hour.


>
>> Also, there's a mini-project suitable for one developer to do
>> independently of everything else, making the raidfile support better
>> and efficient in a cluster of three store servers:
>>
>>    http://boxbackup.hostworks.ca/index.php/Raidfile_improvements
>>
>> Anyone up for it?
>
> I'm not convinced of the advantage of building in raid support. I  
> prefer
> to backup to two stores on different machines rather than raid.
> Obviously for companies providing the service raid would be well worth
> having, but raid is so available these days that you can guarantee
> they've got it already.

It's not wonderful on all platforms, though.

>
> Maybe the three server cluster is a bonus, but there might be a much
> less complicated way of achieving that rather than using raid.
>
>
> What I'm up for:
> - inotify support in linux, as I already stated. Hence I'd be happy to
> join in with that section of redesign to abstract the file searching
> interface out. If we decide this would also benefit from a db backend
> then I guess I'll help on that too.

Good!

>
> - Switching to ostreams to remove the hundreds of warnings and  
> increase
> robustness. This will probably also include changing the logging as
> Chris has already suggested. Ideally this should be in 0.11.

Ah yes, that would be a nice thing to have for the 0.11 tidy-up  
release. Also helps Win32, I think, with type safety.

>
> - Making the underlying box libraries into shared libs so that other
> projects (eg. boxi) can use them easily without having to  
> bastardise the
> box source. Other possible build things such as supporting PREFIX etc
> properly.

That might make using it as a generic framework a bit nicer.

>
> - Changing the store to allow simple point-in-time retrieval, as
> discussed above. This could be quite a big job though and like  
> everyone
> else I don't have a whole lot of time, but I'll try and help out with
> this one.

I think this one just needs a cunning plan. It's probably possible  
now, with clever algorithms to select which is the current file, but  
messy.

But signed directories would be a really big win.

Interesting that noone has posted any thoughts on the licensing  
question.

Ben




From boxbackup-dev@fluffy.co.uk  Sun Feb 26 19:37:45 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 19:37:45 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r525 - box/chris/general/lib/server
Message-ID: <20060226193745.0249995@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 19:37:42 +0000 (Sun, 26 Feb 2006)
New Revision: 525

Modified:
   box/chris/general/lib/server/Daemon.cpp
Log:
* Daemon.cpp
- Properly format message to stderr, by adding a newline at the end


Modified: box/chris/general/lib/server/Daemon.cpp
===================================================================
--- box/chris/general/lib/server/Daemon.cpp	2006-02-26 14:23:30 UTC (rev 524)
+++ box/chris/general/lib/server/Daemon.cpp	2006-02-26 19:37:42 UTC (rev 525)
@@ -142,7 +142,7 @@
 			{
 				fprintf(stderr, "%s: failed to start: "
 					"failed to open configuration file: "
-					"%s", DaemonName(), 
+					"%s\n", DaemonName(), 
 					mConfigFileName.c_str());
 #ifdef WIN32
 				::syslog(LOG_ERR, "%s: failed to start: "


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 19:44:12 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 19:44:12 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r526 - in box/chris/general: infrastructure lib/win32
Message-ID: <20060226194412.195A195@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 19:44:06 +0000 (Sun, 26 Feb 2006)
New Revision: 526

Added:
   box/chris/general/lib/win32/MSG00001.bin
   box/chris/general/lib/win32/messages.h
   box/chris/general/lib/win32/messages.mc
   box/chris/general/lib/win32/messages.rc
Modified:
   box/chris/general/infrastructure/makebuildenv.pl
   box/chris/general/lib/win32/emu.cpp
   box/chris/general/lib/win32/emu.h
Log:
Fixed the "Description for event ID ... cannot be found" error in the 
Windows event log:

* infrastructure/makebuildenv.pl
- Added ability to detect, build and link Windows resource files (.rc),
  needed to fix this problem.

* lib/win32/messages.mc
- Added the raw message file to the repository. This must be compiled
  to a .rc file with Microsoft's message compiler (MC).

* lib/win32/messages.rc
* lib/win32/messages.h
* lib/win32/MSG00001.bin
- Added precompiled output from message compiler, for those who don't
  have it (e.g. using MinGW instead of MSVC)

* lib/win32/emu.h
* lib/win32/emu.cpp
- Added the ability to add a new event source to the Windows Registry
- Moved openlog() and closelog() from inline to emu.cpp, made openlog()
  add and register a proper event source.


Modified: box/chris/general/infrastructure/makebuildenv.pl
===================================================================
--- box/chris/general/infrastructure/makebuildenv.pl	2006-02-26 19:37:42 UTC (rev 525)
+++ box/chris/general/infrastructure/makebuildenv.pl	2006-02-26 19:44:06 UTC (rev 526)
@@ -372,6 +372,7 @@
 
 print "done\n\nGenerating Makefiles...\n";
 
+my %module_resources_win32;
 
 # Then write a makefile for each module
 for my $mod (@modules, $implicit_dep)
@@ -544,7 +545,7 @@
 		@items = (@items, @autogen_items);
 	}
 	
-	# first, obtain a list of depenencies within the .h files
+	# first, obtain a list of dependencies within the .h files
 	my %headers;
 	for my $h (grep /\.h\Z/i, @items)
 	{
@@ -564,19 +565,30 @@
 	
 	# then... do the cpp files...
 	my @obj_base;
-	for my $cpp (@items)
+	for my $file (@items)
 	{
-		next unless $cpp =~ m/\A(.+)\.cpp\Z/i;
-		next if $cpp =~ /\A\._/;	# Temp Mac OS Resource hack
+		my $is_cpp = $file =~ m/\A(.+)\.cpp\Z/i;
+		my $is_rc  = $file =~ m/\A(.+)\.rc\Z/i;
 
+		if ($target_os eq "mingw32")
+		{
+			next if not $is_cpp and not $is_rc;
+		}
+		else
+		{
+			next if not $is_rc;
+		}
+
+		next if $file =~ /\A\._/; # Temp Mac OS Resource hack
+
 		# store for later
 		my $base = $1;
-		push @obj_base,$base;
+		push @obj_base,$base unless $is_rc;
 	
 		# get the file...
-		open FL,"$mod/$cpp";
+		open FL,"$mod/$file";
 		my $f;
-		read FL,$f,-s "$mod/$cpp";
+		read FL,$f,-s "$mod/$file";
 		close FL;
 		
 		my %dep;
@@ -590,10 +602,29 @@
 		my $out_name = '$(OUTDIR)/'.$base.'.o';
 		
 		# write the line for this cpp file
-		$make .= $out_name.': '.join(' ',$cpp,map
-			{ ($hfiles{$_} eq $mod)?$_:'../../'.$hfiles{$_}."/$_" } keys %dep)."\n";
-		$make .= "\t\$(CXX) \$(CXXFLAGS) $compile_line_extra -c $cpp -o $out_name\n\n";
+		my @dep_paths = map 
+		{ 
+			($hfiles{$_} eq $mod)
+			? $_ 
+			: '../../'.$hfiles{$_}."/$_"
+		}
+		keys %dep;
 
+		$make .= $out_name.': '.join(' ',$file,@dep_paths)."\n";
+
+		if ($is_cpp)
+		{
+			$make .= "\t\$(CXX) \$(CXXFLAGS) $compile_line_extra ".
+				"-c $file -o $out_name\n\n";
+		}
+		elsif ($is_rc)
+		{
+			$make .= "\twindres $file $out_name\n\n";
+			my $res_list = $module_resources_win32{$mod};
+			$res_list ||= [];
+			push @$res_list, $base.'.o';
+			$module_resources_win32{$mod} = $res_list;
+		}
 	}
 
 	my $has_deps = ($#{$module_dependency{$mod}} >= 0);
@@ -645,11 +676,23 @@
 	additional_objects_from_make_fragment("$mod/Makefile.extra.$build_os", \@objs, \@makefile_includes);
 
 	my $o_file_list = join(' ',map {'$(OUTDIR)/'.$_.'.o'} @objs);
+
 	print MAKE $end_target,': ',$o_file_list;
 	print MAKE ' dep_modules' if $has_deps and not $bsd_make;
 	print MAKE " ",$lib_files unless $target_is_library;
 	print MAKE "\n";
 	
+	if ($target_os eq "mingw32")
+	{
+		foreach my $dep (@all_deps_for_module)
+		{
+			my $res_list = $module_resources_win32{$dep};
+			next unless $res_list;
+			$o_file_list .= ' '.join(' ', 
+				map {'$(OUTBASE)/'.$dep."/$_"} @$res_list);
+		}
+	}
+
 	# stuff to make the final target...
 	if($target_is_library)
 	{

Added: box/chris/general/lib/win32/MSG00001.bin
===================================================================
(Binary files differ)


Property changes on: box/chris/general/lib/win32/MSG00001.bin
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Modified: box/chris/general/lib/win32/emu.cpp
===================================================================
--- box/chris/general/lib/win32/emu.cpp	2006-02-26 19:37:42 UTC (rev 525)
+++ box/chris/general/lib/win32/emu.cpp	2006-02-26 19:44:06 UTC (rev 526)
@@ -7,11 +7,8 @@
 
 #ifdef WIN32
 
-// #include "emu.h"
-
 #include <windows.h>
 #include <fcntl.h>
-// #include <atlenc.h>
 
 #ifdef HAVE_UNISTD_H
 	#include <unistd.h>
@@ -23,6 +20,10 @@
 #include <string>
 #include <list>
 
+// message resource definitions for syslog()
+
+#include "messages.h"
+
 // our implementation for a timer, based on a 
 // simple thread which sleeps for a period of time
 
@@ -1002,9 +1003,147 @@
 	return -1;
 }
 
-HANDLE gSyslogH = 0;
+// copied from MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/eventlog/base/adding_a_source_to_the_registry.asp
+
+BOOL AddEventSource
+(
+	LPTSTR pszSrcName, // event source name
+	DWORD  dwNum       // number of categories
+)
+{
+	// Work out the executable file name, to register ourselves
+	// as the event source
+
+	char cmd[MAX_PATH];
+	if (GetModuleFileName(NULL, cmd, sizeof(cmd)-1) == 0)
+	{
+		::syslog(LOG_ERR, "Failed to get the program file name: "
+			"error %d", GetLastError());
+		return FALSE;
+	}
+	cmd[sizeof(cmd)-1] = 0;
+ 	std::string exepath(cmd);
+
+	// Create the event source as a subkey of the log. 
+
+	std::string regkey("SYSTEM\\CurrentControlSet\\Services\\EventLog\\"
+		"Application\\");
+	regkey += pszSrcName; 
+ 
+	HKEY hk;
+	DWORD dwDisp;
+
+	if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, regkey.c_str(), 
+			 0, NULL, REG_OPTION_NON_VOLATILE,
+			 KEY_WRITE, NULL, &hk, &dwDisp)) 
+	{
+		::syslog(LOG_ERR, "Failed to create the registry key: "
+			"error %d", GetLastError()); 
+		return FALSE;
+	}
+
+	// Set the name of the message file. 
+ 
+	if (RegSetValueEx(hk,                // subkey handle 
+			 "EventMessageFile", // value name 
+			 0,                  // must be zero 
+			 REG_EXPAND_SZ,      // value type 
+			 (LPBYTE) exepath.c_str(),  // pointer to value data 
+			 (DWORD) (exepath.size()))) // data size
+	{
+		::syslog(LOG_ERR, "Failed to set the event message file: "
+			"error %d", GetLastError()); 
+		RegCloseKey(hk); 
+		return FALSE;
+	}
+ 
+	// Set the supported event types. 
+ 
+	DWORD dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | 
+		  EVENTLOG_INFORMATION_TYPE; 
+ 
+	if (RegSetValueEx(hk,               // subkey handle 
+			  "TypesSupported", // value name 
+			  0,                // must be zero 
+			  REG_DWORD,        // value type 
+			  (LPBYTE) &dwData, // pointer to value data 
+			  sizeof(DWORD)))   // length of value data 
+	{
+		::syslog(LOG_ERR, "Failed to set the supported types: "
+			"error %d", GetLastError()); 
+		RegCloseKey(hk); 
+		return FALSE;
+	}
+ 
+	// Set the category message file and number of categories.
+
+	if (RegSetValueEx(hk,                        // subkey handle 
+			  "CategoryMessageFile",     // value name 
+			  0,                         // must be zero 
+			  REG_EXPAND_SZ,             // value type 
+			  (LPBYTE) exepath.c_str(),  // pointer to value data 
+			  (DWORD) (exepath.size()))) // data size
+	{
+		::syslog(LOG_ERR, "Failed to set the category message file: "
+			"error %d", GetLastError());
+		RegCloseKey(hk); 
+		return FALSE;
+	}
+ 
+	if (RegSetValueEx(hk,              // subkey handle 
+			  "CategoryCount", // value name 
+			  0,               // must be zero 
+			  REG_DWORD,       // value type 
+			  (LPBYTE) &dwNum, // pointer to value data 
+			  sizeof(DWORD)))  // length of value data 
+	{
+		::syslog(LOG_ERR, "Failed to set the category count: "
+			"error %d", GetLastError());
+		RegCloseKey(hk); 
+		return FALSE;
+	}
+
+	RegCloseKey(hk); 
+	return TRUE;
+}
+
+static HANDLE gSyslogH = 0;
 static bool sHaveWarnedEventLogFull = false;
 
+void openlog(const char * daemonName, int, int)
+{
+	// register a default event source, so that we can
+	// log errors with the process of adding or registering our own.
+	gSyslogH = RegisterEventSource(
+		NULL,        // uses local computer 
+		daemonName); // source name
+	if (gSyslogH == NULL) 
+	{
+	}
+
+	if (!AddEventSource("Box Backup", 0))
+	{
+		::syslog(LOG_ERR, "Failed to add our own event source");
+		return;
+	}
+
+	HANDLE newSyslogH = RegisterEventSource(NULL, "Box Backup");
+	if (newSyslogH == NULL)
+	{
+		::syslog(LOG_ERR, "Failed to register our own event source: "
+			"error %d", GetLastError());
+		return;
+	}
+
+	DeregisterEventSource(gSyslogH);
+	gSyslogH = newSyslogH;
+}
+
+void closelog(void)
+{
+	DeregisterEventSource(gSyslogH); 
+}
+
 void syslog(int loglevel, const char *frmt, ...)
 {
 	WORD errinfo;
@@ -1054,7 +1193,7 @@
 	if (!ReportEvent(gSyslogH, // event log handle 
 		errinfo,               // event type 
 		0,                     // category zero 
-		MSG_ERR_EXIST,	       // event identifier - 
+		MSG_ERR,	       // event identifier - 
 		                       // we will call them all the same
 		NULL,                  // no user security identifier 
 		1,                     // one substitution string 

Modified: box/chris/general/lib/win32/emu.h
===================================================================
--- box/chris/general/lib/win32/emu.h	2006-02-26 19:37:42 UTC (rev 525)
+++ box/chris/general/lib/win32/emu.h	2006-02-26 19:44:06 UTC (rev 526)
@@ -276,25 +276,10 @@
 #define LOG_PID 0
 #define LOG_LOCAL6 0
 
-extern HANDLE gSyslogH;
-void MyReportEvent(LPCTSTR *szMsg, DWORD errinfo);
-inline void openlog(const char * daemonName, int, int)
-{
-	gSyslogH = RegisterEventSource(
-		NULL,  // uses local computer 
-		daemonName);    // source name
-	if (gSyslogH == NULL) 
-	{
-	}
-}
+void openlog (const char * daemonName, int, int);
+void closelog(void);
+void syslog  (int loglevel, const char *fmt, ...);
 
-inline void closelog(void)
-{
-	DeregisterEventSource(gSyslogH); 
-}
-
-void syslog(int loglevel, const char *fmt, ...);
-
 #ifndef __MINGW32__
 #define strtoll _strtoi64
 #endif
@@ -417,13 +402,6 @@
 bool ConvertUtf8ToConsole(const char* pString, std::string& rDest);
 bool ConvertConsoleToUtf8(const char* pString, std::string& rDest);
 
-//
-// MessageId: MSG_ERR_EXIST
-// MessageText:
-//  Box Backup.
-//
-#define MSG_ERR_EXIST                         ((DWORD)0xC0000004L)
-
 // replacement for _cgetws which requires a relatively recent C runtime lib
 int console_read(char* pBuffer, size_t BufferSize);
 

Added: box/chris/general/lib/win32/messages.h
===================================================================
--- box/chris/general/lib/win32/messages.h	2006-02-26 19:37:42 UTC (rev 525)
+++ box/chris/general/lib/win32/messages.h	2006-02-26 19:44:06 UTC (rev 526)
@@ -0,0 +1,57 @@
+ // Message source file, to be compiled to a resource file with
+ // Microsoft Message Compiler (MC), to an object file with a Resource
+ // Compiler, and linked into the application.
+
+ // The main reason for this file is to work around Windows' stupid
+ // messages in the Event Log, which say:
+
+ // The description for Event ID ( 4 ) in Source ( Box Backup (bbackupd) ) 
+ // cannot be found. The local computer may not have the necessary 
+ // registry information or message DLL files to display messages from a 
+ // remote computer. The following information is part of the event:
+ // Message definitions follow
+//
+//  Values are 32 bit values layed out as follows:
+//
+//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+//  +---+-+-+-----------------------+-------------------------------+
+//  |Sev|C|R|     Facility          |               Code            |
+//  +---+-+-+-----------------------+-------------------------------+
+//
+//  where
+//
+//      Sev - is the severity code
+//
+//          00 - Success
+//          01 - Informational
+//          10 - Warning
+//          11 - Error
+//
+//      C - is the Customer code flag
+//
+//      R - is a reserved bit
+//
+//      Facility - is the facility code
+//
+//      Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+
+//
+// Define the severity codes
+//
+
+
+//
+// MessageId: MSG_ERR
+//
+// MessageText:
+//
+//  %1
+//
+#define MSG_ERR                          ((DWORD)0x40000001L)
+


Property changes on: box/chris/general/lib/win32/messages.h
___________________________________________________________________
Name: svn:executable
   + *

Added: box/chris/general/lib/win32/messages.mc
===================================================================
--- box/chris/general/lib/win32/messages.mc	2006-02-26 19:37:42 UTC (rev 525)
+++ box/chris/general/lib/win32/messages.mc	2006-02-26 19:44:06 UTC (rev 526)
@@ -0,0 +1,22 @@
+; // Message source file, to be compiled to a resource file with
+; // Microsoft Message Compiler (MC), to an object file with a Resource
+; // Compiler, and linked into the application.
+;
+; // The main reason for this file is to work around Windows' stupid
+; // messages in the Event Log, which say:
+;
+; // The description for Event ID ( 4 ) in Source ( Box Backup (bbackupd) ) 
+; // cannot be found. The local computer may not have the necessary 
+; // registry information or message DLL files to display messages from a 
+; // remote computer. The following information is part of the event:
+
+MessageIdTypedef = DWORD
+
+; // Message definitions follow
+
+MessageId = 0x1
+Severity = Informational
+SymbolicName = MSG_ERR
+Language = English
+%1
+.

Added: box/chris/general/lib/win32/messages.rc
===================================================================
--- box/chris/general/lib/win32/messages.rc	2006-02-26 19:37:42 UTC (rev 525)
+++ box/chris/general/lib/win32/messages.rc	2006-02-26 19:44:06 UTC (rev 526)
@@ -0,0 +1,2 @@
+LANGUAGE 0x9,0x1
+1 11 MSG00001.bin


Property changes on: box/chris/general/lib/win32/messages.rc
___________________________________________________________________
Name: svn:executable
   + *


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 19:51:29 2006
From: boxbackup-dev@fluffy.co.uk (Martin Ebourne)
Date: Sun, 26 Feb 2006 19:51:29 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <4401EDD4.4020706@netinertia.co.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>
 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>
 <43FF0027.60108@netinertia.co.uk>
 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>
 <43FF259F.5000006@netinertia.co.uk>
 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>
 <44019B8D.6010900@netinertia.co.uk>
 <1140957571.7736.11.camel@avenin.ebourne.me.uk>
 <4401EDD4.4020706@netinertia.co.uk>
Message-ID: <1140983490.6695.4.camel@avenin.ebourne.me.uk>

On Sun, 2006-02-26 at 18:05 +0000, James O'Gorman wrote:
> It wasn't in BoxConfig.h. Adding these lines into configure.ac does it, 
> but is this OK, and should these stay in configure.ac or in the 
> infrastructure/m4 directory?
> 
> AC_PROG_PATH([PERL], [perl], [no])
> if test "x$PERL" != "xno"; then
>    AC_SUBST([PERL])
>    AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the 
> perl executable])
> fi

Yes, that looks fine. Sorry, should have said AC_DEFINE_UNQUOTED, not
AC_SUBST. In fact, I think AC_DEFINE_UNQUOTED will AC_SUBST for you so
that may not be needed.

Do you really not want to define it if perl is not available? Would it
not be better to error on no perl? If you don't error you need to
usefully handle the case where it does not exist, which seems unlikely.

In configure.ac is fine. I split things out into inf/m4 when they become
a bit on the large/complex side, to keep configure.ac small and easy to
read. This is very modular so could be split, but then it's also only a
few lines, so it doesn't gain much.

Cheers,

Martin.


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 19:54:31 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 19:54:31 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r527 - box/chris/general/bin/bbackupd
Message-ID: <20060226195431.D5B8A95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 19:54:24 +0000 (Sun, 26 Feb 2006)
New Revision: 527

Modified:
   box/chris/general/bin/bbackupd/BackupDaemon.cpp
   box/chris/general/bin/bbackupd/BackupDaemon.h
Log:
* BackupDaemon.cpp, BackupDaemon.h
- Only mark the store object info file for deletion if we successfully
  save it at the end of a backup run.


Modified: box/chris/general/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-26 19:44:06 UTC (rev 526)
+++ box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-26 19:54:24 UTC (rev 527)
@@ -578,9 +578,8 @@
 		BackupClientContext::ClientStoreMarker_NotKnown;
 	// haven't contacted the store yet
 
- 	bool deserialised = DeserializeStoreObjectInfo(clientStoreMarker, 
-		lastSyncTime, nextSyncTime);
-	bool was_deserialised = deserialised;
+ 	bool deleteStoreObjectInfoFile = DeserializeStoreObjectInfo(
+		clientStoreMarker, lastSyncTime, nextSyncTime);
  
 	// --------------------------------------------------------------------------------------------
 	
@@ -686,7 +685,8 @@
 			// Delete the serialised store object file,
 			// so that we don't try to reload it after a
 			// partially completed backup
-			if(deserialised && !DeleteStoreObjectInfo())
+			if(deleteStoreObjectInfoFile && 
+				!DeleteStoreObjectInfo())
 			{
 				::syslog(LOG_ERR, "Failed to delete the "
 					"StoreObjectInfoFile, backup cannot "
@@ -697,8 +697,7 @@
 			// In case the backup throws an exception,
 			// we should not try to delete the store info
 			// object file again.
-			was_deserialised = deserialised;
-			deserialised = false;
+			deleteStoreObjectInfoFile = false;
 			
 			// Do sync
 			bool errorOccurred = false;
@@ -807,12 +806,15 @@
 
 				// --------------------------------------------------------------------------------------------
 
-				// We had a successful backup, save the store info
-				SerializeStoreObjectInfo(clientStoreMarker, lastSyncTime, nextSyncTime);
-				// Next time around, make sure we delete
-				// the store info object file.
-				deserialised = was_deserialised;
+				// We had a successful backup, save the store 
+				// info. If we save successfully, we must 
+				// delete the file next time we start a backup
 
+				deleteStoreObjectInfoFile = 
+					SerializeStoreObjectInfo(
+						clientStoreMarker, 
+						lastSyncTime, nextSyncTime);
+
 				// --------------------------------------------------------------------------------------------
 			}
 			catch(BoxException &e)
@@ -2250,11 +2252,11 @@
 static const std::string STOREOBJECTINFO_MAGIC_ID_STRING = "BBACKUPD-STATE";
 static const int STOREOBJECTINFO_VERSION = 1;
 
-void BackupDaemon::SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time_t theLastSyncTime, box_time_t theNextSyncTime) const
+bool BackupDaemon::SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time_t theLastSyncTime, box_time_t theNextSyncTime) const
 {
 	if(!GetConfiguration().KeyExists("StoreObjectInfoFile"))
 	{
-		return;
+		return false;
 	}
 
 	std::string StoreObjectInfoFile = 
@@ -2262,13 +2264,17 @@
 
 	if (StoreObjectInfoFile.size() <= 0)
 	{
-		return;
+		return false;
 	}
 
+	bool created = false;
+
 	try
 	{
 		FileStream aFile(StoreObjectInfoFile.c_str(), 
 			O_WRONLY | O_CREAT | O_TRUNC);
+		created = true;
+
 		Archive anArchive(aFile, 0);
 
 		anArchive.Write(STOREOBJECTINFO_MAGIC_ID_VALUE);
@@ -2313,6 +2319,8 @@
 			"not accessible or could not be created", 
 			StoreObjectInfoFile.c_str());
 	}
+
+	return created;
 }
 
 // --------------------------------------------------------------------------

Modified: box/chris/general/bin/bbackupd/BackupDaemon.h
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.h	2006-02-26 19:44:06 UTC (rev 526)
+++ box/chris/general/bin/bbackupd/BackupDaemon.h	2006-02-26 19:54:24 UTC (rev 527)
@@ -46,9 +46,12 @@
 	~BackupDaemon();
 
 private:
-	// methods below do partial (specialized) serialization of client state only
-	void SerializeStoreObjectInfo(int64_t aClientStoreMarker, box_time_t theLastSyncTime, box_time_t theNextSyncTime) const;
-	bool DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
+	// methods below do partial (specialized) serialization of 
+	// client state only
+	bool SerializeStoreObjectInfo(int64_t aClientStoreMarker, 
+		box_time_t theLastSyncTime, box_time_t theNextSyncTime) const;
+	bool DeserializeStoreObjectInfo(int64_t & aClientStoreMarker, 
+		box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
 	bool DeleteStoreObjectInfo() const;
 	BackupDaemon(const BackupDaemon &);
 public:


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 20:01:37 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 20:01:37 +0000
Subject: [Box Backup-dev] COMMIT r527 - box/chris/general/bin/bbackupd
In-Reply-To: <20060226195431.D5B8A95@s0g0.pems.testserver.co.uk>
References: <20060226195431.D5B8A95@s0g0.pems.testserver.co.uk>
Message-ID: <D12D7751-31F5-49EF-81A3-5C531C641841@fluffy.co.uk>

Writing an automated test for this feature is going to be a  
_nightmare_ ...

Ben




On 26 Feb 2006, at 19:54, subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-26 19:54:24 +0000 (Sun, 26 Feb 2006)
> New Revision: 527
>
> Modified:
>    box/chris/general/bin/bbackupd/BackupDaemon.cpp
>    box/chris/general/bin/bbackupd/BackupDaemon.h
> Log:
> * BackupDaemon.cpp, BackupDaemon.h
> - Only mark the store object info file for deletion if we successfully
>   save it at the end of a backup run.
>
>
> Modified: box/chris/general/bin/bbackupd/BackupDaemon.cpp
> ===================================================================
> --- box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-26  
> 19:44:06 UTC (rev 526)
> +++ box/chris/general/bin/bbackupd/BackupDaemon.cpp	2006-02-26  
> 19:54:24 UTC (rev 527)
> @@ -578,9 +578,8 @@
>  		BackupClientContext::ClientStoreMarker_NotKnown;
>  	// haven't contacted the store yet
>
> - 	bool deserialised = DeserializeStoreObjectInfo(clientStoreMarker,
> -		lastSyncTime, nextSyncTime);
> -	bool was_deserialised = deserialised;
> + 	bool deleteStoreObjectInfoFile = DeserializeStoreObjectInfo(
> +		clientStoreMarker, lastSyncTime, nextSyncTime);
>
>  	//  
> ---------------------------------------------------------------------- 
> ----------------------
>  	
> @@ -686,7 +685,8 @@
>  			// Delete the serialised store object file,
>  			// so that we don't try to reload it after a
>  			// partially completed backup
> -			if(deserialised && !DeleteStoreObjectInfo())
> +			if(deleteStoreObjectInfoFile &&
> +				!DeleteStoreObjectInfo())
>  			{
>  				::syslog(LOG_ERR, "Failed to delete the "
>  					"StoreObjectInfoFile, backup cannot "
> @@ -697,8 +697,7 @@
>  			// In case the backup throws an exception,
>  			// we should not try to delete the store info
>  			// object file again.
> -			was_deserialised = deserialised;
> -			deserialised = false;
> +			deleteStoreObjectInfoFile = false;
>  			
>  			// Do sync
>  			bool errorOccurred = false;
> @@ -807,12 +806,15 @@
>
>  				//  
> ---------------------------------------------------------------------- 
> ----------------------
>
> -				// We had a successful backup, save the store info
> -				SerializeStoreObjectInfo(clientStoreMarker, lastSyncTime,  
> nextSyncTime);
> -				// Next time around, make sure we delete
> -				// the store info object file.
> -				deserialised = was_deserialised;
> +				// We had a successful backup, save the store
> +				// info. If we save successfully, we must
> +				// delete the file next time we start a backup
>
> +				deleteStoreObjectInfoFile =
> +					SerializeStoreObjectInfo(
> +						clientStoreMarker,
> +						lastSyncTime, nextSyncTime);
> +
>  				//  
> ---------------------------------------------------------------------- 
> ----------------------
>  			}
>  			catch(BoxException &e)
> @@ -2250,11 +2252,11 @@
>  static const std::string STOREOBJECTINFO_MAGIC_ID_STRING =  
> "BBACKUPD-STATE";
>  static const int STOREOBJECTINFO_VERSION = 1;
>
> -void BackupDaemon::SerializeStoreObjectInfo(int64_t  
> aClientStoreMarker, box_time_t theLastSyncTime, box_time_t  
> theNextSyncTime) const
> +bool BackupDaemon::SerializeStoreObjectInfo(int64_t  
> aClientStoreMarker, box_time_t theLastSyncTime, box_time_t  
> theNextSyncTime) const
>  {
>  	if(!GetConfiguration().KeyExists("StoreObjectInfoFile"))
>  	{
> -		return;
> +		return false;
>  	}
>
>  	std::string StoreObjectInfoFile =
> @@ -2262,13 +2264,17 @@
>
>  	if (StoreObjectInfoFile.size() <= 0)
>  	{
> -		return;
> +		return false;
>  	}
>
> +	bool created = false;
> +
>  	try
>  	{
>  		FileStream aFile(StoreObjectInfoFile.c_str(),
>  			O_WRONLY | O_CREAT | O_TRUNC);
> +		created = true;
> +
>  		Archive anArchive(aFile, 0);
>
>  		anArchive.Write(STOREOBJECTINFO_MAGIC_ID_VALUE);
> @@ -2313,6 +2319,8 @@
>  			"not accessible or could not be created",
>  			StoreObjectInfoFile.c_str());
>  	}
> +
> +	return created;
>  }
>
>  //  
> ---------------------------------------------------------------------- 
> ----
>
> Modified: box/chris/general/bin/bbackupd/BackupDaemon.h
> ===================================================================
> --- box/chris/general/bin/bbackupd/BackupDaemon.h	2006-02-26  
> 19:44:06 UTC (rev 526)
> +++ box/chris/general/bin/bbackupd/BackupDaemon.h	2006-02-26  
> 19:54:24 UTC (rev 527)
> @@ -46,9 +46,12 @@
>  	~BackupDaemon();
>
>  private:
> -	// methods below do partial (specialized) serialization of client  
> state only
> -	void SerializeStoreObjectInfo(int64_t aClientStoreMarker,  
> box_time_t theLastSyncTime, box_time_t theNextSyncTime) const;
> -	bool DeserializeStoreObjectInfo(int64_t & aClientStoreMarker,  
> box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
> +	// methods below do partial (specialized) serialization of
> +	// client state only
> +	bool SerializeStoreObjectInfo(int64_t aClientStoreMarker,
> +		box_time_t theLastSyncTime, box_time_t theNextSyncTime) const;
> +	bool DeserializeStoreObjectInfo(int64_t & aClientStoreMarker,
> +		box_time_t & theLastSyncTime, box_time_t & theNextSyncTime);
>  	bool DeleteStoreObjectInfo() const;
>  	BackupDaemon(const BackupDaemon &);
>  public:
>
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 20:05:50 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 26 Feb 2006 20:05:50 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r527 - box/chris/general/bin/bbackupd
In-Reply-To: <D12D7751-31F5-49EF-81A3-5C531C641841@fluffy.co.uk>
References: <20060226195431.D5B8A95@s0g0.pems.testserver.co.uk>
 <D12D7751-31F5-49EF-81A3-5C531C641841@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602262004180.14767@top.qwarx.com>

Hi Ben,

> Writing an automated test for this feature is going to be a _nightmare_ 
> ...

Yeah, probably will be, sorry :-( It wasn't my idea :-)

Writing a perfect test may not be easy, but if we run the bbackupd tests 
twice, once with the StoreObjectInfoFile and once without, it probably 
shows that the feature doesn't break successful backups, even if it's not 
working properly.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 20:09:51 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 20:09:51 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r529 - box/chris/general/infrastructure/msvc/2003
Message-ID: <20060226200951.435C695@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 20:09:44 +0000 (Sun, 26 Feb 2006)
New Revision: 529

Modified:
   box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj
   box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj
   box/chris/general/infrastructure/msvc/2003/boxquery.vcproj
Log:
* infrastructure/msvc/2003/boxquery.vcproj
* infrastructure/msvc/2003/bbackupctl.vcproj
* infrastructure/msvc/2003/bbackupd.vcproj
- Added messages.rc to project (by hand, I hope it works for VS2003 users)


Modified: box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj	2006-02-26 20:07:21 UTC (rev 528)
+++ box/chris/general/infrastructure/msvc/2003/bbackupctl.vcproj	2006-02-26 20:09:44 UTC (rev 529)
@@ -149,6 +149,9 @@
 			Name="Resource Files"
 			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+			<File
+				RelativePath="..\..\..\lib\win32\messages.rc">
+			</File>
 		</Filter>
 	</Files>
 	<Globals>

Modified: box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj	2006-02-26 20:07:21 UTC (rev 528)
+++ box/chris/general/infrastructure/msvc/2003/bbackupd.vcproj	2006-02-26 20:09:44 UTC (rev 529)
@@ -200,6 +200,9 @@
 			Name="Resource Files"
 			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+			<File
+				RelativePath="..\..\..\lib\win32\messages.rc">
+			</File>
 		</Filter>
 		<File
 			RelativePath="..\..\..\ReadMe.txt">

Modified: box/chris/general/infrastructure/msvc/2003/boxquery.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2003/boxquery.vcproj	2006-02-26 20:07:21 UTC (rev 528)
+++ box/chris/general/infrastructure/msvc/2003/boxquery.vcproj	2006-02-26 20:09:44 UTC (rev 529)
@@ -161,6 +161,9 @@
 			Name="Resource Files"
 			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+			<File
+				RelativePath="..\..\..\lib\win32\messages.rc">
+			</File>
 		</Filter>
 		<File
 			RelativePath="..\..\..\ReadMe.txt">


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 20:07:26 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Sun, 26 Feb 2006 20:07:26 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r528 - box/chris/general/infrastructure/msvc/2005
Message-ID: <20060226200726.CC5E695@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-26 20:07:21 +0000 (Sun, 26 Feb 2006)
New Revision: 528

Modified:
   box/chris/general/infrastructure/msvc/2005/bbackupctl.vcproj
   box/chris/general/infrastructure/msvc/2005/bbackupd.vcproj
   box/chris/general/infrastructure/msvc/2005/boxquery.vcproj
Log:
* infrastructure/msvc/2005/boxquery.vcproj
* infrastructure/msvc/2005/bbackupctl.vcproj
* infrastructure/msvc/2005/bbackupd.vcproj
- Added messages.rc to project


Modified: box/chris/general/infrastructure/msvc/2005/bbackupctl.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2005/bbackupctl.vcproj	2006-02-26 19:54:24 UTC (rev 527)
+++ box/chris/general/infrastructure/msvc/2005/bbackupctl.vcproj	2006-02-26 20:07:21 UTC (rev 528)
@@ -210,6 +210,10 @@
 			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
 			>
+			<File
+				RelativePath="..\..\..\lib\win32\messages.rc"
+				>
+			</File>
 		</Filter>
 	</Files>
 	<Globals>

Modified: box/chris/general/infrastructure/msvc/2005/bbackupd.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2005/bbackupd.vcproj	2006-02-26 19:54:24 UTC (rev 527)
+++ box/chris/general/infrastructure/msvc/2005/bbackupd.vcproj	2006-02-26 20:07:21 UTC (rev 528)
@@ -275,6 +275,10 @@
 			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
 			>
+			<File
+				RelativePath="..\..\..\lib\win32\messages.rc"
+				>
+			</File>
 		</Filter>
 		<File
 			RelativePath="..\..\..\ReadMe.txt"

Modified: box/chris/general/infrastructure/msvc/2005/boxquery.vcproj
===================================================================
--- box/chris/general/infrastructure/msvc/2005/boxquery.vcproj	2006-02-26 19:54:24 UTC (rev 527)
+++ box/chris/general/infrastructure/msvc/2005/boxquery.vcproj	2006-02-26 20:07:21 UTC (rev 528)
@@ -231,6 +231,10 @@
 			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
 			>
+			<File
+				RelativePath="..\..\..\lib\win32\messages.rc"
+				>
+			</File>
 		</Filter>
 		<File
 			RelativePath="..\..\..\ReadMe.txt"


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 20:35:21 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Sun, 26 Feb 2006 20:35:21 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <1140983490.6695.4.camel@avenin.ebourne.me.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>	 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>	 <43FF0027.60108@netinertia.co.uk>	 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>	 <43FF259F.5000006@netinertia.co.uk>	 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>	 <44019B8D.6010900@netinertia.co.uk>	 <1140957571.7736.11.camel@avenin.ebourne.me.uk>	 <4401EDD4.4020706@netinertia.co.uk> <1140983490.6695.4.camel@avenin.ebourne.me.uk>
Message-ID: <44021109.4000809@netinertia.co.uk>

Martin Ebourne wrote:
> On Sun, 2006-02-26 at 18:05 +0000, James O'Gorman wrote:
>> It wasn't in BoxConfig.h. Adding these lines into configure.ac does it, 
>> but is this OK, and should these stay in configure.ac or in the 
>> infrastructure/m4 directory?
>>
>> AC_PROG_PATH([PERL], [perl], [no])
>> if test "x$PERL" != "xno"; then
>>    AC_SUBST([PERL])
>>    AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the 
>> perl executable])
>> fi
> 
> Yes, that looks fine. Sorry, should have said AC_DEFINE_UNQUOTED, not
> AC_SUBST. In fact, I think AC_DEFINE_UNQUOTED will AC_SUBST for you so
> that may not be needed.

OK, I'll try that, thanks. Actually, I think the manual did say that 
AC_PROG_PATH would run AC_SUBST as well, but I prefer to do things 
explicitly until I'm absolutely sure. I'll give it a go though.

> Do you really not want to define it if perl is not available? Would it
> not be better to error on no perl? If you don't error you need to
> usefully handle the case where it does not exist, which seems unlikely.

Yes, I did think of that afterwards, so added

else
   AC_MSG_ERROR([[perl executable was not found]])
fi

> In configure.ac is fine. I split things out into inf/m4 when they become
> a bit on the large/complex side, to keep configure.ac small and easy to
> read. This is very modular so could be split, but then it's also only a
> few lines, so it doesn't gain much.

Ah, OK, that makes sense.

Cheers,

James

From boxbackup-dev@fluffy.co.uk  Sun Feb 26 20:36:06 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 20:36:06 +0000
Subject: [Box Backup-dev] COMMIT r527 - box/chris/general/bin/bbackupd
In-Reply-To: <Pine.LNX.4.62.0602262004180.14767@top.qwarx.com>
References: <20060226195431.D5B8A95@s0g0.pems.testserver.co.uk> <D12D7751-31F5-49EF-81A3-5C531C641841@fluffy.co.uk> <Pine.LNX.4.62.0602262004180.14767@top.qwarx.com>
Message-ID: <B3419638-9E49-47F8-BB9E-D0ECCD1FBA84@fluffy.co.uk>

On 26 Feb 2006, at 20:05, Chris Wilson wrote:

> Hi Ben,
>
>> Writing an automated test for this feature is going to be a  
>> _nightmare_ ...
>
> Yeah, probably will be, sorry :-( It wasn't my idea :-)
>
> Writing a perfect test may not be easy, but if we run the bbackupd  
> tests twice, once with the StoreObjectInfoFile and once without, it  
> probably shows that the feature doesn't break successful backups,  
> even if it's not working properly.

Hmmm... I'd be more worried about the error conditions. What happens  
if the file gets corrupted? Gets deleted? An old one appears  
magically? That kind of thing.

I think we have to be very careful when writing a backup utility, and  
make sure that even if things we don't expect happen, the backup  
still backs up.

Ben





From boxbackup-dev@fluffy.co.uk  Sun Feb 26 22:08:42 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Sun, 26 Feb 2006 22:08:42 +0000
Subject: [Box Backup-dev] Makefile.extra?
In-Reply-To: <1140983490.6695.4.camel@avenin.ebourne.me.uk>
References: <43FEFD9C.6000407@netinertia.co.uk>	 <16699B06-7BB0-469E-9E08-CDB141AB2C3B@fluffy.co.uk>	 <43FF0027.60108@netinertia.co.uk>	 <C13A66CD-3A2D-44CA-B9AD-40E4EE118EC4@fluffy.co.uk>	 <43FF259F.5000006@netinertia.co.uk>	 <28BF400E-E64D-44AA-9BB3-4CC16ED91EB4@fluffy.co.uk>	 <44019B8D.6010900@netinertia.co.uk>	 <1140957571.7736.11.camel@avenin.ebourne.me.uk>	 <4401EDD4.4020706@netinertia.co.uk> <1140983490.6695.4.camel@avenin.ebourne.me.uk>
Message-ID: <440226EA.3030604@netinertia.co.uk>

This is a multi-part message in MIME format.
--------------090403060205010902020206
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Here's my latest set of patches. All done against SVN, I used autoconf 
to configure the perl scripts instead of makebuildenv.pl, and a #define 
is created in BoxConfig.h for the cpp file. Hopefully this should do the 
trick!

Also reattached the script for renaming all the relevant files to .in

James

Martin Ebourne wrote:
> On Sun, 2006-02-26 at 18:05 +0000, James O'Gorman wrote:
>> It wasn't in BoxConfig.h. Adding these lines into configure.ac does it, 
>> but is this OK, and should these stay in configure.ac or in the 
>> infrastructure/m4 directory?
>>
>> AC_PROG_PATH([PERL], [perl], [no])
>> if test "x$PERL" != "xno"; then
>>    AC_SUBST([PERL])
>>    AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the 
>> perl executable])
>> fi
> 
> Yes, that looks fine. Sorry, should have said AC_DEFINE_UNQUOTED, not
> AC_SUBST. In fact, I think AC_DEFINE_UNQUOTED will AC_SUBST for you so
> that may not be needed.
> 
> Do you really not want to define it if perl is not available? Would it
> not be better to error on no perl? If you don't error you need to
> usefully handle the case where it does not exist, which seems unlikely.
> 
> In configure.ac is fine. I split things out into inf/m4 when they become
> a bit on the large/complex side, to keep configure.ac small and easy to
> read. This is very modular so could be split, but then it's also only a
> few lines, so it doesn't gain much.
> 
> Cheers,
> 
> Martin.
> 
> _______________________________________________
> Boxbackup-dev mailing list
> Boxbackup-dev@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup-dev


--------------090403060205010902020206
Content-Type: application/x-gzip; x-mac-type="0"; x-mac-creator="0";
 name="perl-ac-patches.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="perl-ac-patches.tar.gz"

[encoded data, 5840 characters]
+jMcCVSmMpXpX5L+D402KMEAoAAA
--------------090403060205010902020206--

From boxbackup-dev@fluffy.co.uk  Sun Feb 26 22:36:51 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 26 Feb 2006 22:36:51 +0000 (GMT)
Subject: [Box Backup-dev] Windows ACLs
Message-ID: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com>

Hi all,

Does anyone have any suggestions as to how Windows ACLs, owner and group 
should be stored by Box?

I'm guessing that extended attributes would be the way to go, but I'm not 
familiar with them and I don't know how to store them in a way that makes 
sense and doesn't conflict with other potential uses. Perhaps as 
attributes named 'win32.owner', 'win32.group', 'win32.dacl.administrators',
'win32.dacl.everyone', ...?

e.g.:

win32.owner = BUILTIN\Administrator
win32.group = BUILTIN\Administrators
win32.dacl.administrators = a bitmask of rights
win32.dacl.everyone = a bitmask of rights

Does that make sense? I'm still learning how to use ACLs.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 22:43:32 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 22:43:32 +0000
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com>
Message-ID: <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk>

On 26 Feb 2006, at 22:36, Chris Wilson wrote:

> Hi all,
>
> Does anyone have any suggestions as to how Windows ACLs, owner and  
> group should be stored by Box?
>
> I'm guessing that extended attributes would be the way to go, but  
> I'm not familiar with them and I don't know how to store them in a  
> way that makes sense and doesn't conflict with other potential  
> uses. Perhaps as attributes named 'win32.owner', 'win32.group',  
> 'win32.dacl.administrators',
> 'win32.dacl.everyone', ...?

Err... see BackupClientFileAttribute.cpp. Note how the first member  
of attr_StreamFormat is AttributeType. I suggest you add  
ATTRIBUTETYPE_WINDOWS and then create a attr_StreamFormat_Windows  
which contains whatever information you need.

Can't you use a Windows API to serialise and deserialise the ACLs?  
Just use that with the one word header. Using extended attributes  
would be a huge amount of work for little gain.

In 0.20 I want to change this to an arbitrary number of attribute  
blocks, each with size and type headers. This approach will make it  
easy to fit in with that later.

Ben





From boxbackup-dev@fluffy.co.uk  Sun Feb 26 22:56:13 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 26 Feb 2006 22:56:13 +0000 (GMT)
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com>
 <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602262255390.14767@top.qwarx.com>

Hi Ben,

On Sun, 26 Feb 2006, Ben Summers wrote:

> Can't you use a Windows API to serialise and deserialise the ACLs? Just 
> use that with the one word header. Using extended attributes would be a 
> huge amount of work for little gain.

That would be nice, but I can't find one. Do you know of one?

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 23:05:52 2006
From: boxbackup-dev@fluffy.co.uk (Charles Lecklider)
Date: Sun, 26 Feb 2006 23:05:52 +0000
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com> <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk>
Message-ID: <44023450.2090400@invis.net>

Ben Summers wrote:
> Can't you use a Windows API to serialise and deserialise the ACLs?

Not if you want to stand a chance of applying them on a machine other
than the original, no.

The only time I can see storing Windows ACLs has any use is if you want
to backup an entire machine so that you can restore it as a whole later,
and I'm not at all sure that's a role for Box.

-C


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 23:10:13 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 26 Feb 2006 23:10:13 +0000 (GMT)
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <44023450.2090400@invis.net>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com>
 <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk> <44023450.2090400@invis.net>
Message-ID: <Pine.LNX.4.62.0602262308540.14767@top.qwarx.com>

Hi Charles,

>> Can't you use a Windows API to serialise and deserialise the ACLs?
>
> Not if you want to stand a chance of applying them on a machine other 
> than the original, no.
>
> The only time I can see storing Windows ACLs has any use is if you want 
> to backup an entire machine so that you can restore it as a whole later, 
> and I'm not at all sure that's a role for Box.

In the example that Pete gave, he needed to restore the data files for 
some tax software that had been lost in a hard disk crash. Presumably 
those files had a DACL on them to protect them from being read by other 
users. Doesn't it make sense to try to back up and restore that DACL, just 
as we back up and restore file permissions on Unix?

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 23:12:46 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Sun, 26 Feb 2006 23:12:46 +0000
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <44023450.2090400@invis.net>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com> <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk> <44023450.2090400@invis.net>
Message-ID: <8A1FC842-7168-45FE-8129-4FBBFE35F365@fluffy.co.uk>

On 26 Feb 2006, at 23:05, Charles Lecklider wrote:

> Ben Summers wrote:
>> Can't you use a Windows API to serialise and deserialise the ACLs?
>
> Not if you want to stand a chance of applying them on a machine other
> than the original, no.

It was BackupRead and BackupWrite I was thinking of. But of course,  
these are going to use the local SIDs and will be useless on other  
machines. Oh well. Nothing is easy with Win32 security.

>
> The only time I can see storing Windows ACLs has any use is if you  
> want
> to backup an entire machine so that you can restore it as a whole  
> later,
> and I'm not at all sure that's a role for Box.

Hmmm... what would you recommend then? At the very least, it has to  
separate out each users' files, I suppose.

Ben





From boxbackup-dev@fluffy.co.uk  Sun Feb 26 23:24:48 2006
From: boxbackup-dev@fluffy.co.uk (Charles Lecklider)
Date: Sun, 26 Feb 2006 23:24:48 +0000
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <Pine.LNX.4.62.0602262308540.14767@top.qwarx.com>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com> <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk> <44023450.2090400@invis.net> <Pine.LNX.4.62.0602262308540.14767@top.qwarx.com>
Message-ID: <440238C0.20302@invis.net>

Chris Wilson wrote:
> Hi Charles,
> 
>>> Can't you use a Windows API to serialise and deserialise the ACLs?
>>
>> Not if you want to stand a chance of applying them on a machine other
>> than the original, no.
>>
>> The only time I can see storing Windows ACLs has any use is if you
>> want to backup an entire machine so that you can restore it as a whole
>> later, and I'm not at all sure that's a role for Box.
> 
> In the example that Pete gave, he needed to restore the data files for
> some tax software that had been lost in a hard disk crash. Presumably
> those files had a DACL on them to protect them from being read by other
> users. Doesn't it make sense to try to back up and restore that DACL,
> just as we back up and restore file permissions on Unix?

No:

1) He was restoring onto a new machine, so none of the raw SIDs would
match. If we stored the names it would only work if he used the same
username on the new machine.

2) The files will automatically get their permissions from the directory
they're restored into. Because of the way ACL inheritance works from
Win2k onwards it's quite hard to change them to what's stored without
breaking things quite badly. It's surprisingly easy to get a null DACL,
which in contrast to a NULL SD actually denies access to everyone....

3) SIDs can become orphaned - usually when users are deleted, but also
temporarily if no domain controller is available. I suppose we could
store a textual representation of them, but that starts getting pretty
nasty.

-C


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 23:32:44 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Sun, 26 Feb 2006 23:32:44 +0000 (GMT)
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <440238C0.20302@invis.net>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com>
 <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk> <44023450.2090400@invis.net>
 <Pine.LNX.4.62.0602262308540.14767@top.qwarx.com> <440238C0.20302@invis.net>
Message-ID: <Pine.LNX.4.62.0602262327110.14767@top.qwarx.com>

Hi Charles,

>> Doesn't it make sense to try to back up and restore that DACL, just as 
>> we back up and restore file permissions on Unix?
>
> No:
>
> 1) He was restoring onto a new machine, so none of the raw SIDs would 
>    match. If we stored the names it would only work if he used the same 
>    username on the new machine.

I was considering using names instead of SIDs. If the specified user does 
not exist on the new machine, we can always report the problem to the user 
doing the restore, who presumably will know what a sensible mapping would 
be.

I also imagine that in many cases (admittedly not all), the old and new 
machines would be members of the same domain, and thus it's likely that 
most of the SIDs of files that we would consider restoring would be domain 
SIDs rather than local ones, and still valid on the new machine.

> 2) The files will automatically get their permissions from the directory 
>    they're restored into. Because of the way ACL inheritance works from 
>    Win2k onwards it's quite hard to change them to what's stored without 
>    breaking things quite badly. It's surprisingly easy to get a null 
>    DACL, which in contrast to a NULL SD actually denies access to 
>    everyone....

Sorry, what is a null DACL? Is it a DACL with no EXPLICIT_ACCESS entries? 
How does one avoid creating one?

> 3) SIDs can become orphaned - usually when users are deleted, but also 
>    temporarily if no domain controller is available. I suppose we could 
>    store a textual representation of them, but that starts getting 
>    pretty nasty.

Thanks for reminding me of this. If the SID doesn't have a user name 
mapping, could we not back up the SID, on the assumption that it may be 
restored to the same machine, and in that case we would want to restore 
the original SID, orphaned or not? If restored to a different machine, it 
would seem to make sense to warn the user, as above, and let them take 
appropriate action.

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 |


From boxbackup-dev@fluffy.co.uk  Sun Feb 26 23:35:14 2006
From: boxbackup-dev@fluffy.co.uk (Charles Lecklider)
Date: Sun, 26 Feb 2006 23:35:14 +0000
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <8A1FC842-7168-45FE-8129-4FBBFE35F365@fluffy.co.uk>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com> <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk> <44023450.2090400@invis.net> <8A1FC842-7168-45FE-8129-4FBBFE35F365@fluffy.co.uk>
Message-ID: <44023B32.5060402@invis.net>

Ben Summers wrote:
> Oh well. Nothing is easy with Win32 security.

That's what makes it such fun :-)

>> The only time I can see storing Windows ACLs has any use is if you want
>> to backup an entire machine so that you can restore it as a whole later,
>> and I'm not at all sure that's a role for Box.
> 
> Hmmm... what would you recommend then? At the very least, it has to
> separate out each users' files, I suppose.

One account per user.

I have code to import a cert into the trusted root certs store (would be
done once when installing Box), generate a key pair in the local user's
store, create and send a CSR, and import the signed cert into the store.

Exactly how we get the new cert from the server back to the client is a
matter that needs some discussion, since it rapidly becomes quite
tedious to do it manually....

-C


From boxbackup-dev@fluffy.co.uk  Mon Feb 27 00:02:58 2006
From: boxbackup-dev@fluffy.co.uk (Charles Lecklider)
Date: Mon, 27 Feb 2006 00:02:58 +0000
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <Pine.LNX.4.62.0602262327110.14767@top.qwarx.com>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com> <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk> <44023450.2090400@invis.net> <Pine.LNX.4.62.0602262308540.14767@top.qwarx.com> <440238C0.20302@invis.net> <Pine.LNX.4.62.0602262327110.14767@top.qwarx.com>
Message-ID: <440241B2.9090305@invis.net>

Chris Wilson wrote:
> Hi Charles,
> 
>>> Doesn't it make sense to try to back up and restore that DACL, just
>>> as we back up and restore file permissions on Unix?
>>
>> No:
>>
>> 1) He was restoring onto a new machine, so none of the raw SIDs would
>>    match. If we stored the names it would only work if he used the
>> same    username on the new machine.
> 
> I was considering using names instead of SIDs. If the specified user
> does not exist on the new machine, we can always report the problem to
> the user doing the restore, who presumably will know what a sensible
> mapping would be.

They will? I was hoping the end user would be able to use the GUI to
restore their own files, but if it gripes about broken accounts that
would quickly be more trouble that it's worth.

> I also imagine that in many cases (admittedly not all), the old and new
> machines would be members of the same domain, and thus it's likely that
> most of the SIDs of files that we would consider restoring would be
> domain SIDs rather than local ones, and still valid on the new machine.

If they're part of the same domain then they are probably using roaming
profiles too, in which case Box wouldn't be needed on the client; you
just need to login to the new machine and everything gets copied back
from the server.

>> 2) The files will automatically get their permissions from the
>> directory    they're restored into. Because of the way ACL inheritance
>> works from    Win2k onwards it's quite hard to change them to what's
>> stored without    breaking things quite badly. It's surprisingly easy
>> to get a null    DACL, which in contrast to a NULL SD actually denies
>> access to    everyone....
> 
> Sorry, what is a null DACL? Is it a DACL with no EXPLICIT_ACCESS
> entries? How does one avoid creating one?

It's not that you have to avoid creating one, it's that Windows
sometimes treats what you think is a valid DACL as a null DACL. It's
almost always because you got the inheritance flags ever so slightly
wrong, and it's a nasty surprise because you can't just set it again -
you have to take ownership first.

>> 3) SIDs can become orphaned - usually when users are deleted, but also
>>    temporarily if no domain controller is available. I suppose we
>> could    store a textual representation of them, but that starts
>> getting    pretty nasty.
> 
> Thanks for reminding me of this. If the SID doesn't have a user name
> mapping, could we not back up the SID, on the assumption that it may be
> restored to the same machine, and in that case we would want to restore
> the original SID, orphaned or not? If restored to a different machine,
> it would seem to make sense to warn the user, as above, and let them
> take appropriate action.

I guess it depends on who your target user is.

I want a normal user to be able to restore their own files without
having to phone me. Messages about SIDs, while guaranteed to induce
interesting questions ("who is this SID guy? there's noone here called
Sid"), aren't in the slightest bit helpful to the end user.

Now, if you're expecting an Administrator to be doing the restoring,
fine, warn away. But, answer me this: if the admin is restoring the
files, why is he restoring the permissions? It'd be far simpler just to
set them again than to clean up the mess Box will make of the inheritance.

Most of the time the file is going to be restored in-place. That means
that most of the time it will automatically get the right permissions.
Why mess with them? If it isn't going to be put in the same place, who's
to say those permissions make any kind of sense?


I know I keep going on about inheritance, but it really is a problem. If
you don't get the order of the ACL exactly correct you end up with
something that simply doesn't work properly. Worse, unless you create a
protected DACL on every single file you restore (and if some software
did that to me as an admin I'd put a bounty on the writer's head because
that's *really* anti-social), you have to take into account the ACEs
that are going to be inherited from the directory.

Worse, if you're going to restore a whole directory, you have to take
into account the order in which you restore things, because the
inheritance kicks in as soon as you create the directory.


Also, restoring permissions forces us to have a service running with a
load of privileges. My view is that the risk of having that service
outweighs the rather dubious benefit of being able to restore ACLs. If
we don't restore ACLs then we can run with no privileges and impersonate
the client end of the pipe when we need to do any work - far safer.

-C

From boxbackup-dev@fluffy.co.uk  Mon Feb 27 00:19:42 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 27 Feb 2006 00:19:42 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r530 - box/chris/general/lib/win32
Message-ID: <20060227001942.A3CAA95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-27 00:19:35 +0000 (Mon, 27 Feb 2006)
New Revision: 530

Modified:
   box/chris/general/lib/win32/getopt_long.cxx
Log:
* getopt_long.cxx
- Added a newline at the end of getopt error messages, as required by
  the warnx() spec


Modified: box/chris/general/lib/win32/getopt_long.cxx
===================================================================
--- box/chris/general/lib/win32/getopt_long.cxx	2006-02-26 20:09:44 UTC (rev 529)
+++ box/chris/general/lib/win32/getopt_long.cxx	2006-02-27 00:19:35 UTC (rev 530)
@@ -95,6 +95,7 @@
 	va_start(ap, fmt);
 	vfprintf(stderr, fmt, ap);
 	va_end(ap);
+	fprintf(stderr, "\n");
 }
 
 static int getopt_internal(int, char * const *, const char *,


From boxbackup-dev@fluffy.co.uk  Mon Feb 27 00:22:04 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Mon, 27 Feb 2006 00:22:04 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r531 - box/chris/general/test/win32
Message-ID: <20060227002204.EBE4495@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-27 00:21:57 +0000 (Mon, 27 Feb 2006)
New Revision: 531

Modified:
   box/chris/general/test/win32/testlibwin32.cpp
Log:
* testlibwin32.cpp
- Added code for testing how Windows DACLs work


Modified: box/chris/general/test/win32/testlibwin32.cpp
===================================================================
--- box/chris/general/test/win32/testlibwin32.cpp	2006-02-27 00:19:35 UTC (rev 530)
+++ box/chris/general/test/win32/testlibwin32.cpp	2006-02-27 00:21:57 UTC (rev 531)
@@ -7,6 +7,8 @@
 #ifdef WIN32
 
 #include <assert.h>
+#include <AccCtrl.h>
+#include <Aclapi.h>
 
 #include "../../bin/bbackupd/BackupDaemon.h"
 #include "BoxPortsAndFiles.h"
@@ -14,6 +16,204 @@
 
 int main(int argc, char* argv[])
 {
+	// ACL tests
+	char* exename = getenv("WINDIR");
+
+	PSID psidOwner;
+	PSID psidGroup;
+	PACL pDacl;
+	PSECURITY_DESCRIPTOR pSecurityDesc;
+
+	DWORD result = GetNamedSecurityInfo(
+		exename, // pObjectName
+		SE_FILE_OBJECT, // ObjectType
+		DACL_SECURITY_INFORMATION | // SecurityInfo
+		GROUP_SECURITY_INFORMATION |
+		OWNER_SECURITY_INFORMATION,
+		&psidOwner, // ppsidOwner,
+		&psidGroup, // ppsidGroup,
+		&pDacl,     // ppDacl,
+		NULL,       // ppSacl,
+		&pSecurityDesc // ppSecurityDescriptor
+	);
+	if (result != ERROR_SUCCESS)
+	{
+		printf("Error getting security info for '%s': error %d",
+			exename, result);
+	}
+	assert(result == ERROR_SUCCESS);
+
+	char namebuf[1024];
+	char domainbuf[1024];
+	SID_NAME_USE nametype;
+	DWORD namelen = sizeof(namebuf);
+	DWORD domainlen = sizeof(domainbuf);
+
+	assert(LookupAccountSid(NULL, psidOwner, namebuf, &namelen,
+		domainbuf, &domainlen, &nametype));
+
+	printf("Owner:\n");
+	printf("User name:   %s\n", namebuf);
+	printf("Domain name: %s\n", domainbuf);
+	printf("Name type:   %d\n", nametype);
+	printf("\n");
+
+	namelen = sizeof(namebuf);
+	domainlen = sizeof(domainbuf);
+
+	assert(LookupAccountSid(NULL, psidGroup, namebuf, &namelen,
+		domainbuf, &domainlen, &nametype));
+
+	printf("Group:\n");
+	printf("User name:   %s\n", namebuf);
+	printf("Domain name: %s\n", domainbuf);
+	printf("Name type:   %d\n", nametype);
+	printf("\n");
+
+	ULONG numEntries;
+	PEXPLICIT_ACCESS pEntries;
+	result = GetExplicitEntriesFromAcl
+	(
+		pDacl,       // pAcl
+		&numEntries, // pcCountOfExplicitEntries,
+		&pEntries    // pListOfExplicitEntries
+	);
+	assert(result == ERROR_SUCCESS);
+
+	printf("Found %lu explicit DACL entries for '%s'\n\n",
+		(unsigned long)numEntries, exename);
+
+	for (ULONG i = 0; i < numEntries; i++)
+	{
+		EXPLICIT_ACCESS* pEntry = &(pEntries[i]);
+		printf("DACL entry %lu:\n", (unsigned long)i);
+
+		DWORD perms = pEntry->grfAccessPermissions;
+		printf("  Access permissions: ", perms);
+
+		#define PRINT_PERM(name) \
+		if (perms & name) \
+		{ \
+			printf(#name " "); \
+			perms &= ~name; \
+		}
+
+		PRINT_PERM(FILE_ADD_FILE);
+		PRINT_PERM(FILE_ADD_SUBDIRECTORY);
+		PRINT_PERM(FILE_ALL_ACCESS);
+		PRINT_PERM(FILE_APPEND_DATA);
+		PRINT_PERM(FILE_CREATE_PIPE_INSTANCE);
+		PRINT_PERM(FILE_DELETE_CHILD);
+		PRINT_PERM(FILE_EXECUTE);
+		PRINT_PERM(FILE_LIST_DIRECTORY);
+		PRINT_PERM(FILE_READ_ATTRIBUTES);
+		PRINT_PERM(FILE_READ_DATA);
+		PRINT_PERM(FILE_READ_EA);
+		PRINT_PERM(FILE_TRAVERSE);
+		PRINT_PERM(FILE_WRITE_ATTRIBUTES);
+		PRINT_PERM(FILE_WRITE_DATA);
+		PRINT_PERM(FILE_WRITE_EA);
+		PRINT_PERM(STANDARD_RIGHTS_READ);
+		PRINT_PERM(STANDARD_RIGHTS_WRITE);
+		PRINT_PERM(SYNCHRONIZE);
+		PRINT_PERM(DELETE);
+		PRINT_PERM(READ_CONTROL);
+		PRINT_PERM(WRITE_DAC);
+		PRINT_PERM(WRITE_OWNER);
+		PRINT_PERM(MAXIMUM_ALLOWED);
+		PRINT_PERM(GENERIC_ALL);
+		PRINT_PERM(GENERIC_EXECUTE);
+		PRINT_PERM(GENERIC_WRITE);
+		PRINT_PERM(GENERIC_READ);
+		printf("\n");
+
+		if (perms)
+		{
+			printf("  Bits left over: %08x\n", perms);
+		}
+		assert(!perms);
+
+		printf("  Access mode: ");
+		switch(pEntry->grfAccessMode)
+		{
+		case NOT_USED_ACCESS:
+			printf("NOT_USED_ACCESS\n"); break;
+		case GRANT_ACCESS:
+			printf("GRANT_ACCESS\n"); break;
+		case DENY_ACCESS:
+			printf("DENY_ACCESS\n"); break;
+		case REVOKE_ACCESS:
+			printf("REVOKE_ACCESS\n"); break;
+		case SET_AUDIT_SUCCESS:
+			printf("SET_AUDIT_SUCCESS\n"); break;
+		case SET_AUDIT_FAILURE:
+			printf("SET_AUDIT_FAILURE\n"); break;
+		default:
+			printf("Unknown (%08x)\n", pEntry->grfAccessMode);
+		}
+
+		printf("  Trustee: ");
+		assert(pEntry->Trustee.pMultipleTrustee == NULL);
+		assert(pEntry->Trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE);
+		switch(pEntry->Trustee.TrusteeForm)
+		{
+		case TRUSTEE_IS_SID:
+			{
+				PSID trusteeSid = (PSID)(pEntry->Trustee.ptstrName);
+
+				namelen = sizeof(namebuf);
+				domainlen = sizeof(domainbuf);
+
+				assert(LookupAccountSid(NULL, trusteeSid, namebuf, &namelen,
+					domainbuf, &domainlen, &nametype));
+
+				printf("SID of %s\\%s (%d)\n", domainbuf, namebuf, nametype);
+			}
+			break;
+		case TRUSTEE_IS_NAME:
+			printf("Name\n"); break;
+		case TRUSTEE_BAD_FORM:
+			printf("Bad form\n"); assert(0);
+		case TRUSTEE_IS_OBJECTS_AND_SID:
+			printf("Objects and SID\n"); break;
+		case TRUSTEE_IS_OBJECTS_AND_NAME:
+			printf("Objects and name\n"); break;
+		default:
+			printf("Unknown form\n"); assert(0);
+		}
+
+		printf("  Trustee type: ");
+		switch(pEntry->Trustee.TrusteeType)
+		{
+		case TRUSTEE_IS_UNKNOWN:
+			printf("Unknown type.\n"); break;
+		case TRUSTEE_IS_USER:
+			printf("User\n"); break;
+		case TRUSTEE_IS_GROUP:
+			printf("Group\n"); break;
+		case TRUSTEE_IS_DOMAIN:
+			printf("Domain\n"); break;
+		case TRUSTEE_IS_ALIAS:
+			printf("Alias\n"); break;
+		case TRUSTEE_IS_WELL_KNOWN_GROUP:
+			printf("Well-known group\n"); break;
+		case TRUSTEE_IS_DELETED:
+			printf("Deleted account\n"); break;
+		case TRUSTEE_IS_INVALID:
+			printf("Invalid trustee type\n"); break;
+		case TRUSTEE_IS_COMPUTER:
+			printf("Computer\n"); break;
+		default:
+			printf("Unknown type %d\n", pEntry->Trustee.TrusteeType); 
+			assert(0);
+		}
+
+		printf("\n");
+	}
+
+	assert(LocalFree((HLOCAL)pEntries) == 0);
+	assert(LocalFree((HLOCAL)pSecurityDesc) == 0);
+
 	chdir("c:\\tmp");
 	openfile("test", O_CREAT, 0);
 	struct stat ourfs;
@@ -27,12 +227,11 @@
 		do
 		{
 			info = readdir(ourDir);
-			if ( info ) printf("File/Dir name is : %s\r\n", info->d_name);
+			if (info) printf("File/Dir name is : %s\r\n", info->d_name);
+		}
+		while (info != NULL);
 
-		}while ( info != NULL );
-
 		closedir(ourDir);
-
 	}
 	
 	std::string diry("C:\\Projects\\boxbuild\\testfiles\\");
@@ -43,20 +242,20 @@
 		do
 		{
 			info = readdir(ourDir);
-			if ( info == NULL ) break;
+			if (info == NULL) break;
 			std::string file(diry + info->d_name);
 			stat(file.c_str(), &ourfs);
-			if ( info ) printf("File/Dir name is : %s\r\n", info->d_name);
+			if (info) printf("File/Dir name is : %s\r\n", info->d_name);
+		}
+		while ( info != NULL );
 
-		}while ( info != NULL );
-
 		closedir(ourDir);
 
 	}
 
 	stat("c:\\windows", &ourfs);
 	stat("c:\\autoexec.bat", &ourfs);
-	printf("Finished dir read");
+	printf("Finished dir read\n");
 
 	//test our getopt function
 	char * test_argv[] = 
@@ -102,11 +301,11 @@
 
 	if (S_ISREG(ourfs.st_mode))
 	{
-		printf("is a normal file");
+		printf("is a normal file\n");
 	}
 	else
 	{
-		printf("is a directory?");
+		printf("is a directory?\n");
 		exit(1);
 	}
 
@@ -114,11 +313,11 @@
 
 	if ( S_ISDIR(ourfs.st_mode))
 	{
-		printf("is a directory");
+		printf("is a directory\n");
 	}
 	else
 	{
-		printf("is a file?");
+		printf("is a file?\n");
 		exit(1);
 	}
 


From boxbackup-dev@fluffy.co.uk  Mon Feb 27 06:21:02 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Sun, 26 Feb 2006 22:21:02 -0800
Subject: [Box Backup-dev] [Doc] Format of the documentation
Message-ID: <44029A4E.3040208@reedtz.com>

Documenters,
I think the first thing we need to decide is what format we should use
for the documentation, and then get the existing docs (fluffy.co.uk and
the Wiki) into that format. I have looked at DocBook, and it looks like
it would fit our needs.  It would be easy to get DocBook files into svn,
and the HTML generated looks OK.

Let me know what you think. I'd like to get started ASAP, with figuring
out the outlines for the books we need to produce.

I'm going to be going over the Wiki and Ben's web site, to see if I can
categorize the pages (or even sections) into the books they belong in.

Also, we need to figure out how the docs will fit in svn. Should they be
a seperate project in svn? Like http://bbdev.fluffy.co.uk/svn/boxdoc  ?

Lastly, I don't think there is a problem, but I at least wanted to ask
if it is OK to use the -dev list for any discussions relating to the
documentation. Most of the editing will be passed back and forth through
svn, so the list would be used for discussions. Let me know if we should
find a different forum for discussing the documentation.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Mon Feb 27 11:40:44 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Mon, 27 Feb 2006 11:40:44 +0000
Subject: [Box Backup-dev] [Doc] Format of the documentation
In-Reply-To: <44029A4E.3040208@reedtz.com>
References: <44029A4E.3040208@reedtz.com>
Message-ID: <2C05A769-C33A-4D15-AF3E-BB133826C953@fluffy.co.uk>

On 27 Feb 2006, at 06:21, Per Thomsen wrote:

> Documenters,
> I think the first thing we need to decide is what format we should use
> for the documentation, and then get the existing docs (fluffy.co.uk  
> and
> the Wiki) into that format. I have looked at DocBook, and it looks  
> like
> it would fit our needs.  It would be easy to get DocBook files into  
> svn,
> and the HTML generated looks OK.

For the web site, it might be nice to use the existing look. This may  
require a simple script to process the output of whatever you choose,  
or you could write it as HTML fragments which get turned into the  
read pages. I have a number of scripts which will help.

>
> Let me know what you think. I'd like to get started ASAP, with  
> figuring
> out the outlines for the books we need to produce.
>
> I'm going to be going over the Wiki and Ben's web site, to see if I  
> can
> categorize the pages (or even sections) into the books they belong in.

It would also be nice to have manual pages for the executables as well.


>
> Also, we need to figure out how the docs will fit in svn. Should  
> they be
> a seperate project in svn? Like http://bbdev.fluffy.co.uk/svn/ 
> boxdoc  ?

I think it would be good to put it within the existing repository.  
This allows the documentation to be kept in sync with releases  
easily, and for the documentation to be included in the release  
tarballs.

Once a format and arrangement has been chosen, we need to adjust the  
release scripts to include it, and depending on the format, run an  
appropriate pre-processor to make them readable.

I suggest

   [trunk|whatever]/documentation/boxbackup

as a location for the documentation. This is to preserve the idea  
that multiple distributions can be built from the same source tree.


>
> Lastly, I don't think there is a problem, but I at least wanted to ask
> if it is OK to use the -dev list for any discussions relating to the
> documentation. Most of the editing will be passed back and forth  
> through
> svn, so the list would be used for discussions. Let me know if we  
> should
> find a different forum for discussing the documentation.

I would encourage the use of -dev, so that documentation is always  
linked to the development work. The two should not be isolated, in my  
opinion.


Thank you for organising this documentation effort. This is just as  
essential as the code itself.

Ben






From boxbackup-dev@fluffy.co.uk  Mon Feb 27 18:31:02 2006
From: boxbackup-dev@fluffy.co.uk (Per Thomsen)
Date: Mon, 27 Feb 2006 10:31:02 -0800
Subject: [Box Backup-dev] [Doc] Format of the documentation
In-Reply-To: <2C05A769-C33A-4D15-AF3E-BB133826C953@fluffy.co.uk>
References: <44029A4E.3040208@reedtz.com> <2C05A769-C33A-4D15-AF3E-BB133826C953@fluffy.co.uk>
Message-ID: <44034566.5040907@reedtz.com>

On 2/27/06 3:40 AM, Ben Summers wrote:
>
> On 27 Feb 2006, at 06:21, Per Thomsen wrote:
>
>> Documenters,
>> I think the first thing we need to decide is what format we should use
>> for the documentation, and then get the existing docs (fluffy.co.uk and
>> the Wiki) into that format. I have looked at DocBook, and it looks like
>> it would fit our needs.  It would be easy to get DocBook files into svn,
>> and the HTML generated looks OK.
>
> For the web site, it might be nice to use the existing look. This may
> require a simple script to process the output of whatever you choose,
> or you could write it as HTML fragments which get turned into the read
> pages. I have a number of scripts which will help.
Right. I believe there are ways of 'skinning' docbook conversion to
HTML, to make it look like we want. Some added benefits will be improved
navigation controls, etc.
>
>>
>> Let me know what you think. I'd like to get started ASAP, with figuring
>> out the outlines for the books we need to produce.
>>
>> I'm going to be going over the Wiki and Ben's web site, to see if I can
>> categorize the pages (or even sections) into the books they belong in.
>
> It would also be nice to have manual pages for the executables as well.
That's a good idea. A bit of googling tells me that you can create
man-pages from docbook as well, without any fuss.
>> Also, we need to figure out how the docs will fit in svn. Should they be
>> a seperate project in svn? Like http://bbdev.fluffy.co.uk/svn/boxdoc  ?
>
> I think it would be good to put it within the existing repository.
> This allows the documentation to be kept in sync with releases easily,
> and for the documentation to be included in the release tarballs.
OK.
>
> Once a format and arrangement has been chosen, we need to adjust the
> release scripts to include it, and depending on the format, run an
> appropriate pre-processor to make them readable.
>
> I suggest
>
>   [trunk|whatever]/documentation/boxbackup
>
> as a location for the documentation. This is to preserve the idea that
> multiple distributions can be built from the same source tree.
Sounds good. Do I need special privileges to check into svn?
Username/Password?
>> Lastly, I don't think there is a problem, but I at least wanted to ask
>> if it is OK to use the -dev list for any discussions relating to the
>> documentation. Most of the editing will be passed back and forth through
>> svn, so the list would be used for discussions. Let me know if we should
>> find a different forum for discussing the documentation.
>
> I would encourage the use of -dev, so that documentation is always
> linked to the development work. The two should not be isolated, in my
> opinion.
I agree. I just wanted to make sure, as the list is already pretty
high-volume.

Thanks,
Per

-- 
Per Reedtz Thomsen | Reedtz Consulting, LLC | F: 209 883 4119
V: 209 883 4102    |   pthomsen@reedtz.com  | C: 209 996 9561
GPG ID: 1209784F   |  Yahoo! Chat: pthomsen | AIM: pthomsen


From boxbackup-dev@fluffy.co.uk  Mon Feb 27 19:29:54 2006
From: boxbackup-dev@fluffy.co.uk (James O'Gorman)
Date: Mon, 27 Feb 2006 19:29:54 +0000
Subject: [Box Backup-dev] SVN repository
In-Reply-To: <1140901445.7736.6.camel@avenin.ebourne.me.uk>
References: <5C911A0D-906E-4445-8533-BBFFA8E6F821@fluffy.co.uk> <1140901445.7736.6.camel@avenin.ebourne.me.uk>
Message-ID: <44035332.2020906@netinertia.co.uk>

Martin Ebourne wrote:
> On Sat, 2006-02-25 at 17:56 +0000, Ben Summers wrote:
>> Sourceforge now offer SVN repositories.
>>
>>     http://sourceforge.net/docs/E09/
>>
>> Any advantages in moving?
> 
> None that I can see. I guess we could use their bug trackers and stuff,
> but they're really not the best.
> 
> You mentioned installing trac before, that would be really good. trac &
> svn are an excellent combination.

I'd second the use of trac. I started using it for my own internal 
projects and it's pretty useful. Setting milestones and submitting bug 
reports is very handy! Plus the quick access to diffs with the changes 
highlighted is certainly very useful. No more doing svn diff | vim -c 
"set ft=diff" - :-)

James

From boxbackup-dev@fluffy.co.uk  Mon Feb 27 19:40:18 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 27 Feb 2006 19:40:18 +0000 (GMT)
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <440241B2.9090305@invis.net>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com>
 <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk> <44023450.2090400@invis.net>
 <Pine.LNX.4.62.0602262308540.14767@top.qwarx.com> <440238C0.20302@invis.net>
 <Pine.LNX.4.62.0602262327110.14767@top.qwarx.com> <440241B2.9090305@invis.net>
Message-ID: <Pine.LNX.4.62.0602271916290.14767@top.qwarx.com>

Hi Charles,

On Mon, 27 Feb 2006, Charles Lecklider wrote:

>> I was considering using names instead of SIDs. If the specified user 
>> does not exist on the new machine, we can always report the problem to 
>> the user doing the restore, who presumably will know what a sensible 
>> mapping would be.
>
> They will? I was hoping the end user would be able to use the GUI to 
> restore their own files, but if it gripes about broken accounts that 
> would quickly be more trouble that it's worth.

That's a restore client user interface issue. There must be a lot of 
options of how to achieve this without interrupting the user too much, but 
still making them aware that the permissions were not restored completely, 
and they may still have some work to do. IMHO, it's not a good argument 
for not backing up the ACLs at all, or for not trying to restore them.

It seems to me that if the permissions restore correctly, the user has 
nothing to worry about; if they do not, then we can warn the user, and 
they have the choice to make a better mapping if provided with enough 
information by the restore client, or to ignore it if they don't feel like 
messing about with the permissions. If we don't even back them up, there's 
nothing we can do to help or warn the user at restore time.

Surely other backup software must deal with permissions? Any ideas about 
how they do it without bothering the user too much?

>> I also imagine that in many cases (admittedly not all), the old and new
>> machines would be members of the same domain, and thus it's likely that
>> most of the SIDs of files that we would consider restoring would be
>> domain SIDs rather than local ones, and still valid on the new machine.
>
> If they're part of the same domain then they are probably using roaming
> profiles too, in which case Box wouldn't be needed on the client; you
> just need to login to the new machine and everything gets copied back
> from the server.

They are not necessarily using roaming profiles, nor storing all their 
data on the server. You have to be pretty rich, or have minimal 
requirements, to be able to keep all your staff's data on the server, and 
there's no guarantee that the staff actually will. And if they do, then 
there's no need to run Box on the client, as you said. I'm more concerned 
about using Box to back up servers, and clients with important data on 
their disks (not in their profile).

>> Sorry, what is a null DACL? Is it a DACL with no EXPLICIT_ACCESS
>> entries? How does one avoid creating one?
>
> It's not that you have to avoid creating one, it's that Windows
> sometimes treats what you think is a valid DACL as a null DACL. It's
> almost always because you got the inheritance flags ever so slightly
> wrong, and it's a nasty surprise because you can't just set it again -
> you have to take ownership first.

Can we detect that automatically? And if so, how?

>> Thanks for reminding me of this. If the SID doesn't have a user name
>> mapping, could we not back up the SID, on the assumption that it may be
>> restored to the same machine, and in that case we would want to restore
>> the original SID, orphaned or not? If restored to a different machine,
>> it would seem to make sense to warn the user, as above, and let them
>> take appropriate action.
>
> I guess it depends on who your target user is.
>
> I want a normal user to be able to restore their own files without
> having to phone me. Messages about SIDs, while guaranteed to induce
> interesting questions ("who is this SID guy? there's noone here called
> Sid"), aren't in the slightest bit helpful to the end user.

Again, that's a client interface issue. We can simply report "You don't 
have permission to restore the original access controls on this file", or 
"The original owner of this file does not exist on this machine", as a 
warning in the restore log, and continue without disturbing the user too 
much.

If you don't want the users to call you, how about not leaving their 
precious pr0n wide open to the managing director after a restore? :-)

> Now, if you're expecting an Administrator to be doing the restoring, 
> fine, warn away. But, answer me this: if the admin is restoring the 
> files, why is he restoring the permissions? It'd be far simpler just to 
> set them again than to clean up the mess Box will make of the 
> inheritance.

Why is he restoring permissions, you ask? Well, I'm no Windows admin, in 
fact I hate the platform, but what I hate even more is the fact that so 
many trivial tasks require so much laborious interaction. If it's at all 
possible to restore the original permissions, or some semblance of them, 
then why not offer the admin the option to do so, and save him from the 
slavery of doing it all by hand?

And that's assuming that the permissions are obvious and could be restored 
by hand. Consider a shared directory where many people have created files, 
and some have restricted access to others for certain files in that 
directory. Without the ACLs having been backed up in the first place, how 
on earth would he know what the permissions ought to be?

> Most of the time the file is going to be restored in-place. That means
> that most of the time it will automatically get the right permissions.
> Why mess with them? If it isn't going to be put in the same place, who's
> to say those permissions make any kind of sense?

It would only get the right permissions IF the container still has them 
(i.e. the permissions being borked is not why he's restoring in the first 
place), AND there were no explicit entries or special inheritance flags on 
the file itself. I can see many possible cases where one or both of those 
assumptions is broken.

If restoring to a different place, the files were assigned particular 
permissions for a reason, and they should not be discarded lightly. Why 
should they not make sense in the new location?

> I know I keep going on about inheritance, but it really is a problem. If 
> you don't get the order of the ACL exactly correct you end up with 
> something that simply doesn't work properly. Worse, unless you create a 
> protected DACL on every single file you restore (and if some software 
> did that to me as an admin I'd put a bounty on the writer's head because 
> that's *really* anti-social), you have to take into account the ACEs 
> that are going to be inherited from the directory.

We can take inheritance into account. It's not rocket science, after all
Windows does it, and Microsoft's programmers aren't all that smart :-) 
It's a bit tricky, and requires careful programming as you pointed out, 
but it's not impossible. I think that what we'd have to do is back up ALL 
permissions, including inherited ones, on the location root directory, and 
only explicit iones and flags on the subdirectories and files within it.

Then at restore, we can work out what permissions should apply to the root 
folder we're restoring, by working back up the tree to the location root; 
make it so, with a full override DACL if necessary; and then apply the 
explicit entries and flags to the folders and files within, as normal. 
Wouldn't that work?

> Worse, if you're going to restore a whole directory, you have to take
> into account the order in which you restore things, because the
> inheritance kicks in as soon as you create the directory.

That's fine, we restore recursively, so we can apply the permissions to a 
folder after we've restored all of its contents. In the mean time, we can 
grant ourselves full access, and no access to anyone else, while restoring 
the contents.

> Also, restoring permissions forces us to have a service running with a 
> load of privileges. My view is that the risk of having that service 
> outweighs the rather dubious benefit of being able to restore ACLs. If 
> we don't restore ACLs then we can run with no privileges and impersonate 
> the client end of the pipe when we need to do any work - far safer.

I see what you mean, but most users are far less paranoid (no offence), 
and will happily run the restore client as themselves or as an 
administrator. If we can't restore the original file permissions when 
running as a normal user, we can at least warn them, so that they know 
what the original permissions were, and can apply appropriate permissions 
to the restored files if they care.

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 |


From boxbackup-dev@fluffy.co.uk  Mon Feb 27 22:46:37 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Mon, 27 Feb 2006 22:46:37 +0000 (GMT)
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com>
 <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602272239430.14767@top.qwarx.com>

Hi Ben,

On Sun, 26 Feb 2006, Ben Summers wrote:

>>  Does anyone have any suggestions as to how Windows ACLs, owner and group 
>>  should be stored by Box?
>
> Err... see BackupClientFileAttribute.cpp. Note how the first member of 
> attr_StreamFormat is AttributeType. I suggest you add ATTRIBUTETYPE_WINDOWS 
> and then create a attr_StreamFormat_Windows which contains whatever 
> information you need.

OK, thanks. I will need to write a number of arbitrary-sized objects in
the attribute, and I'm not comfortable with null-terminated strings like 
the symlink target in attr_StreamFormat. Ideally I'd like to use something 
like the Archive or Protocol interface to write arbitrary objects to a 
memory buffer, and then read out the whole memory buffer as an opaque 
block (and vice versa). However I can't see any combination of existing 
classes that would allow me to do that.

Creating a StreamableMemBlock, and then a MemBlockStream on top, would 
seem to work for reading out a data block into separate components, but 
not the reverse: MemBlockStream::Write always throws an exception, 
although the comments in the source seem to indicate that it was intended 
to have a write phase and a read phase.

Is there another way to achieve this? Is it functionality that was 
intended to be implemented at some point, but nobody got around to it yet? 
Should I try to implement it myself?

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 28 00:06:23 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 28 Feb 2006 00:06:23 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r532 - in box/chris/general: lib/common test/common
Message-ID: <20060228000623.B0B3295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-28 00:05:51 +0000 (Tue, 28 Feb 2006)
New Revision: 532

Added:
   box/chris/general/lib/common/MemBufferStream.cpp
   box/chris/general/lib/common/MemBufferStream.h
Modified:
   box/chris/general/test/common/testcommon.cpp
Log:
* test/common/testcommon.cpp
* lib/common/MemBufferStream.cpp
* lib/common/MemBufferStream.h
- Added a read/write memory buffer and test cases for it


Added: box/chris/general/lib/common/MemBufferStream.cpp
===================================================================
--- box/chris/general/lib/common/MemBufferStream.cpp	2006-02-27 00:21:57 UTC (rev 531)
+++ box/chris/general/lib/common/MemBufferStream.cpp	2006-02-28 00:05:51 UTC (rev 532)
@@ -0,0 +1,193 @@
+// --------------------------------------------------------------------------
+//
+// File
+//		Name:    MemBufferStream.cpp
+//		Purpose: Stream to and from an encapsulated memory block
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+
+#include "Box.h"
+#include "MemBufferStream.h"
+#include "CommonException.h"
+#include "Guards.h"
+
+#include "MemLeakFindOn.h"
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::MemBufferStream()
+//		Purpose: Constructor
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+MemBufferStream::MemBufferStream()
+: mReadPosition(0),
+  mWritePosition(0)
+{
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::MemBufferStream(const MemBufferStream &)
+//		Purpose: Copy constructor (exceptions)
+//		Created: 2003/07/31
+//
+// --------------------------------------------------------------------------
+MemBufferStream::MemBufferStream(const MemBufferStream &rToCopy)
+{
+	THROW_EXCEPTION(CommonException, NotSupported)
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::MemBufferStream(const StreamableMemBlock &)
+//		Purpose: Copy an existing StreamableMemBlock
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+MemBufferStream::MemBufferStream(const StreamableMemBlock &rSource)
+: mBuffer(rSource),
+  mReadPosition(0),
+  mWritePosition(rSource.GetSize())
+{
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::~MemBufferStream()
+//		Purpose: Destructor
+//		Created: 2003/07/31
+//
+// --------------------------------------------------------------------------
+MemBufferStream::~MemBufferStream()
+{
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::Close()
+//		Purpose: Close the stream
+//		Created: 2003/07/31
+//
+// --------------------------------------------------------------------------
+void MemBufferStream::Close()
+{
+	// Do nothing by default -- let the destructor clear everything up.
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::GetPosition()
+//		Purpose: Returns current position in stream 
+//			(just after the last byte read)
+//		Created: 2003/08/21
+//
+// --------------------------------------------------------------------------
+MemBufferStream::pos_type MemBufferStream::GetPosition() const
+{
+	return mReadPosition;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::WriteAllBuffered()
+//		Purpose: Ensures that any data which has been buffered is written to the stream
+//		Created: 2003/08/26
+//
+// --------------------------------------------------------------------------
+void MemBufferStream::WriteAllBuffered()
+{
+	// These aren't the buffers you're looking for.
+	// Nothing to see here, move along.
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::BytesLeftToRead()
+//		Purpose: Numbers of bytes left to read in the stream, or
+//				 MemBufferStream::SizeOfStreamUnknown if this isn't known.
+//		Created: 2003/08/26
+//
+// --------------------------------------------------------------------------
+MemBufferStream::pos_type MemBufferStream::BytesLeftToRead()
+{
+	return mWritePosition - mReadPosition;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::Read(void *pBuffer, int NBytes, 
+//			int Timeout)
+//		Purpose: Read some bytes from the buffer, up to the maximum
+//			number available to read.
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+int MemBufferStream::Read(void *pBuffer, int NBytes, int Timeout)
+{
+	if (NBytes > BytesLeftToRead())
+	{
+		NBytes = BytesLeftToRead();
+	}
+
+	uint8_t* source = (uint8_t *)( mBuffer.GetBuffer() );
+	memcpy(pBuffer, source + mReadPosition, NBytes);
+	mReadPosition += NBytes;
+
+	return NBytes;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::Write(const void *pBuffer, 
+//			int NBytes)
+//		Purpose: Write some bytes to the buffer, resizing it if
+//			necessary, increasing the number available to read.
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+void MemBufferStream::Write(const void *pBuffer, int NBytes)
+{
+	mBuffer.ResizeBlock(mWritePosition + NBytes);
+	uint8_t* dest = (uint8_t *)( mBuffer.GetBuffer() );
+	memcpy(dest + mWritePosition, pBuffer, NBytes);
+	mWritePosition += NBytes;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::StreamDataLeft()
+//		Purpose: Tell whether any bytes are still available to read.
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+bool MemBufferStream::StreamDataLeft()
+{
+	return BytesLeftToRead() > 0;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
+//		Name:    MemBufferStream::StreamClosed()
+//		Purpose: Tell whether the stream is closed (no effect)
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+bool MemBufferStream::StreamClosed()
+{
+	return false;
+}
+

Added: box/chris/general/lib/common/MemBufferStream.h
===================================================================
--- box/chris/general/lib/common/MemBufferStream.h	2006-02-27 00:21:57 UTC (rev 531)
+++ box/chris/general/lib/common/MemBufferStream.h	2006-02-28 00:05:51 UTC (rev 532)
@@ -0,0 +1,62 @@
+// --------------------------------------------------------------------------
+//
+// File
+//		Name:    MemBufferStream.h
+//		Purpose: Stream to and from an encapsulated memory block
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+
+#ifndef MEMBUFFERSTREAM__H
+#define MEMBUFFERSTREAM__H
+
+#include "IOStream.h"
+#include "StreamableMemBlock.h"
+
+// --------------------------------------------------------------------------
+//
+// Class
+//		Name:    MemBufferStream
+//		Purpose: Stream to and from an encapsulated memory block
+//		Created: 2006/02/27
+//
+// --------------------------------------------------------------------------
+class MemBufferStream : public IOStream
+{
+public:
+	MemBufferStream();
+	MemBufferStream(const StreamableMemBlock& rSource);
+
+private:
+	MemBufferStream(const MemBufferStream &rToCopy); // do not call
+
+public:
+	virtual ~MemBufferStream();
+	
+	// Timeout in milliseconds
+	// Read may return 0 -- does not mean end of stream.
+	typedef int64_t pos_type;
+	virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite);
+	virtual pos_type BytesLeftToRead();	// may return IOStream::SizeOfStreamUnknown (and will for most stream types)
+	virtual void Write(const void *pBuffer, int NBytes);
+	virtual void WriteAllBuffered();
+	virtual pos_type GetPosition() const;
+	virtual void Close();
+	
+	// Has all data that can be read been read?
+	virtual bool StreamDataLeft();
+	// Has the stream been closed (writing not possible)
+	virtual bool StreamClosed();
+	
+	const StreamableMemBlock& GetBuffer() { return mBuffer; }
+	
+private:
+	StreamableMemBlock mBuffer;
+	pos_type mReadPosition;
+	pos_type mWritePosition; // always equals buffer size
+};
+
+
+#endif // MEMBUFFERSTREAM__H
+
+

Modified: box/chris/general/test/common/testcommon.cpp
===================================================================
--- box/chris/general/test/common/testcommon.cpp	2006-02-27 00:21:57 UTC (rev 531)
+++ box/chris/general/test/common/testcommon.cpp	2006-02-28 00:05:51 UTC (rev 532)
@@ -24,6 +24,7 @@
 #include "CommonException.h"
 #include "Conversion.h"
 #include "autogen_ConversionException.h"
+#include "MemBufferStream.h"
 
 #include "MemLeakFindOn.h"
 
@@ -565,5 +566,55 @@
 
 	test_conversions();
 
+	{
+		StreamableMemBlock temp;
+
+		{
+			MemBufferStream buf;
+
+			TEST_THAT(buf.GetPosition() == 0);
+			TEST_THAT(buf.BytesLeftToRead() == 0);
+
+			buf.Write("hello ", 6);
+			TEST_THAT(buf.GetPosition() == 0);
+			TEST_THAT(buf.BytesLeftToRead() == 6);
+
+			buf.Write("world!", 7);
+			TEST_THAT(buf.GetPosition() == 0);
+			TEST_THAT(buf.BytesLeftToRead() == 13);
+
+			temp = buf.GetBuffer();
+			TEST_THAT(temp.GetSize() == 13);
+		}
+
+		{
+			MemBufferStream buf(temp);
+
+			TEST_THAT(buf.GetPosition() == 0);
+			TEST_THAT(buf.BytesLeftToRead() == 13);
+			TEST_THAT(buf.StreamDataLeft());
+
+			char target[13];
+			memset(target, 0, sizeof(target));
+
+			TEST_THAT(buf.Read(target, 6, 0) == 6);
+			TEST_THAT(strcmp(target, "hello ") == 0);
+			TEST_THAT(buf.GetPosition() == 6);
+			TEST_THAT(buf.BytesLeftToRead() == 7);
+			TEST_THAT(buf.StreamDataLeft());
+
+			TEST_THAT(buf.Read(target, 12, 0) == 7);
+			TEST_THAT(strcmp(target, "world!") == 0);
+			TEST_THAT(buf.GetPosition() == 13);
+			TEST_THAT(buf.BytesLeftToRead() == 0);
+			
+			TEST_THAT(buf.Read(target, 12, 0) == 0);
+			TEST_THAT(buf.GetPosition() == 13);
+			TEST_THAT(buf.BytesLeftToRead() == 0);
+			TEST_THAT(!buf.StreamDataLeft());
+			TEST_THAT(!buf.StreamClosed());
+		}
+	}
+
 	return 0;
 }


From boxbackup-dev@fluffy.co.uk  Tue Feb 28 09:12:15 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 28 Feb 2006 09:12:15 +0000
Subject: [Box Backup-dev] COMMIT r532 - in box/chris/general: lib/common test/common
In-Reply-To: <20060228000623.B0B3295@s0g0.pems.testserver.co.uk>
References: <20060228000623.B0B3295@s0g0.pems.testserver.co.uk>
Message-ID: <D7F8F323-5A22-4CB6-A626-7AA87B02D666@fluffy.co.uk>

On 28 Feb 2006, at 00:06, subversion@fluffy.co.uk wrote:

> Author: chris
> Date: 2006-02-28 00:05:51 +0000 (Tue, 28 Feb 2006)
> New Revision: 532
>
> Added:
>    box/chris/general/lib/common/MemBufferStream.cpp
>    box/chris/general/lib/common/MemBufferStream.h
> Modified:
>    box/chris/general/test/common/testcommon.cpp
> Log:
> * test/common/testcommon.cpp
> * lib/common/MemBufferStream.cpp
> * lib/common/MemBufferStream.h
> - Added a read/write memory buffer and test cases for it


You appear to have re-written CollectInBufferStream -- can I suggest  
you back out this change and use that instead? I think I should have  
covered almost all most of the basics in the libraries.

Ben







From boxbackup-dev@fluffy.co.uk  Tue Feb 28 09:15:51 2006
From: boxbackup-dev@fluffy.co.uk (Ben Summers)
Date: Tue, 28 Feb 2006 09:15:51 +0000
Subject: [Box Backup-dev] Windows ACLs
In-Reply-To: <Pine.LNX.4.62.0602272239430.14767@top.qwarx.com>
References: <Pine.LNX.4.62.0602262232340.14767@top.qwarx.com> <EFF3C0AA-06C6-4D38-A55A-A42D97A4260C@fluffy.co.uk> <Pine.LNX.4.62.0602272239430.14767@top.qwarx.com>
Message-ID: <B0B71CE9-D951-4724-8F5E-9D9746BFDB02@fluffy.co.uk>

On 27 Feb 2006, at 22:46, Chris Wilson wrote:

> Hi Ben,
>
> On Sun, 26 Feb 2006, Ben Summers wrote:
>
>>>  Does anyone have any suggestions as to how Windows ACLs, owner  
>>> and group  should be stored by Box?
>>
>> Err... see BackupClientFileAttribute.cpp. Note how the first  
>> member of attr_StreamFormat is AttributeType. I suggest you add  
>> ATTRIBUTETYPE_WINDOWS and then create a attr_StreamFormat_Windows  
>> which contains whatever information you need.
>
> OK, thanks. I will need to write a number of arbitrary-sized  
> objects in
> the attribute, and I'm not comfortable with null-terminated strings  
> like the symlink target in attr_StreamFormat. Ideally I'd like to  
> use something like the Archive or Protocol interface to write  
> arbitrary objects to a memory buffer, and then read out the whole  
> memory buffer as an opaque block (and vice versa). However I can't  
> see any combination of existing classes that would allow me to do  
> that.

CollectInBufferStream

>
> Creating a StreamableMemBlock, and then a MemBlockStream on top,  
> would seem to work for reading out a data block into separate  
> components, but not the reverse: MemBlockStream::Write always  
> throws an exception, although the comments in the source seem to  
> indicate that it was intended to have a write phase and a read phase.

Copy and paste error from CollectInBufferStream, I think. All those  
comment blocks take quite a bit of time to create. :-(

>
> Is there another way to achieve this? Is it functionality that was  
> intended to be implemented at some point, but nobody got around to  
> it yet? Should I try to implement it myself?

If you think there's something "obvious" missing, do check carefully.  
I've been using these libraries long enought to have caught most of  
the essentials.

   http://bbdev.fluffy.co.uk/svn/box/trunk/docs/common/

Although it looks like my names may not be the most obvious choices.

Ben




From boxbackup-dev@fluffy.co.uk  Tue Feb 28 10:51:02 2006
From: boxbackup-dev@fluffy.co.uk (Mark)
Date: Tue, 28 Feb 2006 11:51:02 +0100
Subject: [Box Backup-dev] Problems with command line parsing in bbackupctl
 when using the force-sync option [Chris version of Box Backup]
In-Reply-To: <Pine.LNX.4.62.0602252003100.14656@top.qwarx.com>
References: <43FF0A31.9010207@hostingbrothers.nl> <Pine.LNX.4.62.0602251400300.14656@top.qwarx.com> <Pine.LNX.4.62.0602252003100.14656@top.qwarx.com>
Message-ID: <44042B16.7080301@hostingbrothers.nl>

Hi Chris,

I checked out your version today, and compiled it without any errors. It
now works with the force-sync option!

I also like the fact that you made a message file, the eventlog now
looks better.

Mark

Chris Wilson wrote:
> Hi Mark,
>
> Thanks to Martin and Ben, I've added a working getopt to my tree. 
> Please could you check out the updated version, and let me know 
> whether or not it fixes the problem? Please use the original command 
> names, not the underscored versions.
>
> Cheers, Chris.



From boxbackup-dev@fluffy.co.uk  Tue Feb 28 20:38:39 2006
From: boxbackup-dev@fluffy.co.uk (Chris Wilson)
Date: Tue, 28 Feb 2006 20:38:39 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r532 - in box/chris/general: lib/common
 test/common
In-Reply-To: <D7F8F323-5A22-4CB6-A626-7AA87B02D666@fluffy.co.uk>
References: <20060228000623.B0B3295@s0g0.pems.testserver.co.uk>
 <D7F8F323-5A22-4CB6-A626-7AA87B02D666@fluffy.co.uk>
Message-ID: <Pine.LNX.4.62.0602282038060.14767@top.qwarx.com>

Hi Ben,

> You appear to have re-written CollectInBufferStream -- can I suggest you 
> back out this change and use that instead? I think I should have covered 
> almost all most of the basics in the libraries.

Sure, will do. I didn't know about CollectInBufferStream when I wrote it 
last night.

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 |


From boxbackup-dev@fluffy.co.uk  Tue Feb 28 20:59:58 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 28 Feb 2006 20:59:58 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r533 - in box/chris/general: lib/common test/common
Message-ID: <20060228205958.959F295@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-28 20:59:54 +0000 (Tue, 28 Feb 2006)
New Revision: 533

Removed:
   box/chris/general/lib/common/MemBufferStream.cpp
   box/chris/general/lib/common/MemBufferStream.h
Modified:
   box/chris/general/test/common/testcommon.cpp
Log:
* lib/common/MemBufferStream.cpp
* lib/common/MemBufferStream.h
* test/common/testcommon.cpp
- Removed MemBufferStream since it's done by CollectInBufferStream


Deleted: box/chris/general/lib/common/MemBufferStream.cpp
===================================================================
--- box/chris/general/lib/common/MemBufferStream.cpp	2006-02-28 00:05:51 UTC (rev 532)
+++ box/chris/general/lib/common/MemBufferStream.cpp	2006-02-28 20:59:54 UTC (rev 533)
@@ -1,193 +0,0 @@
-// --------------------------------------------------------------------------
-//
-// File
-//		Name:    MemBufferStream.cpp
-//		Purpose: Stream to and from an encapsulated memory block
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-
-#include "Box.h"
-#include "MemBufferStream.h"
-#include "CommonException.h"
-#include "Guards.h"
-
-#include "MemLeakFindOn.h"
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::MemBufferStream()
-//		Purpose: Constructor
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-MemBufferStream::MemBufferStream()
-: mReadPosition(0),
-  mWritePosition(0)
-{
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::MemBufferStream(const MemBufferStream &)
-//		Purpose: Copy constructor (exceptions)
-//		Created: 2003/07/31
-//
-// --------------------------------------------------------------------------
-MemBufferStream::MemBufferStream(const MemBufferStream &rToCopy)
-{
-	THROW_EXCEPTION(CommonException, NotSupported)
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::MemBufferStream(const StreamableMemBlock &)
-//		Purpose: Copy an existing StreamableMemBlock
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-MemBufferStream::MemBufferStream(const StreamableMemBlock &rSource)
-: mBuffer(rSource),
-  mReadPosition(0),
-  mWritePosition(rSource.GetSize())
-{
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::~MemBufferStream()
-//		Purpose: Destructor
-//		Created: 2003/07/31
-//
-// --------------------------------------------------------------------------
-MemBufferStream::~MemBufferStream()
-{
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::Close()
-//		Purpose: Close the stream
-//		Created: 2003/07/31
-//
-// --------------------------------------------------------------------------
-void MemBufferStream::Close()
-{
-	// Do nothing by default -- let the destructor clear everything up.
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::GetPosition()
-//		Purpose: Returns current position in stream 
-//			(just after the last byte read)
-//		Created: 2003/08/21
-//
-// --------------------------------------------------------------------------
-MemBufferStream::pos_type MemBufferStream::GetPosition() const
-{
-	return mReadPosition;
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::WriteAllBuffered()
-//		Purpose: Ensures that any data which has been buffered is written to the stream
-//		Created: 2003/08/26
-//
-// --------------------------------------------------------------------------
-void MemBufferStream::WriteAllBuffered()
-{
-	// These aren't the buffers you're looking for.
-	// Nothing to see here, move along.
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::BytesLeftToRead()
-//		Purpose: Numbers of bytes left to read in the stream, or
-//				 MemBufferStream::SizeOfStreamUnknown if this isn't known.
-//		Created: 2003/08/26
-//
-// --------------------------------------------------------------------------
-MemBufferStream::pos_type MemBufferStream::BytesLeftToRead()
-{
-	return mWritePosition - mReadPosition;
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::Read(void *pBuffer, int NBytes, 
-//			int Timeout)
-//		Purpose: Read some bytes from the buffer, up to the maximum
-//			number available to read.
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-int MemBufferStream::Read(void *pBuffer, int NBytes, int Timeout)
-{
-	if (NBytes > BytesLeftToRead())
-	{
-		NBytes = BytesLeftToRead();
-	}
-
-	uint8_t* source = (uint8_t *)( mBuffer.GetBuffer() );
-	memcpy(pBuffer, source + mReadPosition, NBytes);
-	mReadPosition += NBytes;
-
-	return NBytes;
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::Write(const void *pBuffer, 
-//			int NBytes)
-//		Purpose: Write some bytes to the buffer, resizing it if
-//			necessary, increasing the number available to read.
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-void MemBufferStream::Write(const void *pBuffer, int NBytes)
-{
-	mBuffer.ResizeBlock(mWritePosition + NBytes);
-	uint8_t* dest = (uint8_t *)( mBuffer.GetBuffer() );
-	memcpy(dest + mWritePosition, pBuffer, NBytes);
-	mWritePosition += NBytes;
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::StreamDataLeft()
-//		Purpose: Tell whether any bytes are still available to read.
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-bool MemBufferStream::StreamDataLeft()
-{
-	return BytesLeftToRead() > 0;
-}
-
-// --------------------------------------------------------------------------
-//
-// Function
-//		Name:    MemBufferStream::StreamClosed()
-//		Purpose: Tell whether the stream is closed (no effect)
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-bool MemBufferStream::StreamClosed()
-{
-	return false;
-}
-

Deleted: box/chris/general/lib/common/MemBufferStream.h
===================================================================
--- box/chris/general/lib/common/MemBufferStream.h	2006-02-28 00:05:51 UTC (rev 532)
+++ box/chris/general/lib/common/MemBufferStream.h	2006-02-28 20:59:54 UTC (rev 533)
@@ -1,62 +0,0 @@
-// --------------------------------------------------------------------------
-//
-// File
-//		Name:    MemBufferStream.h
-//		Purpose: Stream to and from an encapsulated memory block
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-
-#ifndef MEMBUFFERSTREAM__H
-#define MEMBUFFERSTREAM__H
-
-#include "IOStream.h"
-#include "StreamableMemBlock.h"
-
-// --------------------------------------------------------------------------
-//
-// Class
-//		Name:    MemBufferStream
-//		Purpose: Stream to and from an encapsulated memory block
-//		Created: 2006/02/27
-//
-// --------------------------------------------------------------------------
-class MemBufferStream : public IOStream
-{
-public:
-	MemBufferStream();
-	MemBufferStream(const StreamableMemBlock& rSource);
-
-private:
-	MemBufferStream(const MemBufferStream &rToCopy); // do not call
-
-public:
-	virtual ~MemBufferStream();
-	
-	// Timeout in milliseconds
-	// Read may return 0 -- does not mean end of stream.
-	typedef int64_t pos_type;
-	virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite);
-	virtual pos_type BytesLeftToRead();	// may return IOStream::SizeOfStreamUnknown (and will for most stream types)
-	virtual void Write(const void *pBuffer, int NBytes);
-	virtual void WriteAllBuffered();
-	virtual pos_type GetPosition() const;
-	virtual void Close();
-	
-	// Has all data that can be read been read?
-	virtual bool StreamDataLeft();
-	// Has the stream been closed (writing not possible)
-	virtual bool StreamClosed();
-	
-	const StreamableMemBlock& GetBuffer() { return mBuffer; }
-	
-private:
-	StreamableMemBlock mBuffer;
-	pos_type mReadPosition;
-	pos_type mWritePosition; // always equals buffer size
-};
-
-
-#endif // MEMBUFFERSTREAM__H
-
-

Modified: box/chris/general/test/common/testcommon.cpp
===================================================================
--- box/chris/general/test/common/testcommon.cpp	2006-02-28 00:05:51 UTC (rev 532)
+++ box/chris/general/test/common/testcommon.cpp	2006-02-28 20:59:54 UTC (rev 533)
@@ -24,7 +24,6 @@
 #include "CommonException.h"
 #include "Conversion.h"
 #include "autogen_ConversionException.h"
-#include "MemBufferStream.h"
 
 #include "MemLeakFindOn.h"
 
@@ -566,55 +565,5 @@
 
 	test_conversions();
 
-	{
-		StreamableMemBlock temp;
-
-		{
-			MemBufferStream buf;
-
-			TEST_THAT(buf.GetPosition() == 0);
-			TEST_THAT(buf.BytesLeftToRead() == 0);
-
-			buf.Write("hello ", 6);
-			TEST_THAT(buf.GetPosition() == 0);
-			TEST_THAT(buf.BytesLeftToRead() == 6);
-
-			buf.Write("world!", 7);
-			TEST_THAT(buf.GetPosition() == 0);
-			TEST_THAT(buf.BytesLeftToRead() == 13);
-
-			temp = buf.GetBuffer();
-			TEST_THAT(temp.GetSize() == 13);
-		}
-
-		{
-			MemBufferStream buf(temp);
-
-			TEST_THAT(buf.GetPosition() == 0);
-			TEST_THAT(buf.BytesLeftToRead() == 13);
-			TEST_THAT(buf.StreamDataLeft());
-
-			char target[13];
-			memset(target, 0, sizeof(target));
-
-			TEST_THAT(buf.Read(target, 6, 0) == 6);
-			TEST_THAT(strcmp(target, "hello ") == 0);
-			TEST_THAT(buf.GetPosition() == 6);
-			TEST_THAT(buf.BytesLeftToRead() == 7);
-			TEST_THAT(buf.StreamDataLeft());
-
-			TEST_THAT(buf.Read(target, 12, 0) == 7);
-			TEST_THAT(strcmp(target, "world!") == 0);
-			TEST_THAT(buf.GetPosition() == 13);
-			TEST_THAT(buf.BytesLeftToRead() == 0);
-			
-			TEST_THAT(buf.Read(target, 12, 0) == 0);
-			TEST_THAT(buf.GetPosition() == 13);
-			TEST_THAT(buf.BytesLeftToRead() == 0);
-			TEST_THAT(!buf.StreamDataLeft());
-			TEST_THAT(!buf.StreamClosed());
-		}
-	}
-
 	return 0;
 }


From boxbackup-dev@fluffy.co.uk  Tue Feb 28 21:01:28 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 28 Feb 2006 21:01:28 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r534 - box/chris/general/infrastructure
Message-ID: <20060228210128.CD72B95@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-28 21:01:21 +0000 (Tue, 28 Feb 2006)
New Revision: 534

Modified:
   box/chris/general/infrastructure/makebuildenv.pl
Log:
* makebuildenv.pl
- Always build Windows resources by adding them to the library 
  dependencies, even though placing them in the library has no effect. 
  Otherwise they would never be built.


Modified: box/chris/general/infrastructure/makebuildenv.pl
===================================================================
--- box/chris/general/infrastructure/makebuildenv.pl	2006-02-28 20:59:54 UTC (rev 533)
+++ box/chris/general/infrastructure/makebuildenv.pl	2006-02-28 21:01:21 UTC (rev 534)
@@ -583,7 +583,7 @@
 
 		# store for later
 		my $base = $1;
-		push @obj_base,$base unless $is_rc;
+		push @obj_base,$base;
 	
 		# get the file...
 		open FL,"$mod/$file";


From boxbackup-dev@fluffy.co.uk  Tue Feb 28 21:35:03 2006
From: boxbackup-dev@fluffy.co.uk (boxbackup-dev@fluffy.co.uk)
Date: Tue, 28 Feb 2006 21:35:03 +0000 (GMT)
Subject: [Box Backup-dev] COMMIT r535 - box/chris/general/test/common
Message-ID: <20060228213503.839A695@s0g0.pems.testserver.co.uk>

Author: chris
Date: 2006-02-28 21:35:00 +0000 (Tue, 28 Feb 2006)
New Revision: 535

Modified:
   box/chris/general/test/common/testcommon.cpp
Log:
* testcommon.cpp
- Test that Archive and CollectInBufferStream work the way that we expect


Modified: box/chris/general/test/common/testcommon.cpp
===================================================================
--- box/chris/general/test/common/testcommon.cpp	2006-02-28 21:01:21 UTC (rev 534)
+++ box/chris/general/test/common/testcommon.cpp	2006-02-28 21:35:00 UTC (rev 535)
@@ -24,6 +24,8 @@
 #include "CommonException.h"
 #include "Conversion.h"
 #include "autogen_ConversionException.h"
+#include "CollectInBufferStream.h"
+#include "Archive.h"
 
 #include "MemLeakFindOn.h"
 
@@ -565,5 +567,63 @@
 
 	test_conversions();
 
+	// test that we can use Archive and CollectInBufferStream
+	// to read and write arbitrary types to a memory buffer
+
+	{
+		CollectInBufferStream buffer;
+		ASSERT(buffer.GetPosition() == 0);
+
+		{
+			Archive archive(buffer, 0);
+			ASSERT(buffer.GetPosition() == 0);
+
+			archive.Write((bool) true);
+			archive.Write((bool) false);
+			archive.Write((int) 0x12345678);
+			archive.Write((int) 0x87654321);
+			archive.Write((int64_t)  0x0badfeedcafebabeLL);
+			archive.Write((uint64_t) 0xfeedfacedeadf00dLL);
+			archive.Write((uint8_t)  0x01);
+			archive.Write((uint8_t)  0xfe);
+			archive.Write(std::string("hello world!"));
+			archive.Write(std::string("goodbye cruel world!"));
+		}
+
+		CollectInBufferStream buf2;
+		buf2.Write(buffer.GetBuffer(), buffer.GetSize());
+		TEST_THAT(buf2.GetPosition() == buffer.GetSize());
+
+		buf2.SetForReading();
+		TEST_THAT(buf2.GetPosition() == 0);
+
+		{
+			Archive archive(buf2, 0);
+			TEST_THAT(buf2.GetPosition() == 0);
+
+			bool b;
+			archive.Read(b); TEST_THAT(b == true);
+			archive.Read(b); TEST_THAT(b == false);
+
+			int i;
+			archive.Read(i); TEST_THAT(i == 0x12345678);
+			archive.Read(i); TEST_THAT((unsigned int)i == 0x87654321);
+
+			uint64_t i64;
+			archive.Read(i64); TEST_THAT(i64 == 0x0badfeedcafebabeLL);
+			archive.Read(i64); TEST_THAT(i64 == 0xfeedfacedeadf00dLL);
+
+			uint8_t i8;
+			archive.Read(i8); TEST_THAT(i8 == 0x01);
+			archive.Read(i8); TEST_THAT(i8 == 0xfe);
+
+			std::string s;
+			archive.Read(s); TEST_THAT(s == "hello world!");
+			archive.Read(s); TEST_THAT(s == "goodbye cruel world!");
+
+			TEST_THAT(!buf2.StreamDataLeft());
+		}
+	}
+
 	return 0;
 }


