[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

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Mon Feb 13 13:30:30 GMT 2006


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=""$(ProjectDir)..\db-4.2.52.NC\build_win32";"$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\""
-				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=""$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\""
-				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=""$(SolutionDir)..\db-4.2.52.NC\build_win32";"$(SolutionDir)..\boost_1_31_0";"$(SolutionDir)..\openssl\include";"$(SolutionDir)..\zlib\include";"$(SolutionDir)lib\backupclient";"$(SolutionDir)lib\server";"$(SolutionDir)lib\crypto";"$(SolutionDir)lib\compress";"$(SolutionDir)lib\win32";"$(SolutionDir)lib\common\""
-				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=""$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\";"$(SolutionDir)..\boost_1_31_0""
-				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=""$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\";"$(SolutionDir)..\boost_1_31_0""
-				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=""$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\";"$(SolutionDir)..\boost_1_31_0""
-				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=""$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\";"$(SolutionDir)..\boost_1_31_0\""
-				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=""$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\";"$(SolutionDir)..\boost_1_31_0\""
-				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=""$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32";"$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
-				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=""$(SolutionDir)..\..\..\..\db-4.2.52.NC\build_win32";"$(SolutionDir)..\..\..\..\boost_1_31_0";"$(SolutionDir)..\..\..\..\openssl\include";"$(SolutionDir)..\..\..\..\zlib\include";"$(SolutionDir)..\..\..\lib\backupclient";"$(SolutionDir)..\..\..\lib\server";"$(SolutionDir)..\..\..\lib\crypto";"$(SolutionDir)..\..\..\lib\compress";"$(SolutionDir)..\..\..\lib\win32";"$(SolutionDir)..\..\..\lib\common\""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0\""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0\""
-				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=""$(ProjectDir)..\..\..\bin\bbackupd";"$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32";"$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
-				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=""$(ProjectDir)..\..\..\bin\bbackupd";"$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
-				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=""$(SolutionDir)..\..\..\lib\backupclient";"$(SolutionDir)..\..\..\lib\common";"$(SolutionDir)..\..\..\lib\compress";"$(SolutionDir)..\..\..\lib\crypto";"$(SolutionDir)..\..\..\lib\server";"$(SolutionDir)..\..\..\lib\win32";"$(SolutionDir)..\..\..\..\openssl\inc32";"$(SolutionDir)..\..\..\..\zlib\include""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0""
-				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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include";$(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=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0\""
-				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=""$(ProjectDir)..\..\..\bin\bbackupd";"$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include""
-				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=""$(ProjectDir)..\..\..\bin\bbackupd";"$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
-				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 @@
+ at 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=""$(ProjectDir)bin\bbackupd";"$(ProjectDir)..\db-4.2.52.NC\build_win32";"$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\""
-				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=""$(ProjectDir)bin\bbackupd";"$(ProjectDir)lib\backupclient";"$(ProjectDir)lib\server";"$(ProjectDir)lib\crypto";"$(ProjectDir)..\openssl\include";"$(ProjectDir)lib\compress";"$(ProjectDir)..\zlib\include";"$(ProjectDir)lib\win32";"$(ProjectDir)lib\common\""
-				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>




More information about the Boxbackup-dev mailing list