summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-12-10 22:10:47 +0000
committerChris Wilson <chris+github@qwirx.com>2015-12-10 22:10:47 +0000
commit0f6eedb4d9ce5cd4d97e127c601559d7524e7c8e (patch)
treec88ace4bbd3a92c24822d3fb35e8f555b0694288
parent6bb997504c21c34a5856ba9b7b0483b2516db6a9 (diff)
parentbc2a15eb3dab71425757ec2cb73f56b911c4e400 (diff)
Merge branch 'appveyor' of github.com:boxbackup/boxbackup into appveyor
-rw-r--r--.gitignore31
-rw-r--r--.travis.yml30
-rw-r--r--README.md21
-rw-r--r--appveyor.yml41
-rw-r--r--bin/bbackupd/BackupClientContext.cpp22
-rw-r--r--bin/bbackupd/BackupClientContext.h11
-rw-r--r--infrastructure/BoxPlatform.pm.in48
-rw-r--r--infrastructure/buildenv-testmain-template.cpp1
-rw-r--r--infrastructure/cmake/.gitignore6
-rw-r--r--infrastructure/cmake/CMakeLists.txt236
-rw-r--r--infrastructure/msvc/2013/bbackupctl.vcxproj117
-rw-r--r--infrastructure/msvc/2013/bbackupd.vcxproj147
-rw-r--r--infrastructure/msvc/2013/bbstoreaccounts.vcxproj98
-rw-r--r--infrastructure/msvc/2013/bbstored.vcxproj109
-rw-r--r--infrastructure/msvc/2013/boxbackup.sln89
-rw-r--r--infrastructure/msvc/2013/boxquery.vcxproj130
-rw-r--r--infrastructure/msvc/2013/common.vcxproj258
-rw-r--r--infrastructure/msvc/2013/libbackupclient.vcxproj108
-rw-r--r--infrastructure/msvc/2013/libbackupstore.vcxproj184
-rw-r--r--infrastructure/msvc/2013/qdbm.vcxproj90
-rw-r--r--infrastructure/msvc/2013/win32test.vcxproj115
-rw-r--r--infrastructure/msvc/getversion.pl3
-rw-r--r--infrastructure/msvc/win32.bat3
-rw-r--r--lib/backupstore/BackupClientFileAttributes.cpp68
-rw-r--r--lib/backupstore/BackupStoreContext.cpp4
-rw-r--r--lib/backupstore/BackupStoreDirectory.cpp11
-rw-r--r--lib/backupstore/BackupStoreDirectory.h5
-rw-r--r--lib/backupstore/BackupStoreFileEncodeStream.h8
-rw-r--r--lib/common/Archive.h59
-rw-r--r--lib/common/BoxConfig-MSVC.h3
-rw-r--r--lib/common/BoxPlatform.h52
-rwxr-xr-xlib/common/makeexception.pl.in67
-rw-r--r--lib/httpserver/HTTPRequest.cpp3
-rw-r--r--lib/intercept/intercept.cpp1
-rw-r--r--lib/server/Protocol.cpp12
-rw-r--r--lib/server/Protocol.h4
-rw-r--r--lib/server/ProtocolWire.h4
-rw-r--r--lib/win32/emu.h39
-rw-r--r--modules.txt16
-rw-r--r--test/backupstore/testbackupstore.cpp130
-rw-r--r--test/backupstorepatch/testbackupstorepatch.cpp8
-rw-r--r--test/basicserver/testbasicserver.cpp1
-rw-r--r--test/bbackupd/testbbackupd.cpp472
-rw-r--r--test/crypto/testcrypto.cpp1
-rw-r--r--test/raidfile/testraidfile.cpp1
45 files changed, 2178 insertions, 689 deletions
diff --git a/.gitignore b/.gitignore
index 82b83868..fd6def26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,42 +1,43 @@
-# built from .in files by autoconf
-infrastructure/BoxPlatform.pm
-contrib/mac_osx/org.boxbackup.bbackupd.plist
-contrib/mac_osx/org.boxbackup.bbstored.plist
-contrib/solaris/bbackupd-manifest.xml
-contrib/solaris/bbstored-manifest.xml
-lib/common/BoxPortsAndFiles.h
-test/bbackupd/testfiles/bbackupd.conf
-test/bbackupd/testfiles/bbackupd-exclude.conf
-test/bbackupd/testfiles/bbackupd-snapshot.conf
-test/bbackupd/testfiles/bbackupd-symlink.conf
-test/bbackupd/testfiles/bbackupd-temploc.conf
+# built from .in files by autoconf/CMake
bin/bbackupd/bbackupd-config
bin/bbackupquery/makedocumentation.pl
bin/bbstored/bbstored-certs
bin/bbstored/bbstored-config
contrib/debian/bbackupd
contrib/debian/bbstored
+contrib/mac_osx/org.boxbackup.bbackupd.plist
+contrib/mac_osx/org.boxbackup.bbstored.plist
contrib/redhat/bbackupd
contrib/redhat/bbstored
contrib/suse/bbackupd
contrib/suse/bbstored
+contrib/solaris/bbackupd-manifest.xml
contrib/solaris/bbackupd-smf-method
+contrib/solaris/bbstored-manifest.xml
contrib/solaris/bbstored-smf-method
contrib/windows/installer/boxbackup.mpi
+infrastructure/BoxPlatform.pm
infrastructure/makebuildenv.pl
-infrastructure/makeparcels.pl
infrastructure/makedistribution.pl
+infrastructure/makeparcels.pl
+lib/common/BoxConfig.h
+lib/common/BoxConfig.h.in
+lib/common/BoxPortsAndFiles.h
+lib/common/BoxVersion.h
lib/common/makeexception.pl
lib/raidfile/raidfile-config
lib/server/makeprotocol.pl
runtest.pl
test/backupstorefix/testfiles/testbackupstorefix.pl
+test/bbackupd/testfiles/bbackupd.conf
+test/bbackupd/testfiles/bbackupd-exclude.conf
+test/bbackupd/testfiles/bbackupd-snapshot.conf
+test/bbackupd/testfiles/bbackupd-symlink.conf
+test/bbackupd/testfiles/bbackupd-temploc.conf
test/bbackupd/testfiles/extcheck1.pl
test/bbackupd/testfiles/extcheck2.pl
test/bbackupd/testfiles/notifyscript.pl
test/bbackupd/testfiles/syncallowscript.pl
-lib/common/BoxConfig.h
-lib/common/BoxConfig.h.in
# from svn:ignore
aclocal.m4
diff --git a/.travis.yml b/.travis.yml
index 977cbba7..3f4e75ef 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,15 @@
language: cpp
-branches:
- only:
- - master
+
compiler:
- gcc
- clang
-cache: apt
+
+cache:
+ - apt
+ - ccache
+
sudo: false
+
addons:
apt:
packages:
@@ -17,12 +20,17 @@ addons:
- xsltproc
- zlib1g-dev
-before_script:
- - ./bootstrap
- - ./configure
- - make
+before_script:
+ - ccache -s
+ - ./bootstrap
+ - ./configure CC="ccache $CC" CXX="ccache $CXX"
+ - grep CXX config.status
+ - make
-script:
- - ./runtest.pl ALL debug
- - ./runtest.pl ALL release
+env:
+ - TEST_TARGET=debug
+ - TEST_TARGET=release
+script:
+ - ./runtest.pl ALL $TEST_TARGET
+ - ccache -s
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..51c9c477
--- /dev/null
+++ b/README.md
@@ -0,0 +1,21 @@
+# Box Backup
+
+![Travis CI](https://travis-ci.org/boxbackup/boxbackup.svg?branch=master)
+
+Box Backup is an open source, completely automatic, secure, encrypted on-line backup system.
+
+It has the following key features:
+
+* All backed up data is stored on the server in files on a filesystem - no tape, archive or other special devices are required.
+* The server is trusted only to make files available when they are required - all data is encrypted and can be decoded only by the original client. This makes it ideal for backing up over an untrusted network (such as the Internet), or where the server is in an uncontrolled environment.
+* A backup daemon runs on systems to be backed up, and copies encrypted data to the server when it notices changes - so backups are continuous and up-to-date (although traditional snapshot backups are possible too).
+* Only changes within files are sent to the server, just like rsync, minimising the bandwidth used between clients and server. This makes it particularly suitable for backing up between distant locations, or over the Internet.
+* It behaves like tape - old file versions and deleted files are available.
+* Old versions of files on the server are stored as changes from the current version, minimising the storage space required on the server. Files are the server are also compressed to minimise their size.
+* Choice of backup behaviour - it can be optimised for document or server backup.
+* It is designed to be easy and cheap to run a server. It has a portable implementation, and optional RAID implemented in userland for reliability without complex server setup or expensive hardware.
+
+Please see the [website](https://www.boxbackup.org) for more information, including installation instructions.
+
+Box Backup is distributed under a [mixed BSD/GPL license](https://github.com/boxbackup/boxbackup/blob/master/LICENSE.txt).
+
diff --git a/appveyor.yml b/appveyor.yml
index 4b44e09d..c2b5a515 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -18,9 +18,11 @@ configuration:
environment:
VisualStudioVersion: 10.0
+ Generator: Visual Studio 10
+ OPENSSL_VERSION: 1.0.2e
cache:
- - '%APPVEYOR_BUILD_FOLDER%\..\openssl-1.0.2d'
+ - '%APPVEYOR_BUILD_FOLDER%\..\openssl-%OPENSSL_VERSION%'
- '%APPVEYOR_BUILD_FOLDER%\..\openssl-%PLATFORM%'
- '%APPVEYOR_BUILD_FOLDER%\..\pcre-8.38'
- '%APPVEYOR_BUILD_FOLDER%\..\pcre-%PLATFORM%'
@@ -28,37 +30,42 @@ cache:
build:
parallel: true
- project: infrastructure/msvc/2010/boxbackup.sln
+ project: infrastructure/cmake/BoxBackup.sln
install:
- cinst strawberryperl
- cinst 7zip.commandline
+ - cinst cmake
+
- dir "C:\Program Files\Microsoft SDKs\Windows"
- dir "C:\Program Files\Microsoft SDKs\Windows\v7.1"
- dir "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin"
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86'
- - cd %APPVEYOR_BUILD_FOLDER%\..
- ps: "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'"
- - ps: Start-FileDownload 'https://www.openssl.org/source/openssl-1.0.2d.tar.gz'
- - 7za x openssl-1.0.2d.tar.gz
- - 7za x openssl-1.0.2d.tar
- - cd openssl-1.0.2d
+
+ - cd %APPVEYOR_BUILD_FOLDER%\..
+ - ps: Start-FileDownload 'http://zlib.net/zlib128.zip'
+ - 7za x zlib128.zip
+ - cd zlib-1.2.8
+ - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\zlib-%PLATFORM%" .
+ - msbuild INSTALL.vcxproj /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
+
+ - cd %APPVEYOR_BUILD_FOLDER%\..
+ - ps: Start-FileDownload "https://www.openssl.org/source/openssl-$($env:OPENSSL_VERSION).tar.gz"
+ - 7za x openssl-%OPENSSL_VERSION%.tar.gz
+ - 7za x openssl-%OPENSSL_VERSION%.tar
+ - cd openssl-%OPENSSL_VERSION%
- perl Configure debug-VC-WIN32 no-asm --prefix=%APPVEYOR_BUILD_FOLDER%\..\openssl-%PLATFORM%
- ms\do_ms
- nmake /s /f ms\nt.mak
- nmake /s /f ms\nt.mak install
+
- cd %APPVEYOR_BUILD_FOLDER%\..
- - ps: Start-FileDownload 'http://zlib.net/zlib128-dll.zip'
- - mkdir %APPVEYOR_BUILD_FOLDER%\..\zlib
- - cd %APPVEYOR_BUILD_FOLDER%\..\zlib
- - 7za x %APPVEYOR_BUILD_FOLDER%\..\zlib128-dll.zip
- - cd %APPVEYOR_BUILD_FOLDER%\..
- - cinst cmake
- ps: Start-FileDownload 'ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.zip'
- 7za x pcre-8.38.zip
- cd %APPVEYOR_BUILD_FOLDER%\..
- cd pcre-8.38
- - cmake . -G "Visual Studio 10" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="%APPVEYOR_BUILD_FOLDER%\..\pcre-%PLATFORM%"
+ - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\pcre-%PLATFORM%" .
- dir
- msbuild INSTALL.vcxproj /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cd %APPVEYOR_BUILD_FOLDER%\..
@@ -66,10 +73,12 @@ install:
- dir pcre-%PLATFORM%
- dir pcre-%PLATFORM%\bin
- dir pcre-%PLATFORM%\lib
+
- cd %APPVEYOR_BUILD_FOLDER%
- dir
- - cd infrastructure\msvc
- - win32.bat
+ - cd infrastructure\cmake
+ - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\pcre-%PLATFORM%" .
+ - dir
- cd %APPVEYOR_BUILD_FOLDER%
test_script:
diff --git a/bin/bbackupd/BackupClientContext.cpp b/bin/bbackupd/BackupClientContext.cpp
index 96f99806..4c0b01ce 100644
--- a/bin/bbackupd/BackupClientContext.cpp
+++ b/bin/bbackupd/BackupClientContext.cpp
@@ -247,6 +247,11 @@ BackupProtocolCallable &BackupClientContext::GetConnection()
return *mapConnection;
}
+BackupProtocolCallable* BackupClientContext::GetOpenConnection() const
+{
+ return mapConnection.get();
+}
+
// --------------------------------------------------------------------------
//
// Function
@@ -257,18 +262,19 @@ BackupProtocolCallable &BackupClientContext::GetConnection()
// --------------------------------------------------------------------------
void BackupClientContext::CloseAnyOpenConnection()
{
- if(mapConnection.get())
+ BackupProtocolCallable* pConnection(GetOpenConnection());
+ if(pConnection)
{
try
{
// Quit nicely
- mapConnection->QueryFinished();
+ pConnection->QueryFinished();
}
catch(...)
{
// Ignore errors here
}
-
+
// Delete it anyway.
mapConnection.reset();
}
@@ -299,9 +305,10 @@ void BackupClientContext::CloseAnyOpenConnection()
// --------------------------------------------------------------------------
int BackupClientContext::GetTimeout() const
{
- if(mapConnection.get())
+ BackupProtocolCallable* pConnection(GetOpenConnection());
+ if(pConnection)
{
- return mapConnection->GetTimeout();
+ return pConnection->GetTimeout();
}
return (15*60*1000);
@@ -543,7 +550,8 @@ void BackupClientContext::UnManageDiffProcess()
// --------------------------------------------------------------------------
void BackupClientContext::DoKeepAlive()
{
- if (!mapConnection.get())
+ BackupProtocolCallable* pConnection(GetOpenConnection());
+ if (!pConnection)
{
return;
}
@@ -559,7 +567,7 @@ void BackupClientContext::DoKeepAlive()
}
BOX_TRACE("KeepAliveTime reached, sending keep-alive message");
- mapConnection->QueryGetIsAlive();
+ pConnection->QueryGetIsAlive();
mKeepAliveTimer.Reset(mKeepAliveTime * MILLI_SEC_IN_SEC);
}
diff --git a/bin/bbackupd/BackupClientContext.h b/bin/bbackupd/BackupClientContext.h
index 04af1645..df43a232 100644
--- a/bin/bbackupd/BackupClientContext.h
+++ b/bin/bbackupd/BackupClientContext.h
@@ -54,11 +54,16 @@ public:
bool TcpNiceMode
);
virtual ~BackupClientContext();
+
private:
BackupClientContext(const BackupClientContext &);
-public:
- virtual BackupProtocolCallable &GetConnection();
+public:
+ // GetConnection() will open a connection if none is currently open.
+ virtual BackupProtocolCallable& GetConnection();
+ // GetOpenConnection() will not open a connection, just return NULL if there is
+ // no connection already open.
+ virtual BackupProtocolCallable* GetOpenConnection() const;
void CloseAnyOpenConnection();
int GetTimeout() const;
BackupClientDeleteList &GetDeleteList();
@@ -167,7 +172,7 @@ public:
// Created: 04/19/2005
//
// --------------------------------------------------------------------------
- void SetKeepAliveTime(int iSeconds);
+ virtual void SetKeepAliveTime(int iSeconds);
// --------------------------------------------------------------------------
//
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in
index 78675325..e6a335f8 100644
--- a/infrastructure/BoxPlatform.pm.in
+++ b/infrastructure/BoxPlatform.pm.in
@@ -17,19 +17,21 @@ BEGIN
if ($^O eq "MSWin32" and not -x "/usr/bin/uname")
{
$build_os = "winnt";
+ eval "use Win32";
+ $build_os_ver = Win32::GetOSName();
}
else
{
$build_os = `uname`;
+ $build_os_ver = `uname -r`;
chomp $build_os;
+ chomp $build_os_ver;
}
# Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1
# Box Backup tried on Win2000,XP only :)
$build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
$build_os = 'MINGW32' if $build_os =~ m/MINGW32/;
- $build_os_ver = `uname -r`;
- chomp $build_os_ver;
if ($build_os eq 'Darwin') {
$xcode_ver = `xcodebuild -version | awk '/^Xcode/ {print \$2}'`
@@ -81,44 +83,10 @@ BEGIN
if($product_version =~ /USE_SVN_VERSION/)
{
- # for developers, use SVN version
- my $svnversion = 'unknown';
- my $svnurl = 'unknown';
-
- if(-d '.svn')
- {
- my $svnversion = `svnversion .`;
- chomp $svnversion;
- $svnversion =~ tr/0-9A-Za-z/_/c;
- open INFO,'svn info . |';
- while(<INFO>)
- {
- if(m/^URL: (.+?)[\n\r]+/)
- {
- $svnurl = $1
- }
- }
- close INFO;
- }
- elsif(-d '.git')
- {
- $svnversion = `git svn info | grep '^Revision:' | cut -d' ' -f2`;
- chomp $svnversion;
- $svnurl = `git svn info --url`;
- }
-
- my $svndir;
- if ($svnurl =~ m!/box/(.+)$!)
- {
- $svndir = $1;
- }
- elsif ($svnurl =~ m'/(boxi/.+)/boxi/boxbackup')
- {
- $svndir = $1;
- }
-
- $svndir =~ tr/0-9A-Za-z/_/c;
- $product_version =~ s/USE_SVN_VERSION/$svndir.'_'.$svnversion/e;
+ # for developers, use Git version (SVN is no more):
+ my $gitversion = `git rev-parse HEAD`;
+ chomp $gitversion;
+ $product_version =~ s/USE_SVN_VERSION/git_$gitversion/;
}
# where to put the files
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp
index 6855e990..81b82b1e 100644
--- a/infrastructure/buildenv-testmain-template.cpp
+++ b/infrastructure/buildenv-testmain-template.cpp
@@ -23,7 +23,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
-#include <unistd.h>
#ifdef HAVE_NETDB_H
# include <netdb.h>
diff --git a/infrastructure/cmake/.gitignore b/infrastructure/cmake/.gitignore
new file mode 100644
index 00000000..b27d6b9f
--- /dev/null
+++ b/infrastructure/cmake/.gitignore
@@ -0,0 +1,6 @@
+*.vcxproj
+*.vcxproj.filters
+BoxBackup.sln
+CMakeCache.txt
+CMakeFiles
+cmake_install.cmake
diff --git a/infrastructure/cmake/CMakeLists.txt b/infrastructure/cmake/CMakeLists.txt
new file mode 100644
index 00000000..54164cfa
--- /dev/null
+++ b/infrastructure/cmake/CMakeLists.txt
@@ -0,0 +1,236 @@
+cmake_minimum_required(VERSION 2.6)
+project(BoxBackup)
+
+set(base_dir ${CMAKE_SOURCE_DIR}/../..)
+
+set(files_to_configure
+ infrastructure/BoxPlatform.pm
+ contrib/mac_osx/org.boxbackup.bbackupd.plist
+ contrib/mac_osx/org.boxbackup.bbstored.plist
+ contrib/solaris/bbackupd-manifest.xml
+ contrib/solaris/bbstored-manifest.xml
+ lib/common/BoxPortsAndFiles.h
+ test/bbackupd/testfiles/bbackupd.conf
+ test/bbackupd/testfiles/bbackupd-exclude.conf
+ test/bbackupd/testfiles/bbackupd-snapshot.conf
+ test/bbackupd/testfiles/bbackupd-symlink.conf
+ test/bbackupd/testfiles/bbackupd-temploc.conf
+ bin/bbackupd/bbackupd-config
+ bin/bbackupquery/makedocumentation.pl
+ bin/bbstored/bbstored-certs
+ bin/bbstored/bbstored-config
+ contrib/debian/bbackupd
+ contrib/debian/bbstored
+ contrib/redhat/bbackupd
+ contrib/redhat/bbstored
+ contrib/suse/bbackupd
+ contrib/suse/bbstored
+ contrib/solaris/bbackupd-smf-method
+ contrib/solaris/bbstored-smf-method
+ contrib/windows/installer/boxbackup.mpi
+ infrastructure/makebuildenv.pl
+ infrastructure/makeparcels.pl
+ infrastructure/makedistribution.pl
+ lib/common/makeexception.pl
+ lib/raidfile/raidfile-config
+ lib/server/makeprotocol.pl
+ runtest.pl
+ test/backupstorefix/testfiles/testbackupstorefix.pl
+ test/bbackupd/testfiles/extcheck1.pl
+ test/bbackupd/testfiles/extcheck2.pl
+ test/bbackupd/testfiles/notifyscript.pl
+ test/bbackupd/testfiles/syncallowscript.pl
+)
+
+foreach(file_to_configure ${files_to_configure})
+ configure_file("${base_dir}/${file_to_configure}.in" "${base_dir}/${file_to_configure}" @ONLY)
+endforeach()
+
+file(READ "${base_dir}/infrastructure/buildenv-testmain-template.cpp" test_template)
+
+include(FindPerl)
+
+execute_process(
+ COMMAND ${PERL_EXECUTABLE} ${base_dir}/infrastructure/msvc/getversion.pl
+ RESULT_VARIABLE status
+ OUTPUT_VARIABLE command_output
+ ERROR_VARIABLE command_output)
+if(NOT status EQUAL 0)
+ message(FATAL_ERROR "Failed to execute: "
+ "${PERL_EXECUTABLE} ${base_dir}/infrastructure/msvc/getversion.pl: "
+ "status ${status}: ${command_output}")
+endif()
+
+# Parsing Makefile.extra files in CMake script is a pain, so the relevant rules are
+# hard-coded here.
+set(exception_files
+ lib/backupclient/ClientException.txt
+ lib/backupstore/BackupStoreException.txt
+ lib/common/CommonException.txt
+ lib/common/ConversionException.txt
+ lib/compress/CompressException.txt
+ lib/crypto/CipherException.txt
+ lib/httpserver/HTTPException.txt
+ lib/raidfile/RaidFileException.txt
+ lib/server/ServerException.txt
+ lib/server/ConnectionException.txt
+)
+
+foreach(exception_file ${exception_files})
+ string(REGEX MATCH "(.*)/(.*).txt" valid_exception_file ${exception_file})
+ if(NOT valid_exception_file)
+ message(FATAL_ERROR "invalid exception file: '${exception_file}'")
+ endif()
+
+ set(output_file "${base_dir}/${CMAKE_MATCH_1}/autogen_${CMAKE_MATCH_2}.cpp")
+ add_custom_command(OUTPUT "${output_file}"
+ MAIN_DEPENDENCY "${base_dir}/${exception_file}"
+ COMMAND ${PERL_EXECUTABLE} "${base_dir}/lib/common/makeexception.pl" "${CMAKE_MATCH_2}.txt"
+ WORKING_DIRECTORY "${base_dir}/${CMAKE_MATCH_1}")
+
+ string(REPLACE "/" "_" module_name ${CMAKE_MATCH_1})
+ set(${module_name}_extra_files ${${module_name}_extra_files} ${output_file})
+endforeach()
+
+set(protocol_files
+ lib/backupstore/backupprotocol.txt
+ test/basicserver/testprotocol.txt
+)
+
+foreach(protocol_file ${protocol_files})
+ string(REGEX MATCH "(.*)/(.*).txt" valid_protocol_file ${protocol_file})
+ if(NOT valid_protocol_file)
+ message(FATAL_ERROR "invalid protocol file: '${protocol_file}'")
+ endif()
+
+ set(output_file "${base_dir}/${CMAKE_MATCH_1}/autogen_${CMAKE_MATCH_2}.cpp")
+ add_custom_command(OUTPUT "${output_file}"
+ MAIN_DEPENDENCY "${base_dir}/${protocol_file}"
+ COMMAND ${PERL_EXECUTABLE} "${base_dir}/lib/server/makeprotocol.pl" "${CMAKE_MATCH_2}.txt"
+ WORKING_DIRECTORY "${base_dir}/${CMAKE_MATCH_1}")
+
+ string(REPLACE "/" "_" module_name ${CMAKE_MATCH_1})
+ set(${module_name}_extra_files ${${module_name}_extra_files} ${output_file})
+endforeach()
+
+set(output_file "${base_dir}/${CMAKE_MATCH_1}/autogen_${CMAKE_MATCH_2}.cpp")
+add_custom_command(OUTPUT "${output_file}"
+ MAIN_DEPENDENCY "${base_dir}/bin/bbackupquery/documentation.txt"
+ COMMAND ${PERL_EXECUTABLE} "${base_dir}/bin/bbackupquery/makedocumentation.pl"
+ WORKING_DIRECTORY "${base_dir}/bin/bbackupquery")
+set(bin_bbackupquery_extra_files ${bin_bbackupquery_extra_files} ${output_file})
+
+file(STRINGS ${base_dir}/modules.txt module_deps REGEX "^[^#]")
+# qdbm, lib/common and lib/win32 aren't listed in modules.txt, so hard-code them.
+foreach(module_dep
+ "qdbm"
+ "lib/win32"
+ "lib/common qdbm lib/win32"
+ ${module_deps})
+
+ string(REGEX MATCH "([^ ]+)[ ]*(.*)" valid_module_line ${module_dep})
+ if(valid_module_line)
+ if(DEBUG)
+ message(STATUS "found module: ${CMAKE_MATCH_1} -> ${CMAKE_MATCH_2}")
+ endif()
+
+ set(module_dir ${CMAKE_MATCH_1})
+ set(module_path ${base_dir}/${module_dir})
+ string(REPLACE "/" "_" module_name ${CMAKE_MATCH_1})
+ string(REPLACE "/" "_" dependencies "${CMAKE_MATCH_2}")
+ file(GLOB module_files ${module_path}/*.c ${module_path}/*.cpp)
+ set(module_files ${module_files} ${${module_name}_extra_files})
+
+ # everything except qdbm, lib/common and lib/win32 implicitly depend on
+ # lib/common, so express that dependency here.
+ if(module_name MATCHES "^(qdbm|lib_(common|win32))$")
+ else()
+ set(dependencies "${dependencies} lib_common")
+ endif()
+ string(REGEX REPLACE "^ " "" dependencies "${dependencies}")
+ string(REGEX REPLACE " $" "" dependencies "${dependencies}")
+
+ if(module_name MATCHES "^bin_")
+ if(DEBUG)
+ message(STATUS "add executable '${module_name}': '${module_files}'")
+ endif()
+ add_executable(${module_name} ${module_files})
+ elseif(module_name MATCHES "^test_")
+ string(REGEX MATCH "^test_(.*)" valid_test ${module_name})
+ set(test_name ${CMAKE_MATCH_1})
+
+ if(DEBUG)
+ message(STATUS "add test '${module_name}': '${module_files}'")
+ endif()
+
+ string(REPLACE "TEST_NAME" ${test_name} test_main "${test_template}")
+ file(WRITE "${module_path}/_main.cpp" "${test_main}")
+ add_executable(${module_name} ${module_files}
+ "${module_path}/_main.cpp")
+ elseif(module_name MATCHES "^(lib_.*|qdbm)$")
+ if(DEBUG)
+ message(STATUS "add library '${module_name}': '${module_files}'")
+ endif()
+ add_library(${module_name} STATIC ${module_files})
+ else()
+ message(FATAL_ERROR "Unsupported module type: " ${module_name})
+ endif()
+
+ target_compile_definitions(${module_name} PRIVATE -DBOX_MODULE="${module_dir}")
+
+ if(dependencies MATCHES ".")
+ string(REGEX REPLACE "[ ]+" ";" dependency_list "${dependencies}")
+
+ foreach(dependency ${dependency_list})
+ if(DEBUG)
+ message(STATUS "add dependency to '${module_name}': '${dependency}'")
+ endif()
+ # add_dependencies(${module_name} ${dependency})
+ if(dependency MATCHES "^(lib_.*|qdbm)$")
+ # message(STATUS "add link library to '${module_name}': '${dependency}'")
+ target_link_libraries(${module_name} PUBLIC ${dependency})
+ endif()
+ endforeach()
+ endif()
+
+ target_include_directories(${module_name} PUBLIC ${module_path})
+ endif()
+endforeach()
+
+#include(ExternalProject)
+#ExternalProject_Add(pcre
+# PREFIX "../pcre"
+# BUILD_COMMAND "${CMAKE_EXECUTABLE
+
+# Tell QDBM not to build itself as a DLL, because we want to link statically to it.
+target_compile_definitions(qdbm PUBLIC -DQDBM_STATIC)
+
+# Silence some less-useful warnings
+if(MSVC)
+ add_definitions(/wd4996 /wd4291)
+ # target_link_libraries(qdbm PRIVATE /IGNORE:LNK4006)
+ set_property(TARGET qdbm PROPERTY CMAKE_STATIC_LINKER_FLAGS /IGNORE:LNK4006)
+endif(MSVC)
+
+target_link_libraries(lib_common PUBLIC ws2_32 gdi32)
+
+# Link to ZLib
+include_directories(${base_dir}/../zlib-win32/include)
+find_library(zlibstaticd_lib_path zlibstaticd ${base_dir}/../zlib-win32/lib)
+target_link_libraries(lib_compress PUBLIC ${zlibstaticd_lib_path})
+
+# Link to OpenSSL
+include_directories(${base_dir}/../openssl-win32/include)
+find_library(libeay32_lib_path libeay32 ${base_dir}/../openssl-win32/lib)
+find_library(ssleay32_lib_path ssleay32 ${base_dir}/../openssl-win32/lib)
+target_link_libraries(lib_crypto PUBLIC ${libeay32_lib_path} ${ssleay32_lib_path})
+
+# Link to PCRE
+include_directories(${base_dir}/../pcre-win32/include)
+target_compile_definitions(lib_common PUBLIC -DPCRE_STATIC)
+find_library(pcreposixd_lib_path pcreposixd ${base_dir}/../pcre-win32/lib)
+find_library(pcred_lib_path pcred ${base_dir}/../pcre-win32/lib)
+target_link_libraries(lib_common PUBLIC "${pcreposixd_lib_path}" "${pcred_lib_path}")
+
+# Define the location of the Perl executable, needed by testbackupstorefix
+target_compile_definitions(test_backupstorefix PRIVATE -DPERL_EXECUTABLE="${PERL_EXECUTABLE}")
diff --git a/infrastructure/msvc/2013/bbackupctl.vcxproj b/infrastructure/msvc/2013/bbackupctl.vcxproj
new file mode 100644
index 00000000..5f021c26
--- /dev/null
+++ b/infrastructure/msvc/2013/bbackupctl.vcxproj
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9FD51412-E945-4457-A17A-CA3C505CF431}</ProjectGuid>
+ <RootNamespace>bbackupctl</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\backupstore;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\bin\bbackupd;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalDependencies>$(OutDir)\libbackupclient.lib;$(OutDir)\libbackupstore.lib;VssApi.lib;Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\backupstore;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\bin\bbackupd;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(OutDir)\libbackupclient.lib;$(OutDir)\libbackupstore.lib;VssApi.lib;Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)bbackupctl.exe</OutputFile>
+ <IgnoreSpecificDefaultLibraries>
+ </IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbackupctl\bbackupctl.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\..\lib\win32\messages.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="libbackupclient.vcxproj">
+ <Project>{32604097-c934-4711-b1ad-206336640e70}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/bbackupd.vcxproj b/infrastructure/msvc/2013/bbackupd.vcxproj
new file mode 100644
index 00000000..791e4813
--- /dev/null
+++ b/infrastructure/msvc/2013/bbackupd.vcxproj
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{22D325FB-9131-4BD6-B390-968F0491D687}</ProjectGuid>
+ <RootNamespace>bbackupd</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\lib\httpserver;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ENABLE_VSS;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(OutDir)\libbackupclient.lib;$(OutDir)\libbackupstore.lib;VssApi.lib;Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\lib\httpserver;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(OutDir)\libbackupclient.lib;$(OutDir)\libbackupstore.lib;VssApi.lib;Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)bbackupd.exe</OutputFile>
+ <IgnoreSpecificDefaultLibraries>
+ </IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>
+ </OptimizeReferences>
+ <EnableCOMDATFolding>
+ </EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupClientContext.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupClientDeleteList.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\BackupDaemon.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\bbackupd.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\Win32BackupService.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupd\Win32ServiceFunctions.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\..\lib\win32\messages.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <Private>true</Private>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ <ProjectReference Include="qdbm.vcxproj">
+ <Project>{72af22a7-b339-4fdf-b6ae-ca6522d4bb8d}</Project>
+ <Private>true</Private>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupClientContext.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupClientDeleteList.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupDaemon.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\BackupDaemonInterface.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\Win32BackupService.h" />
+ <ClInclude Include="..\..\..\bin\bbackupd\Win32ServiceFunctions.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/bbstoreaccounts.vcxproj b/infrastructure/msvc/2013/bbstoreaccounts.vcxproj
new file mode 100644
index 00000000..d5a37d63
--- /dev/null
+++ b/infrastructure/msvc/2013/bbstoreaccounts.vcxproj
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C8A1509C-F91B-4140-BD51-B87FF24FB95F}</ProjectGuid>
+ <RootNamespace>bbstoreaccounts</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\lib\httpserver;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>$(OutDir)\libbackupstore.lib;Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\lib\httpserver;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>$(OutDir)\libbackupstore.lib;Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib</AdditionalDependencies>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbstoreaccounts\bbstoreaccounts.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ </ProjectReference>
+ <ProjectReference Include="libbackupstore.vcxproj">
+ <Project>{97d89aef-2be4-4e34-8703-03ba67bf4494}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/bbstored.vcxproj b/infrastructure/msvc/2013/bbstored.vcxproj
new file mode 100644
index 00000000..f703ab94
--- /dev/null
+++ b/infrastructure/msvc/2013/bbstored.vcxproj
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D8404314-73DD-4270-8205-BE677F8FDAC7}</ProjectGuid>
+ <RootNamespace>bbstored</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\httpserver;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4521;4996</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>$(OutDir)\libbackupstore.lib;Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;BOX_RELEASE_BUILD;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\httpserver;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <DisableSpecificWarnings>4521;4996</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>$(OutDir)\libbackupstore.lib;$(OutDir)\qdbm.lib;Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib</AdditionalDependencies>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ </ProjectReference>
+ <ProjectReference Include="libbackupstore.vcxproj">
+ <Project>{97d89aef-2be4-4e34-8703-03ba67bf4494}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbstored\BackupStoreDaemon.cpp" />
+ <ClCompile Include="..\..\..\bin\bbstored\bbstored.cpp" />
+ <ClCompile Include="..\..\..\bin\bbstored\BBStoreDHousekeeping.cpp" />
+ <ClCompile Include="..\..\..\qdbm\depot.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\bin\bbstored\bbstored-certs.in" />
+ <None Include="..\..\..\bin\bbstored\bbstored-config.in" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\bin\bbstored\BackupStoreDaemon.h" />
+ <ClInclude Include="..\..\..\qdbm\depot.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/boxbackup.sln b/infrastructure/msvc/2013/boxbackup.sln
new file mode 100644
index 00000000..dbd14aae
--- /dev/null
+++ b/infrastructure/msvc/2013/boxbackup.sln
@@ -0,0 +1,89 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupquery", "boxquery.vcxproj", "{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32604097-C934-4711-B1AD-206336640E70} = {32604097-C934-4711-B1AD-206336640E70}
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494} = {97D89AEF-2BE4-4E34-8703-03BA67BF4494}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcxproj", "{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
+ ProjectSection(ProjectDependencies) = postProject
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D} = {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupd", "bbackupd.vcxproj", "{22D325FB-9131-4BD6-B390-968F0491D687}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32604097-C934-4711-B1AD-206336640E70} = {32604097-C934-4711-B1AD-206336640E70}
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D} = {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494} = {97D89AEF-2BE4-4E34-8703-03BA67BF4494}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32test", "win32test.vcxproj", "{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupctl", "bbackupctl.vcxproj", "{9FD51412-E945-4457-A17A-CA3C505CF431}"
+ ProjectSection(ProjectDependencies) = postProject
+ {32604097-C934-4711-B1AD-206336640E70} = {32604097-C934-4711-B1AD-206336640E70}
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494} = {97D89AEF-2BE4-4E34-8703-03BA67BF4494}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qdbm", "qdbm.vcxproj", "{72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbstored", "bbstored.vcxproj", "{D8404314-73DD-4270-8205-BE677F8FDAC7}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbackupstore", "libbackupstore.vcxproj", "{97D89AEF-2BE4-4E34-8703-03BA67BF4494}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbstoreaccounts", "bbstoreaccounts.vcxproj", "{C8A1509C-F91B-4140-BD51-B87FF24FB95F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbackupclient", "libbackupclient.vcxproj", "{32604097-C934-4711-B1AD-206336640E70}"
+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
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}.Debug|Win32.Build.0 = Debug|Win32
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}.Release|Win32.ActiveCfg = Release|Win32
+ {72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}.Release|Win32.Build.0 = Release|Win32
+ {D8404314-73DD-4270-8205-BE677F8FDAC7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D8404314-73DD-4270-8205-BE677F8FDAC7}.Debug|Win32.Build.0 = Debug|Win32
+ {D8404314-73DD-4270-8205-BE677F8FDAC7}.Release|Win32.ActiveCfg = Release|Win32
+ {D8404314-73DD-4270-8205-BE677F8FDAC7}.Release|Win32.Build.0 = Release|Win32
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494}.Debug|Win32.ActiveCfg = Debug|Win32
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494}.Debug|Win32.Build.0 = Debug|Win32
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494}.Release|Win32.ActiveCfg = Release|Win32
+ {97D89AEF-2BE4-4E34-8703-03BA67BF4494}.Release|Win32.Build.0 = Release|Win32
+ {C8A1509C-F91B-4140-BD51-B87FF24FB95F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C8A1509C-F91B-4140-BD51-B87FF24FB95F}.Debug|Win32.Build.0 = Debug|Win32
+ {C8A1509C-F91B-4140-BD51-B87FF24FB95F}.Release|Win32.ActiveCfg = Release|Win32
+ {C8A1509C-F91B-4140-BD51-B87FF24FB95F}.Release|Win32.Build.0 = Release|Win32
+ {32604097-C934-4711-B1AD-206336640E70}.Debug|Win32.ActiveCfg = Debug|Win32
+ {32604097-C934-4711-B1AD-206336640E70}.Debug|Win32.Build.0 = Debug|Win32
+ {32604097-C934-4711-B1AD-206336640E70}.Release|Win32.ActiveCfg = Release|Win32
+ {32604097-C934-4711-B1AD-206336640E70}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/infrastructure/msvc/2013/boxquery.vcxproj b/infrastructure/msvc/2013/boxquery.vcxproj
new file mode 100644
index 00000000..fd871d3b
--- /dev/null
+++ b/infrastructure/msvc/2013/boxquery.vcxproj
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}</ProjectGuid>
+ <RootNamespace>boxquery</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>bbackupquery</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupstore;$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\pcre;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalDependencies>Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\backupstore;$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\pcre;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>Ws2_32.lib;Advapi32.lib;User32.lib;Gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)bbackupquery.exe</OutputFile>
+ <IgnoreSpecificDefaultLibraries>
+ </IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\bin\bbackupquery\autogen_Documentation.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupquery\BackupQueries.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupquery\bbackupquery.cpp" />
+ <ClCompile Include="..\..\..\bin\bbackupquery\CommandCompletion.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\bin\bbackupquery\BackupQueries.h" />
+ <ClInclude Include="..\..\..\bin\bbackupquery\BoxBackupCompareParams.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\..\lib\win32\messages.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="libbackupclient.vcxproj">
+ <Project>{32604097-c934-4711-b1ad-206336640e70}</Project>
+ </ProjectReference>
+ <ProjectReference Include="libbackupstore.vcxproj">
+ <Project>{97d89aef-2be4-4e34-8703-03ba67bf4494}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/common.vcxproj b/infrastructure/msvc/2013/common.vcxproj
new file mode 100644
index 00000000..50c93384
--- /dev/null
+++ b/infrastructure/msvc/2013/common.vcxproj
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{A089CEE6-EBF0-4232-A0C0-74850A8127A6}</ProjectGuid>
+ <RootNamespace>common</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PreBuildEvent />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;$(ProjectDir)..\..\..\..\pcre;$(ProjectDir)..\..\..\qdbm</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <TreatWarningAsError>false</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Lib />
+ <CustomBuildStep />
+ <CustomBuildStep />
+ <CustomBuildStep />
+ <Lib>
+ <AdditionalDependencies>$(ProjectDir)..\..\..\..\pcre\build\vc2013\Debug\pcre.lib;$(ProjectDir)..\..\..\..\pcre\build\vc2013\Debug\pcreposix.lib;$(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib;$(ProjectDir)..\..\..\..\zlib\projects\visualc10\LIB Debug\zlibd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ <PreBuildEvent>
+ <Command>perl $(ProjectDir)..\getversion.pl</Command>
+ </PreBuildEvent>
+ <PreBuildEvent>
+ <Message>Determining Version Number</Message>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\lib\common\;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;$(ProjectDir)..\..\..\..\pcre;$(ProjectDir)..\..\..\qdbm;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Lib>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <AdditionalDependencies>$(ProjectDir)..\..\..\..\pcre\build\vc2013\Release\pcre.lib;$(ProjectDir)..\..\..\..\pcre\build\vc2013\Release\pcreposix.lib;$(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib;$(ProjectDir)..\..\..\..\zlib\projects\visualc10\\LIB Release\zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Lib>
+ <PreBuildEvent>
+ <Command>perl $(ProjectDir)..\getversion.pl</Command>
+ <Message>Determining Version Number</Message>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\lib\common\BufferedStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\BufferedWriteStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\FileModificationTime.cpp" />
+ <ClCompile Include="..\..\..\lib\common\GetLine.cpp" />
+ <ClCompile Include="..\..\..\lib\common\InvisibleTempFileStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\NamedLock.cpp" />
+ <ClCompile Include="..\..\..\lib\common\RateLimitingStream.cpp" />
+ <ClCompile Include="..\..\..\lib\compress\autogen_CompressException.cpp" />
+ <ClCompile Include="..\..\..\lib\compress\CompressStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\autogen_CommonException.cpp" />
+ <ClCompile Include="..\..\..\lib\common\autogen_ConversionException.cpp" />
+ <ClCompile Include="..\..\..\lib\common\BoxException.cpp" />
+ <ClCompile Include="..\..\..\lib\common\BoxTime.cpp" />
+ <ClCompile Include="..\..\..\lib\common\BoxTimeToText.cpp" />
+ <ClCompile Include="..\..\..\lib\common\CollectInBufferStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\Configuration.cpp" />
+ <ClCompile Include="..\..\..\lib\common\ConversionString.cpp" />
+ <ClCompile Include="..\..\..\lib\common\DebugAssertFailed.cpp" />
+ <ClCompile Include="..\..\..\lib\common\DebugMemLeakFinder.cpp" />
+ <ClCompile Include="..\..\..\lib\common\DebugPrintf.cpp" />
+ <ClCompile Include="..\..\..\lib\common\ExcludeList.cpp" />
+ <ClCompile Include="..\..\..\lib\common\FdGetLine.cpp" />
+ <ClCompile Include="..\..\..\lib\common\FileStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\IOStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\IOStreamGetLine.cpp" />
+ <ClCompile Include="..\..\..\lib\common\Logging.cpp" />
+ <ClCompile Include="..\..\..\lib\common\MemBlockStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\PartialReadStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\PathUtils.cpp" />
+ <ClCompile Include="..\..\..\lib\common\ReadGatherStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\ReadLoggingStream.cpp" />
+ <ClCompile Include="..\..\..\lib\common\StreamableMemBlock.cpp" />
+ <ClCompile Include="..\..\..\lib\common\Timer.cpp" />
+ <ClCompile Include="..\..\..\lib\common\UnixUser.cpp" />
+ <ClCompile Include="..\..\..\lib\common\Utils.cpp" />
+ <ClCompile Include="..\..\..\lib\common\WaitForEvent.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\autogen_CipherException.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CipherAES.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CipherBlowfish.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CipherContext.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CipherDescription.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\CryptoUtils.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\MD5Digest.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\Random.cpp" />
+ <ClCompile Include="..\..\..\lib\crypto\RollingChecksum.cpp" />
+ <ClCompile Include="..\..\..\lib\server\Message.cpp" />
+ <ClCompile Include="..\..\..\lib\server\TcpNice.cpp" />
+ <ClCompile Include="..\..\..\lib\win32\emu.cpp" />
+ <ClCompile Include="..\..\..\lib\win32\getopt_long.cpp" />
+ <ClCompile Include="..\..\..\lib\server\autogen_ConnectionException.cpp" />
+ <ClCompile Include="..\..\..\lib\server\autogen_ServerException.cpp" />
+ <ClCompile Include="..\..\..\lib\server\Daemon.cpp" />
+ <ClCompile Include="..\..\..\lib\server\LocalProcessStream.cpp" />
+ <ClCompile Include="..\..\..\lib\server\Protocol.cpp" />
+ <ClCompile Include="..\..\..\lib\server\ProtocolUncertainStream.cpp" />
+ <ClCompile Include="..\..\..\lib\server\Socket.cpp" />
+ <ClCompile Include="..\..\..\lib\server\SocketStream.cpp" />
+ <ClCompile Include="..\..\..\lib\server\SocketStreamTLS.cpp" />
+ <ClCompile Include="..\..\..\lib\server\SSLLib.cpp" />
+ <ClCompile Include="..\..\..\lib\server\TLSContext.cpp" />
+ <ClCompile Include="..\..\..\lib\server\WinNamedPipeStream.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\lib\common\BufferedStream.h" />
+ <ClInclude Include="..\..\..\lib\common\BufferedWriteStream.h" />
+ <ClInclude Include="..\..\..\lib\common\GetLine.h" />
+ <ClInclude Include="..\..\..\lib\common\InvisibleTempFileStream.h" />
+ <ClInclude Include="..\..\..\lib\common\RateLimitingStream.h" />
+ <ClInclude Include="..\..\..\lib\compress\autogen_CompressException.h" />
+ <ClInclude Include="..\..\..\lib\compress\Compress.h" />
+ <ClInclude Include="..\..\..\lib\compress\CompressException.h" />
+ <ClInclude Include="..\..\..\lib\compress\CompressStream.h" />
+ <ClInclude Include="..\..\..\lib\common\autogen_CommonException.h" />
+ <ClInclude Include="..\..\..\lib\common\autogen_ConversionException.h" />
+ <ClInclude Include="..\..\..\lib\common\BannerText.h" />
+ <ClInclude Include="..\..\..\lib\common\BeginStructPackForWire.h" />
+ <ClInclude Include="..\..\..\lib\common\Box.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxConfig-MSVC.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxException.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxPlatform.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxPortsAndFiles.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxTime.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxTimeToText.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxTimeToUnix.h" />
+ <ClInclude Include="..\..\..\lib\common\BoxVersion.h" />
+ <ClInclude Include="..\..\..\lib\common\CollectInBufferStream.h" />
+ <ClInclude Include="..\..\..\lib\common\CommonException.h" />
+ <ClInclude Include="..\..\..\lib\common\Configuration.h" />
+ <ClInclude Include="..\..\..\lib\common\Conversion.h" />
+ <ClInclude Include="..\..\..\lib\common\EndStructPackForWire.h" />
+ <ClInclude Include="..\..\..\lib\common\ExcludeList.h" />
+ <ClInclude Include="..\..\..\lib\common\FdGetLine.h" />
+ <ClInclude Include="..\..\..\lib\common\FileModificationTime.h" />
+ <ClInclude Include="..\..\..\lib\common\FileStream.h" />
+ <ClInclude Include="..\..\..\lib\common\Guards.h" />
+ <ClInclude Include="..\..\..\lib\common\IOStream.h" />
+ <ClInclude Include="..\..\..\lib\common\IOStreamGetLine.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CryptoUtils.h" />
+ <ClInclude Include="..\..\..\lib\server\LocalProcessStream.h" />
+ <ClInclude Include="..\..\..\lib\common\Logging.h" />
+ <ClInclude Include="..\..\..\lib\common\MainHelper.h" />
+ <ClInclude Include="..\..\..\lib\common\MemBlockStream.h" />
+ <ClInclude Include="..\..\..\lib\common\MemLeakFinder.h" />
+ <ClInclude Include="..\..\..\lib\common\MemLeakFindOff.h" />
+ <ClInclude Include="..\..\..\lib\common\MemLeakFindOn.h" />
+ <ClInclude Include="..\..\..\lib\common\NamedLock.h" />
+ <ClInclude Include="..\..\..\lib\common\PartialReadStream.h" />
+ <ClInclude Include="..\..\..\lib\common\PathUtils.h" />
+ <ClInclude Include="..\..\..\lib\common\ReadGatherStream.h" />
+ <ClInclude Include="..\..\..\lib\common\ReadLoggingStream.h" />
+ <ClInclude Include="..\..\..\lib\common\StreamableMemBlock.h" />
+ <ClInclude Include="..\..\..\lib\common\TemporaryDirectory.h" />
+ <ClInclude Include="..\..\..\lib\common\Test.h" />
+ <ClInclude Include="..\..\..\lib\common\Timer.h" />
+ <ClInclude Include="..\..\..\lib\common\UnixUser.h" />
+ <ClInclude Include="..\..\..\lib\common\Utils.h" />
+ <ClInclude Include="..\..\..\lib\common\WaitForEvent.h" />
+ <ClInclude Include="..\..\..\lib\crypto\autogen_CipherException.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherAES.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherBlowfish.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherContext.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherDescription.h" />
+ <ClInclude Include="..\..\..\lib\crypto\CipherException.h" />
+ <ClInclude Include="..\..\..\lib\crypto\MD5Digest.h" />
+ <ClInclude Include="..\..\..\lib\crypto\Random.h" />
+ <ClInclude Include="..\..\..\lib\crypto\RollingChecksum.h" />
+ <ClInclude Include="..\..\..\lib\server\Message.h" />
+ <ClInclude Include="..\..\..\lib\server\TcpNice.h" />
+ <ClInclude Include="..\..\..\lib\win32\emu.h" />
+ <ClInclude Include="..\..\..\lib\win32\getopt.h" />
+ <ClInclude Include="..\..\..\lib\server\autogen_ConnectionException.h" />
+ <ClInclude Include="..\..\..\lib\server\autogen_ServerException.h" />
+ <ClInclude Include="..\..\..\lib\server\Daemon.h" />
+ <ClInclude Include="..\..\..\lib\server\Protocol.h" />
+ <ClInclude Include="..\..\..\lib\server\ProtocolUncertainStream.h" />
+ <ClInclude Include="..\..\..\lib\server\ProtocolWire.h" />
+ <ClInclude Include="..\..\..\lib\server\ServerException.h" />
+ <ClInclude Include="..\..\..\lib\server\ServerStream.h" />
+ <ClInclude Include="..\..\..\lib\server\ServerTLS.h" />
+ <ClInclude Include="..\..\..\lib\server\Socket.h" />
+ <ClInclude Include="..\..\..\lib\server\SocketListen.h" />
+ <ClInclude Include="..\..\..\lib\server\SocketStream.h" />
+ <ClInclude Include="..\..\..\lib\server\SocketStreamTLS.h" />
+ <ClInclude Include="..\..\..\lib\server\SSLLib.h" />
+ <ClInclude Include="..\..\..\lib\server\TLSContext.h" />
+ <ClInclude Include="..\..\..\lib\server\WinNamedPipeStream.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="qdbm.vcxproj">
+ <Project>{72af22a7-b339-4fdf-b6ae-ca6522d4bb8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/libbackupclient.vcxproj b/infrastructure/msvc/2013/libbackupclient.vcxproj
new file mode 100644
index 00000000..e52e3dd5
--- /dev/null
+++ b/infrastructure/msvc/2013/libbackupclient.vcxproj
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\lib\backupclient\autogen_ClientException.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupClientCryptoKeys.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupClientMakeExcludeList.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupClientRestore.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupDaemonConfigVerify.cpp" />
+ <ClCompile Include="..\..\..\lib\backupclient\BackupStoreObjectDump.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\lib\backupclient\autogen_ClientException.h" />
+ <ClInclude Include="..\..\..\lib\backupclient\BackupClientCryptoKeys.h" />
+ <ClInclude Include="..\..\..\lib\backupclient\BackupClientMakeExcludeList.h" />
+ <ClInclude Include="..\..\..\lib\backupclient\BackupClientRestore.h" />
+ <ClInclude Include="..\..\..\lib\backupclient\BackupDaemonConfigVerify.h" />
+ <ClInclude Include="..\..\..\lib\backupclient\BackupDaemonInterface.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="libbackupstore.vcxproj">
+ <Project>{97d89aef-2be4-4e34-8703-03ba67bf4494}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{32604097-C934-4711-B1AD-206336640E70}</ProjectGuid>
+ <RootNamespace>libbackupstore</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetExt>.lib</TargetExt>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>Ws2_32.lib;Advapi32.lib;User32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;$(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib;$(ProjectDir)..\..\..\$(Configuration)\common.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Lib />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/libbackupstore.vcxproj b/infrastructure/msvc/2013/libbackupstore.vcxproj
new file mode 100644
index 00000000..6bf54572
--- /dev/null
+++ b/infrastructure/msvc/2013/libbackupstore.vcxproj
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{97D89AEF-2BE4-4E34-8703-03BA67BF4494}</ProjectGuid>
+ <RootNamespace>libbackupstore</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetExt>.lib</TargetExt>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\lib\httpserver;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>Ws2_32.lib;Advapi32.lib;User32.lib;$(ProjectDir)..\..\..\..\zlib\lib\zdll.lib;$(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib;$(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib;$(ProjectDir)..\..\..\$(Configuration)\common.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Lib />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..\lib\backupclient;$(SolutionDir)..\..\..\lib\backupstore;$(SolutionDir)..\..\..\lib\raidfile;$(SolutionDir)..\..\..\lib\common;$(SolutionDir)..\..\..\lib\compress;$(SolutionDir)..\..\..\lib\crypto;$(SolutionDir)..\..\..\lib\server;$(SolutionDir)..\..\..\lib\win32;$(SolutionDir)..\..\..\lib\httpserver;$(SolutionDir)..\..\..\qdbm;$(SolutionDir)..\..\..\..\openssl\include;$(SolutionDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\lib\backupstore\autogen_BackupProtocol.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\autogen_BackupStoreException.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupAccountControl.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupClientFileAttributes.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupCommands.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreAccountDatabase.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreAccounts.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreCheck.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreCheck2.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreCheckData.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreConfigVerify.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreContext.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreDirectory.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFile.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileCmbDiff.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileCmbIdx.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileCombine.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileCryptVar.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileDiff.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileEncodeStream.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFilename.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFilenameClear.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreFileRevDiff.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreInfo.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\BackupStoreRefCountDatabase.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\HousekeepStoreAccount.cpp" />
+ <ClCompile Include="..\..\..\lib\backupstore\StoreStructure.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\autogen_HTTPException.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\cdecode.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\cencode.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\HTTPQueryDecoder.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\HTTPRequest.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\HTTPResponse.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\HTTPServer.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\S3Client.cpp" />
+ <ClCompile Include="..\..\..\lib\httpserver\S3Simulator.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\autogen_RaidFileException.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\RaidFileController.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\RaidFileRead.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\RaidFileUtil.cpp" />
+ <ClCompile Include="..\..\..\lib\raidfile\RaidFileWrite.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\lib\backupstore\autogen_BackupProtocol.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\autogen_BackupStoreException.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupAccountControl.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupClientFileAttributes.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupConstants.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreAccountDatabase.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreAccounts.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreCheck.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreConfigVerify.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreConstants.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreContext.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreDirectory.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreException.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFile.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFileCryptVar.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFileEncodeStream.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFilename.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFilenameClear.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreFileWire.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreInfo.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreObjectMagic.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\BackupStoreRefCountDatabase.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\HousekeepStoreAccount.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\RunStatusProvider.h" />
+ <ClInclude Include="..\..\..\lib\backupstore\StoreStructure.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\autogen_HTTPException.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\cdecode.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\cencode.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\decode.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\encode.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\HTTPQueryDecoder.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\HTTPRequest.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\HTTPResponse.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\HTTPServer.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\S3Client.h" />
+ <ClInclude Include="..\..\..\lib\httpserver\S3Simulator.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\autogen_RaidFileException.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileController.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileException.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileRead.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileUtil.h" />
+ <ClInclude Include="..\..\..\lib\raidfile\RaidFileWrite.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\lib\backupstore\backupprotocol.txt" />
+ <None Include="..\..\..\lib\backupstore\BackupStoreException.txt" />
+ <None Include="..\..\..\lib\backupstore\Makefile.extra" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/qdbm.vcxproj b/infrastructure/msvc/2013/qdbm.vcxproj
new file mode 100644
index 00000000..296de088
--- /dev/null
+++ b/infrastructure/msvc/2013/qdbm.vcxproj
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{72AF22A7-B339-4FDF-B6AE-CA6522D4BB8D}</ProjectGuid>
+ <RootNamespace>qdbm</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetExt>.lib</TargetExt>
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <CompileAsManaged>false</CompileAsManaged>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PreprocessorDefinitions>QDBM_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ <Lib />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <DisableSpecificWarnings>4996</DisableSpecificWarnings>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <CompileAsManaged>false</CompileAsManaged>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\qdbm\depot.h" />
+ <ClInclude Include="..\..\..\qdbm\myconf.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\qdbm\depot.c" />
+ <ClCompile Include="..\..\..\qdbm\myconf.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/2013/win32test.vcxproj b/infrastructure/msvc/2013/win32test.vcxproj
new file mode 100644
index 00000000..8369aabc
--- /dev/null
+++ b/infrastructure/msvc/2013/win32test.vcxproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{28C29E72-76A2-4D0C-B35B-12D446733D2E}</ProjectGuid>
+ <RootNamespace>win32test</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\..\$(Configuration)\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\bin\bbackupd;$(ProjectDir)..\..\..\lib\backupstore;$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;QDBM_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4521</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ShowProgress>NotSet</ShowProgress>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ <AdditionalDependencies>Ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\bin\bbackupd;$(ProjectDir)..\..\..\lib\backupstore;$(ProjectDir)..\..\..\lib\backupclient;$(ProjectDir)..\..\..\lib\common;$(ProjectDir)..\..\..\lib\compress;$(ProjectDir)..\..\..\lib\crypto;$(ProjectDir)..\..\..\lib\server;$(ProjectDir)..\..\..\lib\win32;$(ProjectDir)..\..\..\..\openssl\include;$(ProjectDir)..\..\..\..\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>Ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <IgnoreSpecificDefaultLibraries>
+ </IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\lib\win32\emu.cpp" />
+ <ClCompile Include="..\..\..\test\win32\testlibwin32.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="common.vcxproj">
+ <Project>{a089cee6-ebf0-4232-a0c0-74850a8127a6}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/infrastructure/msvc/getversion.pl b/infrastructure/msvc/getversion.pl
index 0cf9cbcb..fe958831 100644
--- a/infrastructure/msvc/getversion.pl
+++ b/infrastructure/msvc/getversion.pl
@@ -1,8 +1,7 @@
#!perl
$basedir = $0;
-$basedir =~ s/\\[^\\]*$//;
-$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s|/|\\|g;
$basedir =~ s/\\[^\\]*$//;
$basedir =~ s/\\[^\\]*$//;
$basedir =~ s/\\[^\\]*$//;
diff --git a/infrastructure/msvc/win32.bat b/infrastructure/msvc/win32.bat
index 6dc5ade7..7c25723a 100644
--- a/infrastructure/msvc/win32.bat
+++ b/infrastructure/msvc/win32.bat
@@ -30,6 +30,9 @@ cd ..\..\
cd .\lib\crypto & perl ./../../lib/common/makeexception.pl.in CipherException.txt
cd ..\..\
+cd .\lib\httpserver & perl ./../../lib/common/makeexception.pl.in HTTPException.txt
+cd ..\..\
+
echo server parts - which appears as though some of the clients rely on
cd .\lib\server & perl ./../../lib/common/makeexception.pl.in ServerException.txt & perl ./../../lib/common/makeexception.pl.in ConnectionException.txt
diff --git a/lib/backupstore/BackupClientFileAttributes.cpp b/lib/backupstore/BackupClientFileAttributes.cpp
index e331e107..7ec6f478 100644
--- a/lib/backupstore/BackupClientFileAttributes.cpp
+++ b/lib/backupstore/BackupClientFileAttributes.cpp
@@ -55,20 +55,20 @@ BEGIN_STRUCTURE_PACKING_FOR_WIRE
typedef struct
{
int32_t AttributeType;
- u_int32_t UID;
- u_int32_t GID;
- u_int64_t ModificationTime;
- u_int64_t AttrModificationTime;
- u_int32_t UserDefinedFlags;
- u_int32_t FileGenerationNumber;
- u_int16_t Mode;
+ uint32_t UID;
+ uint32_t GID;
+ uint64_t ModificationTime;
+ uint64_t AttrModificationTime;
+ uint32_t UserDefinedFlags;
+ uint32_t FileGenerationNumber;
+ uint16_t Mode;
// Symbolic link filename may follow
// Extended attribute (xattr) information may follow, format is:
- // u_int32_t Size of extended attribute block (excluding this word)
+ // uint32_t Size of extended attribute block (excluding this word)
// For each of NumberOfAttributes (sorted by AttributeName):
- // u_int16_t AttributeNameLength
+ // uint16_t AttributeNameLength
// char AttributeName[AttributeNameLength]
- // u_int32_t AttributeValueLength
+ // uint32_t AttributeValueLength
// unsigned char AttributeValue[AttributeValueLength]
// AttributeName is 0 terminated, AttributeValue is not (and may be binary data)
} attr_StreamFormat;
@@ -117,7 +117,7 @@ namespace
BackupClientFileAttributes::BackupClientFileAttributes()
: mpClearAttributes(0)
{
- ASSERT(sizeof(u_int64_t) == sizeof(box_time_t));
+ ASSERT(sizeof(uint64_t) == sizeof(box_time_t));
}
// --------------------------------------------------------------------------
@@ -131,7 +131,7 @@ BackupClientFileAttributes::BackupClientFileAttributes()
BackupClientFileAttributes::BackupClientFileAttributes(const EMU_STRUCT_STAT &st)
: mpClearAttributes(0)
{
- ASSERT(sizeof(u_int64_t) == sizeof(box_time_t));
+ ASSERT(sizeof(uint64_t) == sizeof(box_time_t));
StreamableMemBlock *pnewAttr = new StreamableMemBlock;
FillAttributes(*pnewAttr, (const char *)NULL, st, true);
@@ -411,7 +411,7 @@ void BackupClientFileAttributes::ReadAttributes(const std::string& Filename,
// __time64_t winTime = BoxTimeToSeconds(
// pnewAttr->ModificationTime);
- u_int64_t modTime = box_ntoh64(pattr->ModificationTime);
+ uint64_t modTime = box_ntoh64(pattr->ModificationTime);
box_time_t modSecs = BoxTimeToSeconds(modTime);
__time64_t winTime = modSecs;
@@ -582,30 +582,30 @@ void BackupClientFileAttributes::FillExtendedAttr(StreamableMemBlock &outputBloc
// Leave space for attr block size later
int xattrBlockSizeOffset = xattrSize;
- xattrSize += sizeof(u_int32_t);
+ xattrSize += sizeof(uint32_t);
// Loop for each attribute
for(std::vector<std::string>::const_iterator attrKeyI = attrKeys.begin(); attrKeyI!=attrKeys.end(); ++attrKeyI)
{
std::string attrKey(*attrKeyI);
- if(xattrSize+sizeof(u_int16_t)+attrKey.size()+1+sizeof(u_int32_t)>static_cast<unsigned int>(xattrBufferSize))
+ if(xattrSize+sizeof(uint16_t)+attrKey.size()+1+sizeof(uint32_t)>static_cast<unsigned int>(xattrBufferSize))
{
- xattrBufferSize = (xattrBufferSize+sizeof(u_int16_t)+attrKey.size()+1+sizeof(u_int32_t))*2;
+ xattrBufferSize = (xattrBufferSize+sizeof(uint16_t)+attrKey.size()+1+sizeof(uint32_t))*2;
outputBlock.ResizeBlock(xattrBufferSize);
buffer = static_cast<unsigned char*>(outputBlock.GetBuffer());
}
// Store length and text for attibute name
- u_int16_t keyLength = htons(attrKey.size()+1);
- std::memcpy(buffer+xattrSize, &keyLength, sizeof(u_int16_t));
- xattrSize += sizeof(u_int16_t);
+ uint16_t keyLength = htons(attrKey.size()+1);
+ std::memcpy(buffer+xattrSize, &keyLength, sizeof(uint16_t));
+ xattrSize += sizeof(uint16_t);
std::memcpy(buffer+xattrSize, attrKey.c_str(), attrKey.size()+1);
xattrSize += attrKey.size()+1;
// Leave space for value size
int valueSizeOffset = xattrSize;
- xattrSize += sizeof(u_int32_t);
+ xattrSize += sizeof(uint32_t);
// Find size of attribute (must call with buffer and length 0 on some platforms,
// as -1 is returned if the data doesn't fit.)
@@ -642,13 +642,13 @@ void BackupClientFileAttributes::FillExtendedAttr(StreamableMemBlock &outputBloc
xattrSize += valueSize;
// Fill in value size
- u_int32_t valueLength = htonl(valueSize);
- std::memcpy(buffer+valueSizeOffset, &valueLength, sizeof(u_int32_t));
+ uint32_t valueLength = htonl(valueSize);
+ std::memcpy(buffer+valueSizeOffset, &valueLength, sizeof(uint32_t));
}
// Fill in attribute block size
- u_int32_t xattrBlockLength = htonl(xattrSize-xattrBlockSizeOffset-sizeof(u_int32_t));
- std::memcpy(buffer+xattrBlockSizeOffset, &xattrBlockLength, sizeof(u_int32_t));
+ uint32_t xattrBlockLength = htonl(xattrSize-xattrBlockSizeOffset-sizeof(uint32_t));
+ std::memcpy(buffer+xattrBlockSizeOffset, &xattrBlockLength, sizeof(uint32_t));
outputBlock.ResizeBlock(xattrSize);
}
@@ -853,7 +853,7 @@ void BackupClientFileAttributes::WriteAttributes(const std::string& Filename,
#endif
}
- if(static_cast<int>(xattrOffset+sizeof(u_int32_t))<=mpClearAttributes->GetSize())
+ if(static_cast<int>(xattrOffset+sizeof(uint32_t))<=mpClearAttributes->GetSize())
{
WriteExtendedAttr(Filename, xattrOffset);
}
@@ -995,10 +995,10 @@ void BackupClientFileAttributes::WriteExtendedAttr(const std::string& Filename,
#ifdef HAVE_SYS_XATTR_H
const char* buffer = static_cast<char*>(mpClearAttributes->GetBuffer());
- u_int32_t xattrBlockLength = 0;
- std::memcpy(&xattrBlockLength, buffer+xattrOffset, sizeof(u_int32_t));
+ uint32_t xattrBlockLength = 0;
+ std::memcpy(&xattrBlockLength, buffer+xattrOffset, sizeof(uint32_t));
int xattrBlockSize = ntohl(xattrBlockLength);
- xattrOffset += sizeof(u_int32_t);
+ xattrOffset += sizeof(uint32_t);
int xattrEnd = xattrOffset+xattrBlockSize;
if(xattrEnd>mpClearAttributes->GetSize())
@@ -1009,18 +1009,18 @@ void BackupClientFileAttributes::WriteExtendedAttr(const std::string& Filename,
while(xattrOffset<xattrEnd)
{
- u_int16_t keyLength = 0;
- std::memcpy(&keyLength, buffer+xattrOffset, sizeof(u_int16_t));
+ uint16_t keyLength = 0;
+ std::memcpy(&keyLength, buffer+xattrOffset, sizeof(uint16_t));
int keySize = ntohs(keyLength);
- xattrOffset += sizeof(u_int16_t);
+ xattrOffset += sizeof(uint16_t);
const char* key = buffer+xattrOffset;
xattrOffset += keySize;
- u_int32_t valueLength = 0;
- std::memcpy(&valueLength, buffer+xattrOffset, sizeof(u_int32_t));
+ uint32_t valueLength = 0;
+ std::memcpy(&valueLength, buffer+xattrOffset, sizeof(uint32_t));
int valueSize = ntohl(valueLength);
- xattrOffset += sizeof(u_int32_t);
+ xattrOffset += sizeof(uint32_t);
// FIXME: Warn on EOPNOTSUPP
if(::lsetxattr(Filename.c_str(), key, buffer+xattrOffset,
diff --git a/lib/backupstore/BackupStoreContext.cpp b/lib/backupstore/BackupStoreContext.cpp
index 75e78334..1a782df4 100644
--- a/lib/backupstore/BackupStoreContext.cpp
+++ b/lib/backupstore/BackupStoreContext.cpp
@@ -1542,7 +1542,7 @@ bool BackupStoreContext::ObjectExists(int64_t ObjectID, int MustBe)
std::auto_ptr<RaidFileRead> objectFile(RaidFileRead::Open(mStoreDiscSet, filename));
// Read the first integer
- u_int32_t magic;
+ uint32_t magic;
if(!objectFile->ReadFullBuffer(&magic, sizeof(magic), 0 /* not interested in how many read if failure */))
{
// Failed to get any bytes, must have failed
@@ -1558,7 +1558,7 @@ bool BackupStoreContext::ObjectExists(int64_t ObjectID, int MustBe)
#endif
// Right one?
- u_int32_t requiredMagic = (MustBe == ObjectExists_File)?OBJECTMAGIC_FILE_MAGIC_VALUE_V1:OBJECTMAGIC_DIR_MAGIC_VALUE;
+ uint32_t requiredMagic = (MustBe == ObjectExists_File)?OBJECTMAGIC_FILE_MAGIC_VALUE_V1:OBJECTMAGIC_DIR_MAGIC_VALUE;
// Check
if(ntohl(magic) != requiredMagic)
diff --git a/lib/backupstore/BackupStoreDirectory.cpp b/lib/backupstore/BackupStoreDirectory.cpp
index 332eca7a..6946f06e 100644
--- a/lib/backupstore/BackupStoreDirectory.cpp
+++ b/lib/backupstore/BackupStoreDirectory.cpp
@@ -1,7 +1,7 @@
// --------------------------------------------------------------------------
//
// File
-// Name: BackupStoreDirectory.h
+// Name: BackupStoreDirectory.cpp
// Purpose: Representation of a backup directory
// Created: 2003/08/26
//
@@ -36,11 +36,6 @@ typedef struct
// Then a StreamableMemBlock for attributes
} dir_StreamFormat;
-typedef enum
-{
- Option_DependencyInfoPresent = 1
-} dir_StreamFormatOptions;
-
typedef struct
{
uint64_t mModificationTime;
@@ -85,7 +80,7 @@ BackupStoreDirectory::BackupStoreDirectory()
mAttributesModTime(0),
mUserInfo1(0)
{
- ASSERT(sizeof(u_int64_t) == sizeof(box_time_t));
+ ASSERT(sizeof(uint64_t) == sizeof(box_time_t));
}
@@ -172,7 +167,7 @@ void BackupStoreDirectory::ReadFromStream(IOStream &rStream, int Timeout)
int count = ntohl(hdr.mNumEntries);
// Clear existing list
- for(std::vector<Entry*>::iterator i = mEntries.begin();
+ for(std::vector<Entry*>::iterator i = mEntries.begin();
i != mEntries.end(); i++)
{
delete (*i);
diff --git a/lib/backupstore/BackupStoreDirectory.h b/lib/backupstore/BackupStoreDirectory.h
index 5bbb0b35..788a3ad0 100644
--- a/lib/backupstore/BackupStoreDirectory.h
+++ b/lib/backupstore/BackupStoreDirectory.h
@@ -47,6 +47,11 @@ public:
}
#endif
+ typedef enum
+ {
+ Option_DependencyInfoPresent = 1
+ } dir_StreamFormatOptions;
+
BackupStoreDirectory();
BackupStoreDirectory(int64_t ObjectID, int64_t ContainerID);
// Convenience constructor from a stream
diff --git a/lib/backupstore/BackupStoreFileEncodeStream.h b/lib/backupstore/BackupStoreFileEncodeStream.h
index 6db09182..5b9b4a61 100644
--- a/lib/backupstore/BackupStoreFileEncodeStream.h
+++ b/lib/backupstore/BackupStoreFileEncodeStream.h
@@ -90,6 +90,9 @@ public:
int64_t GetBytesToUpload() { return mBytesToUpload; }
int64_t GetTotalBytesSent() { return mTotalBytesSent; }
+ static void CalculateBlockSizes(int64_t DataSize, int64_t &rNumBlocksOut,
+ int32_t &rBlockSizeOut, int32_t &rLastBlockSizeOut);
+
private:
enum
{
@@ -98,15 +101,12 @@ private:
Status_BlockListing = 2,
Status_Finished = 3
};
-
-private:
+
void EncodeCurrentBlock();
- void CalculateBlockSizes(int64_t DataSize, int64_t &rNumBlocksOut, int32_t &rBlockSizeOut, int32_t &rLastBlockSizeOut);
void SkipPreviousBlocksInInstruction();
void SetForInstruction();
void StoreBlockIndexEntry(int64_t WncSizeOrBlkIndex, int32_t ClearSize, uint32_t WeakChecksum, uint8_t *pStrongChecksum);
-private:
Recipe *mpRecipe;
IOStream *mpFile; // source file
CollectInBufferStream mData; // buffer for header and index entries
diff --git a/lib/common/Archive.h b/lib/common/Archive.h
index 76b069a0..2b27b303 100644
--- a/lib/common/Archive.h
+++ b/lib/common/Archive.h
@@ -47,6 +47,9 @@ public:
Write((int) Item);
}
void WriteExact(uint32_t Item) { Write((int)Item); }
+ // TODO FIXME: use of "int" here is dangerous and deprecated. It can lead to
+ // incompatible serialisation on non-32-bit machines. Passing anything other
+ // than one of the specifically supported fixed size types should be forbidden.
void Write(int Item)
{
int32_t privItem = htonl(Item);
@@ -57,6 +60,11 @@ public:
int64_t privItem = box_hton64(Item);
mrStream.Write(&privItem, sizeof(privItem), mTimeout);
}
+ void WriteInt16(uint16_t Item)
+ {
+ uint16_t privItem = htons(Item);
+ mrStream.Write(&privItem, sizeof(privItem), mTimeout);
+ }
void WriteExact(uint64_t Item) { Write(Item); }
void Write(uint64_t Item)
{
@@ -109,6 +117,15 @@ public:
}
rItemOut = ntohl(privItem);
}
+ void ReadFullBuffer(void* Buffer, size_t Size)
+ {
+ if(!mrStream.ReadFullBuffer(Buffer, Size,
+ 0 /* not interested in bytes read if this fails */,
+ mTimeout))
+ {
+ THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead);
+ }
+ }
void ReadIfPresent(int &rItemOut, int ValueIfNotPresent)
{
int32_t privItem;
@@ -132,26 +149,22 @@ public:
void Read(int64_t &rItemOut)
{
int64_t privItem;
- if(!mrStream.ReadFullBuffer(&privItem, sizeof(privItem),
- 0 /* not interested in bytes read if this fails */,
- mTimeout))
- {
- THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead);
- }
+ ReadFullBuffer(&privItem, sizeof(privItem));
rItemOut = box_ntoh64(privItem);
}
void ReadExact(uint64_t &rItemOut) { Read(rItemOut); }
void Read(uint64_t &rItemOut)
{
uint64_t privItem;
- if(!mrStream.ReadFullBuffer(&privItem, sizeof(privItem),
- 0 /* not interested in bytes read if this fails */,
- mTimeout))
- {
- THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead);
- }
+ ReadFullBuffer(&privItem, sizeof(privItem));
rItemOut = box_ntoh64(privItem);
}
+ void ReadInt16(uint16_t &rItemOut)
+ {
+ uint16_t privItem;
+ ReadFullBuffer(&privItem, sizeof(privItem));
+ rItemOut = ntohs(privItem);
+ }
void Read(uint8_t &rItemOut)
{
int privItem;
@@ -160,14 +173,14 @@ public:
}
void ReadIfPresent(std::string &rItemOut, const std::string& ValueIfNotPresent)
{
- Read(rItemOut, &ValueIfNotPresent);
+ ReadString(rItemOut, &ValueIfNotPresent);
}
void Read(std::string &rItemOut)
{
- Read(rItemOut, NULL);
+ ReadString(rItemOut, NULL);
}
private:
- void Read(std::string &rItemOut, const std::string* pValueIfNotPresent)
+ void ReadString(std::string &rItemOut, const std::string* pValueIfNotPresent)
{
int size;
int bytesRead;
@@ -193,13 +206,7 @@ private:
if(size < (int) sizeof(buf))
{
// Fetch rest of pPayload, relying on the Protocol to error on stupidly large sizes for us
- if(!mrStream.ReadFullBuffer(buf, size,
- 0 /* not interested in bytes read if this fails */,
- mTimeout))
- {
- THROW_EXCEPTION(CommonException,
- ArchiveBlockIncompleteRead);
- }
+ ReadFullBuffer(buf, size);
// assign to this string, storing the header and the extra payload
rItemOut.assign(buf, size);
}
@@ -210,13 +217,7 @@ private:
char *ppayload = dataB;
// Fetch rest of pPayload, relying on the Protocol to error on stupidly large sizes for us
- if(!mrStream.ReadFullBuffer(ppayload, size,
- 0 /* not interested in bytes read if this fails */,
- mTimeout))
- {
- THROW_EXCEPTION(CommonException,
- ArchiveBlockIncompleteRead);
- }
+ ReadFullBuffer(ppayload, size);
// assign to this string, storing the header and the extra pPayload
rItemOut.assign(ppayload, size);
}
diff --git a/lib/common/BoxConfig-MSVC.h b/lib/common/BoxConfig-MSVC.h
index eeb25d2e..82ab4997 100644
--- a/lib/common/BoxConfig-MSVC.h
+++ b/lib/common/BoxConfig-MSVC.h
@@ -2,6 +2,9 @@
/* lib/common/BoxConfig.h.in. Generated from configure.ac by autoheader. */
/* Hacked by hand to work for MSVC by Chris Wilson */
+// using std::min/max
+#define NOMINMAX
+
/* Define to major version for BDB_VERSION */
/* #undef BDB_VERSION_MAJOR */
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h
index 06f34d5c..35ad7a2c 100644
--- a/lib/common/BoxPlatform.h
+++ b/lib/common/BoxPlatform.h
@@ -108,56 +108,6 @@
#endif
#endif
-#if defined WIN32 && !defined __MINGW32__
- typedef __int8 int8_t;
- typedef __int16 int16_t;
- typedef __int32 int32_t;
- typedef __int64 int64_t;
-
- typedef unsigned __int8 u_int8_t;
- typedef unsigned __int16 u_int16_t;
- typedef unsigned __int32 u_int32_t;
- typedef unsigned __int64 u_int64_t;
-
- #define HAVE_U_INT8_T
- #define HAVE_U_INT16_T
- #define HAVE_U_INT32_T
- #define HAVE_U_INT64_T
-#endif // WIN32 && !__MINGW32__
-
-// Define missing types
-#ifndef HAVE_UINT8_T
- typedef u_int8_t uint8_t;
-#endif
-
-#ifndef HAVE_UINT16_T
- typedef u_int16_t uint16_t;
-#endif
-
-#ifndef HAVE_UINT32_T
- typedef u_int32_t uint32_t;
-#endif
-
-#ifndef HAVE_UINT64_T
- typedef u_int64_t uint64_t;
-#endif
-
-#ifndef HAVE_U_INT8_T
- typedef uint8_t u_int8_t;
-#endif
-
-#ifndef HAVE_U_INT16_T
- typedef uint16_t u_int16_t;
-#endif
-
-#ifndef HAVE_U_INT32_T
- typedef uint32_t u_int32_t;
-#endif
-
-#ifndef HAVE_U_INT64_T
- typedef uint64_t u_int64_t;
-#endif
-
#if !HAVE_DECL_INFTIM
#define INFTIM -1
#endif
@@ -176,7 +126,7 @@
#endif
#ifdef WIN32
- typedef u_int64_t InodeRefType;
+ typedef uint64_t InodeRefType;
#else
typedef ino_t InodeRefType;
#endif
diff --git a/lib/common/makeexception.pl.in b/lib/common/makeexception.pl.in
index e4018180..bddaa94a 100755
--- a/lib/common/makeexception.pl.in
+++ b/lib/common/makeexception.pl.in
@@ -73,12 +73,13 @@ class ${class}Exception : public BoxException
public:
${class}Exception(unsigned int SubType,
const std::string& rMessage = "")
- : mSubType(SubType), mMessage(rMessage)
+ : mSubType(SubType), mMessage(rMessage),
+ mWhat(GetMessage(SubType) + std::string(rMessage.empty() ? "" : ": ") + rMessage)
{
}
${class}Exception(const ${class}Exception &rToCopy)
- : mSubType(rToCopy.mSubType), mMessage(rToCopy.mMessage)
+ : mSubType(rToCopy.mSubType), mMessage(rToCopy.mMessage), mWhat(rToCopy.mWhat)
{
}
@@ -117,6 +118,7 @@ print H <<__E;
private:
unsigned int mSubType;
std::string mMessage;
+ std::string mWhat;
};
#endif // $guardname
@@ -133,51 +135,6 @@ print CPP <<__E;
#include "MemLeakFindOn.h"
-#ifdef EXCEPTION_CODENAMES_EXTENDED
- #ifdef EXCEPTION_CODENAMES_EXTENDED_WITH_DESCRIPTION
-static const char *whats[] = {
-__E
-
-my $last_seen = -1;
-for(my $e = 0; $e <= $#exception; $e++)
-{
- if($exception[$e] ne '')
- {
- for(my $s = $last_seen + 1; $s < $e; $s++)
- {
- print CPP "\t\"UNUSED\",\n"
- }
- my $ext = ($exception_desc[$e] ne '')?" ($exception_desc[$e])":'';
- print CPP "\t\"${class} ".$exception[$e].$ext.'"'.(($e==$#exception)?'':',')."\n";
- $last_seen = $e;
- }
-}
-
-print CPP <<__E;
-};
- #else
-static const char *whats[] = {
-__E
-
-$last_seen = -1;
-for(my $e = 0; $e <= $#exception; $e++)
-{
- if($exception[$e] ne '')
- {
- for(my $s = $last_seen + 1; $s < $e; $s++)
- {
- print CPP "\t\"UNUSED\",\n"
- }
- print CPP "\t\"${class} ".$exception[$e].'"'.(($e==$#exception)?'':',')."\n";
- $last_seen = $e;
- }
-}
-
-print CPP <<__E;
-};
- #endif
-#endif
-
unsigned int ${class}Exception::GetType() const throw()
{
return ${class}Exception::ExceptionType;
@@ -190,21 +147,7 @@ unsigned int ${class}Exception::GetSubType() const throw()
const char * ${class}Exception::what() const throw()
{
- std::string what = "${class}";
-
-#ifdef EXCEPTION_CODENAMES_EXTENDED
- if(mSubType < (sizeof(whats) / sizeof(whats[0])))
- {
- what = whats[mSubType];
- }
-#endif
-
- if(mMessage != "")
- {
- what += ": " + mMessage;
- }
-
- return what.c_str();
+ return mWhat.c_str();
}
const char * ${class}Exception::GetMessage(int SubType)
diff --git a/lib/httpserver/HTTPRequest.cpp b/lib/httpserver/HTTPRequest.cpp
index 1e3e2694..a94d96b0 100644
--- a/lib/httpserver/HTTPRequest.cpp
+++ b/lib/httpserver/HTTPRequest.cpp
@@ -10,10 +10,11 @@
#include "Box.h"
#include <string.h>
-#include <strings.h>
#include <stdlib.h>
#include <stdio.h>
+#include <sstream>
+
#include "HTTPRequest.h"
#include "HTTPResponse.h"
#include "HTTPQueryDecoder.h"
diff --git a/lib/intercept/intercept.cpp b/lib/intercept/intercept.cpp
index 41a7333b..88ea0d6e 100644
--- a/lib/intercept/intercept.cpp
+++ b/lib/intercept/intercept.cpp
@@ -15,7 +15,6 @@
#include <sys/syscall.h>
#endif
#include <sys/types.h>
-#include <unistd.h>
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
diff --git a/lib/server/Protocol.cpp b/lib/server/Protocol.cpp
index 937a2379..0adf9543 100644
--- a/lib/server/Protocol.cpp
+++ b/lib/server/Protocol.cpp
@@ -189,7 +189,7 @@ std::auto_ptr<Message> Protocol::ReceiveInternal()
}
// Check the object size
- u_int32_t objSize = ntohl(objHeader.mObjSize);
+ uint32_t objSize = ntohl(objHeader.mObjSize);
if(objSize < sizeof(objHeader) || objSize > mMaxObjectSize)
{
THROW_EXCEPTION(ConnectionException, Protocol_ObjTooBig)
@@ -641,7 +641,7 @@ std::auto_ptr<IOStream> Protocol::ReceiveStream()
}
// Get the stream size
- u_int32_t streamSize = ntohl(objHeader.mObjSize);
+ uint32_t streamSize = ntohl(objHeader.mObjSize);
// Inform sub class
InformStreamReceiving(streamSize);
@@ -836,12 +836,12 @@ int Protocol::SendStreamSendBlock(uint8_t *Block, int BytesInBlock)
// --------------------------------------------------------------------------
//
// Function
-// Name: Protocol::InformStreamReceiving(u_int32_t)
+// Name: Protocol::InformStreamReceiving(uint32_t)
// Purpose: Informs sub classes about streams being received
// Created: 2003/10/27
//
// --------------------------------------------------------------------------
-void Protocol::InformStreamReceiving(u_int32_t Size)
+void Protocol::InformStreamReceiving(uint32_t Size)
{
if(GetLogToSysLog())
{
@@ -868,12 +868,12 @@ void Protocol::InformStreamReceiving(u_int32_t Size)
// --------------------------------------------------------------------------
//
// Function
-// Name: Protocol::InformStreamSending(u_int32_t)
+// Name: Protocol::InformStreamSending(uint32_t)
// Purpose: Informs sub classes about streams being sent
// Created: 2003/10/27
//
// --------------------------------------------------------------------------
-void Protocol::InformStreamSending(u_int32_t Size)
+void Protocol::InformStreamSending(uint32_t Size)
{
if(GetLogToSysLog())
{
diff --git a/lib/server/Protocol.h b/lib/server/Protocol.h
index f659d3ca..fbe6461c 100644
--- a/lib/server/Protocol.h
+++ b/lib/server/Protocol.h
@@ -186,8 +186,8 @@ protected:
void CheckAndReadHdr(void *hdr); // don't use type here to avoid dependency
// Will be used for logging
- virtual void InformStreamReceiving(u_int32_t Size);
- virtual void InformStreamSending(u_int32_t Size);
+ virtual void InformStreamReceiving(uint32_t Size);
+ virtual void InformStreamSending(uint32_t Size);
private:
void EnsureBufferAllocated(int Size);
diff --git a/lib/server/ProtocolWire.h b/lib/server/ProtocolWire.h
index ff62b66e..6dee445b 100644
--- a/lib/server/ProtocolWire.h
+++ b/lib/server/ProtocolWire.h
@@ -26,8 +26,8 @@ typedef struct
typedef struct
{
- u_int32_t mObjSize;
- u_int32_t mObjType;
+ uint32_t mObjSize;
+ uint32_t mObjType;
} PW_ObjectHeader;
#define SPECIAL_STREAM_OBJECT_TYPE 0xffffffff
diff --git a/lib/win32/emu.h b/lib/win32/emu.h
index 5669c411..8014316a 100644
--- a/lib/win32/emu.h
+++ b/lib/win32/emu.h
@@ -32,27 +32,11 @@
// basic types, may be required by other headers since we
// don't include sys/types.h
-
-#ifdef __MINGW32__
- #include <stdint.h>
-#else // MSVC
- typedef unsigned __int64 u_int64_t;
- typedef unsigned __int64 uint64_t;
- typedef __int64 int64_t;
- typedef unsigned __int32 uint32_t;
- typedef unsigned __int32 u_int32_t;
- typedef __int32 int32_t;
- typedef unsigned __int16 uint16_t;
- typedef __int16 int16_t;
- typedef unsigned __int8 uint8_t;
- typedef __int8 int8_t;
-#endif
+#include <stdint.h>
// emulated types, present on MinGW but not MSVC or vice versa
-#ifdef __MINGW32__
- typedef uint32_t u_int32_t;
-#else
+#ifndef __MINGW32__
typedef unsigned int mode_t;
typedef unsigned int pid_t;
#endif
@@ -81,17 +65,6 @@
#define ITIMER_REAL 0
-#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
-
struct passwd {
char *pw_name;
char *pw_passwd;
@@ -142,7 +115,7 @@ inline struct passwd * getpwnam(const char * name)
#define S_ISDIR(x) (S_IFDIR & x)
#endif
-inline int chown(const char * Filename, u_int32_t uid, u_int32_t gid)
+inline int chown(const char * Filename, uint32_t uid, uint32_t gid)
{
//important - this needs implementing
//If a large restore is required then
@@ -220,7 +193,11 @@ inline int geteuid(void)
#define snprintf _snprintf
inline int strcasecmp(const char *s1, const char *s2)
{
- return _stricmp(s1,s2);
+ return _stricmp(s1, s2);
+}
+inline int strncasecmp(const char *s1, const char *s2, size_t count)
+{
+ return _strnicmp(s1, s2, count);
}
#endif
diff --git a/modules.txt b/modules.txt
index 09cee59b..aed59ef1 100644
--- a/modules.txt
+++ b/modules.txt
@@ -28,19 +28,19 @@ test/basicserver qdbm lib/server
lib/backupstore lib/server lib/raidfile lib/crypto lib/compress lib/httpserver
lib/backupclient lib/backupstore
-bin/bbackupobjdump lib/backupclient lib/backupstore
-bin/bbstored lib/raidfile lib/server lib/backupstore
-bin/bbstoreaccounts lib/raidfile lib/backupstore
-bin/bbackupd lib/server lib/backupclient qdbm
-bin/bbackupquery lib/server lib/backupclient
-bin/bbackupctl bin/bbackupd
+bin/bbackupobjdump lib/backupclient
+bin/bbstored lib/backupstore
+bin/bbstoreaccounts lib/backupclient
+bin/bbackupd lib/backupclient qdbm
+bin/bbackupquery lib/backupclient
+bin/bbackupctl lib/backupclient qdbm bin/bbackupd
test/backupstore bin/bbstored bin/bbstoreaccounts lib/server lib/backupstore lib/backupclient lib/raidfile
-test/backupstorefix bin/bbstored bin/bbstoreaccounts lib/backupstore lib/raidfile bin/bbackupquery bin/bbackupd bin/bbackupctl
+test/backupstorefix bin/bbstored bin/bbstoreaccounts lib/backupclient bin/bbackupquery bin/bbackupd bin/bbackupctl
test/backupstorepatch bin/bbstored bin/bbstoreaccounts lib/backupclient
test/backupdiff lib/backupclient
test/bbackupd bin/bbackupd bin/bbstored bin/bbstoreaccounts bin/bbackupquery bin/bbackupctl lib/server lib/backupstore lib/backupclient lib/intercept
-test/s3store lib/backupclient lib/httpserver bin/s3simulator
+test/s3store lib/backupclient lib/httpserver bin/s3simulator bin/bbstoreaccounts
# HTTP server system
lib/httpserver lib/server
diff --git a/test/backupstore/testbackupstore.cpp b/test/backupstore/testbackupstore.cpp
index c3798bf2..c7cfee6f 100644
--- a/test/backupstore/testbackupstore.cpp
+++ b/test/backupstore/testbackupstore.cpp
@@ -22,11 +22,12 @@
#include "BackupStoreConstants.h"
#include "BackupStoreDirectory.h"
#include "BackupStoreException.h"
-#include "BackupStoreInfo.h"
+#include "BackupStoreFile.h"
#include "BackupStoreFilenameClear.h"
#include "BackupStoreFileEncodeStream.h"
+#include "BackupStoreInfo.h"
+#include "BackupStoreObjectMagic.h"
#include "BackupStoreRefCountDatabase.h"
-#include "BackupStoreFile.h"
#include "BoxPortsAndFiles.h"
#include "CollectInBufferStream.h"
#include "Configuration.h"
@@ -2430,29 +2431,23 @@ bool test_encoding()
bool test_symlinks()
{
-#ifndef WIN32 // no symlinks on Win32
SETUP_TEST_BACKUPSTORE();
- // TODO FIXME indentation
-
- // Try out doing this on a symlink
- {
- UNLINK_IF_EXISTS("testfiles/testsymlink");
- TEST_THAT(::symlink("does/not/exist", "testfiles/testsymlink") == 0);
- BackupStoreFilenameClear name("testsymlink");
- std::auto_ptr<IOStream> encoded(BackupStoreFile::EncodeFile("testfiles/testsymlink", 32, name));
-
- // Can't decode it from the stream, because it's in file order, and doesn't have the
- // required properties to be able to reorder it. So buffer it...
- CollectInBufferStream b;
- encoded->CopyStreamTo(b);
- b.SetForReading();
-
- // Decode it
- UNLINK_IF_EXISTS("testfiles/testsymlink_2");
- BackupStoreFile::DecodeFile(b, "testfiles/testsymlink_2", IOStream::TimeOutInfinite);
- }
- teardown_test_backupstore();
+#ifndef WIN32 // no symlinks on Win32
+ UNLINK_IF_EXISTS("testfiles/testsymlink");
+ TEST_THAT(::symlink("does/not/exist", "testfiles/testsymlink") == 0);
+ BackupStoreFilenameClear name("testsymlink");
+ std::auto_ptr<IOStream> encoded(BackupStoreFile::EncodeFile("testfiles/testsymlink", 32, name));
+
+ // Can't decode it from the stream, because it's in file order, and doesn't have the
+ // required properties to be able to reorder it. So buffer it...
+ CollectInBufferStream b;
+ encoded->CopyStreamTo(b);
+ b.SetForReading();
+
+ // Decode it
+ UNLINK_IF_EXISTS("testfiles/testsymlink_2");
+ BackupStoreFile::DecodeFile(b, "testfiles/testsymlink_2", IOStream::TimeOutInfinite);
#endif
TEARDOWN_TEST_BACKUPSTORE();
@@ -3121,6 +3116,94 @@ bool test_read_old_backupstoreinfo_files()
TEARDOWN_TEST_BACKUPSTORE();
}
+// Test that attributes can be correctly read from and written to the standard
+// format, for compatibility with other servers and clients. See
+// http://mailman.uk.freebsd.org/pipermail../public/boxbackup/2010-November/005818.html and
+// http://lists.boxbackup.org/pipermail/boxbackup/2011-February/005978.html for
+// details of the problems with packed structs.
+bool test_read_write_attr_streamformat()
+{
+ SETUP_TEST_BACKUPSTORE();
+
+ // Construct a minimal valid directory with 1 entry in memory using Archive, and
+ // try to read it back.
+ CollectInBufferStream buf;
+ Archive darc(buf, IOStream::TimeOutInfinite);
+
+ // Write a dir_StreamFormat structure
+ darc.Write((int32_t)OBJECTMAGIC_DIR_MAGIC_VALUE); // mMagicValue
+ darc.Write((int32_t)1); // mNumEntries
+ darc.Write((int64_t)0x0123456789abcdef); // mObjectID
+ darc.Write((int64_t)0x0000000000000001); // mContainerID
+ darc.Write((uint64_t)0x23456789abcdef01); // mAttributesModTime
+ darc.Write((int32_t)BackupStoreDirectory::Option_DependencyInfoPresent);
+ // mOptionsPresent
+ // 36 bytes to here
+
+ // Write fake attributes to make it valid.
+ StreamableMemBlock attr;
+ attr.WriteToStream(buf);
+ // 40 bytes to here
+
+ // Write a single entry in an en_StreamFormat structure
+ darc.Write((uint64_t)0x3456789012345678); // mModificationTime
+ darc.Write((int64_t)0x0000000000000002); // mObjectID
+ darc.Write((int64_t)0x0000000000000003); // mSizeInBlocks
+ darc.Write((uint64_t)0x0000000000000004); // mAttributesHash
+ darc.WriteInt16((int16_t)0x3141); // mFlags
+ // 74 bytes to here
+
+ // Then a BackupStoreFilename
+ BackupStoreFilename fn;
+ fn.SetAsClearFilename("hello");
+ fn.WriteToStream(buf);
+ // 81 bytes to here
+
+ // Then a StreamableMemBlock for attributes
+ attr.WriteToStream(buf);
+ // 85 bytes to here
+
+ // Then an en_StreamFormatDepends for dependency info.
+ darc.Write((uint64_t)0x0000000000000005); // mDependsNewer
+ darc.Write((uint64_t)0x0000000000000006); // mDependsOlder
+ // 101 bytes to here
+
+ // Make sure none of the fields was expanded in transit by Archive.
+ TEST_EQUAL(101, buf.GetSize());
+
+ buf.SetForReading();
+ BackupStoreDirectory dir(buf);
+
+ TEST_EQUAL(1, dir.GetNumberOfEntries());
+ TEST_EQUAL(0x0123456789abcdef, dir.GetObjectID());
+ TEST_EQUAL(0x0000000000000001, dir.GetContainerID());
+ TEST_EQUAL(0x23456789abcdef01, dir.GetAttributesModTime());
+
+ BackupStoreDirectory::Iterator i(dir);
+ BackupStoreDirectory::Entry* pen = i.Next();
+ TEST_THAT_OR(pen != NULL, FAIL);
+ TEST_EQUAL(0x3456789012345678, pen->GetModificationTime());
+ TEST_EQUAL(0x0000000000000002, pen->GetObjectID());
+ TEST_EQUAL(0x0000000000000003, pen->GetSizeInBlocks());
+ TEST_EQUAL(0x0000000000000004, pen->GetAttributesHash());
+ TEST_EQUAL(0x0000000000000005, pen->GetDependsNewer());
+ TEST_EQUAL(0x0000000000000006, pen->GetDependsOlder());
+ TEST_EQUAL(0x3141, pen->GetFlags());
+
+ CollectInBufferStream buf2;
+ dir.WriteToStream(buf2);
+ buf2.SetForReading();
+ buf.Seek(0, IOStream::SeekType_Absolute);
+ TEST_EQUAL(101, buf2.GetSize());
+ TEST_EQUAL(buf.GetSize(), buf2.GetSize());
+
+ // Test that the stream written out for the Directory is exactly the same as the
+ // one we hand-crafted earlier.
+ TEST_EQUAL(0, memcmp(buf.GetBuffer(), buf2.GetBuffer(), buf.GetSize()));
+
+ TEARDOWN_TEST_BACKUPSTORE();
+}
+
int test(int argc, const char *argv[])
{
TEST_THAT(test_open_files_with_limited_win32_permissions());
@@ -3187,6 +3270,7 @@ int test(int argc, const char *argv[])
TEST_THAT(test_account_limits_respected());
TEST_THAT(test_multiple_uploads());
TEST_THAT(test_housekeeping_deletes_files());
+ TEST_THAT(test_read_write_attr_streamformat());
return finish_test_suite();
}
diff --git a/test/backupstorepatch/testbackupstorepatch.cpp b/test/backupstorepatch/testbackupstorepatch.cpp
index 100afa40..e149a041 100644
--- a/test/backupstorepatch/testbackupstorepatch.cpp
+++ b/test/backupstorepatch/testbackupstorepatch.cpp
@@ -504,9 +504,13 @@ int test(int argc, const char *argv[])
storeRootDir, discSet,
filenameOut,
false /* don't bother ensuring the directory exists */);
- TEST_EQUAL(RaidFileUtil::NoFile,
+ std::ostringstream msg;
+ msg << "Unreferenced object " <<
+ test_files[f].IDOnServer <<
+ " was not deleted by housekeeping";
+ TEST_EQUAL_LINE(RaidFileUtil::NoFile,
RaidFileUtil::RaidFileExists(
- rfd, filenameOut));
+ rfd, filenameOut), msg.str());
}
else
{
diff --git a/test/basicserver/testbasicserver.cpp b/test/basicserver/testbasicserver.cpp
index d844ee1e..9e3b8890 100644
--- a/test/basicserver/testbasicserver.cpp
+++ b/test/basicserver/testbasicserver.cpp
@@ -11,7 +11,6 @@
#include "Box.h"
#include <stdio.h>
-#include <unistd.h>
#include <time.h>
#include <typeinfo>
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index 1eb9d0f7..4b843e6a 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -21,7 +21,6 @@
#include <sys/stat.h>
#include <limits.h>
#include <string.h>
-#include <unistd.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -58,6 +57,7 @@
#include "BackupStoreDirectory.h"
#include "BackupStoreException.h"
#include "BackupStoreConfigVerify.h"
+#include "BackupStoreFileEncodeStream.h"
#include "BoxPortsAndFiles.h"
#include "BoxTime.h"
#include "BoxTimeToUnix.h"
@@ -1053,7 +1053,7 @@ bool touch_and_wait(const std::string& filename)
return true;
}
-TLSContext context;
+TLSContext sTlsContext;
#define TEST_COMPARE(...) \
TEST_THAT(compare(BackupQueries::ReturnCode::__VA_ARGS__));
@@ -1063,7 +1063,7 @@ TLSContext context;
bool search_for_file(const std::string& filename)
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, BackupProtocolLogin::Flags_ReadOnly);
+ connect_and_login(sTlsContext, BackupProtocolLogin::Flags_ReadOnly);
std::auto_ptr<BackupStoreDirectory> dir = ReadDirectory(*client);
int64_t testDirId = SearchDir(*dir, filename);
@@ -1076,6 +1076,9 @@ class MockClientContext : public BackupClientContext
{
public:
BackupProtocolCallable& mrClient;
+ int mNumKeepAlivesPolled;
+ int mKeepAliveTime;
+
MockClientContext
(
LocationResolver &rResolver,
@@ -1094,16 +1097,36 @@ public:
rHostname, Port, AccountNumber, ExtendedLogging,
ExtendedLogToFile, ExtendedLogFile,
rProgressNotifier, TcpNiceMode),
- mrClient(rClient)
+ mrClient(rClient),
+ mNumKeepAlivesPolled(0),
+ mKeepAliveTime(-1)
{ }
BackupProtocolCallable &GetConnection()
{
return mrClient;
}
+
+ virtual BackupProtocolCallable* GetOpenConnection() const
+ {
+ return &mrClient;
+ }
+
+ void SetKeepAliveTime(int iSeconds)
+ {
+ mKeepAliveTime = iSeconds;
+ BackupClientContext::SetKeepAliveTime(iSeconds);
+ }
+
+ virtual void DoKeepAlive()
+ {
+ mNumKeepAlivesPolled++;
+ BackupClientContext::DoKeepAlive();
+ }
};
-class MockBackupDaemon : public BackupDaemon {
+class MockBackupDaemon : public BackupDaemon
+{
BackupProtocolCallable& mrClient;
public:
@@ -1141,7 +1164,7 @@ bool test_readdirectory_on_nonexistent_dir()
{
std::auto_ptr<BackupProtocolCallable> client = connect_and_login(
- context, 0 /* read-write */);
+ sTlsContext, 0 /* read-write */);
{
Logger::LevelGuard(Logging::GetConsole(), Log::ERROR);
@@ -1208,7 +1231,7 @@ bool test_getobject_on_nonexistent_file()
TEST_THAT_OR(config.get(), return false);
std::auto_ptr<BackupProtocolCallable> connection =
- connect_and_login(context, 0 /* read-write */);
+ connect_and_login(sTlsContext, 0 /* read-write */);
BackupQueries query(*connection, *config, false); // read-only
std::vector<std::string> args;
args.push_back("2"); // object ID
@@ -1303,7 +1326,7 @@ bool test_backup_disappearing_directory()
BackupClientContext clientContext
(
bbackupd, // rLocationResolver
- context,
+ sTlsContext,
"localhost",
BOX_PORT_BBSTORED_TEST,
0x01234567,
@@ -1382,323 +1405,122 @@ bool test_backup_disappearing_directory()
TEARDOWN_TEST_BBACKUPD();
}
-// TODO FIXME check that directory modtimes are backed up by BackupClientDirectoryRecord.
-
-bool test_ssl_keepalives()
+class KeepAliveBackupProtocolLocal : public BackupProtocolLocal2
{
- SETUP_WITH_BBSTORED();
+public:
+ int mNumKeepAlivesSent;
+ int mNumKeepAlivesReceived;
-#ifdef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
- BOX_NOTICE("Skipping intercept-based KeepAlive tests on this platform");
-#else
- // Delete the test_base files unpacked by SETUP_TEST_BBACKUPD()
- TEST_THAT(::system("rm -r testfiles/TestDir1") == 0);
- // Unpack spacetest files instead
- TEST_THAT(::mkdir("testfiles/TestDir1", 0755) == 0);
- TEST_THAT(unpack_files("spacetest1", "testfiles/TestDir1"));
+public:
+ KeepAliveBackupProtocolLocal(int32_t AccountNumber,
+ const std::string& ConnectionDetails,
+ const std::string& AccountRootDir, int DiscSetNumber,
+ bool ReadOnly)
+ : BackupProtocolLocal2(AccountNumber, ConnectionDetails, AccountRootDir,
+ DiscSetNumber, ReadOnly),
+ mNumKeepAlivesSent(0),
+ mNumKeepAlivesReceived(0)
+ { }
- // TODO FIXME dedent
+ std::auto_ptr<BackupProtocolIsAlive> Query(const BackupProtocolGetIsAlive &rQuery)
{
- #ifdef WIN32
- #error TODO: implement threads on Win32, or this test \
- will not finish properly
- #endif
-
- // something to diff against (empty file doesn't work)
- int fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY);
- TEST_THAT(fd > 0);
-
- char buffer[10000];
- memset(buffer, 0, sizeof(buffer));
-
- TEST_EQUAL_LINE(sizeof(buffer),
- write(fd, buffer, sizeof(buffer)),
- "Buffer write");
- TEST_THAT(close(fd) == 0);
-
- wait_for_operation(5, "f1 to be old enough");
+ mNumKeepAlivesSent++;
+ std::auto_ptr<BackupProtocolIsAlive> response =
+ BackupProtocolLocal::Query(rQuery);
+ mNumKeepAlivesReceived++;
+ return response;
}
-
- // sleep to make it old enough to upload
- // is this really necessary? the files have old timestamps.
- bbackupd.RunSyncNow();
+};
- // TODO FIXME dedent
- {
- #ifdef WIN32
- #error TODO: implement threads on Win32, or this test \
- will not finish properly
- #endif
+bool test_ssl_keepalives()
+{
+ SETUP_TEST_BBACKUPD();
- TEST_THAT(unlink("testfiles/bbackupd.log") == 0);
+ KeepAliveBackupProtocolLocal connection(0x01234567, "test", "backup/01234567/",
+ 0, false);
+ MockBackupDaemon bbackupd(connection);
+ TEST_THAT_OR(setup_test_bbackupd(bbackupd), FAIL);
- // write again, to update the file's timestamp
- int fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY);
- TEST_THAT(fd > 0);
- char buffer[10000];
+ // Test that sending a keepalive actually works, when the timeout has expired,
+ // but doesn't send anything at the beginning:
+ {
+ MockClientContext context(
+ bbackupd, // rResolver
+ sTlsContext, // rTLSContext
+ "localhost", // rHostname
+ BOX_PORT_BBSTORED_TEST,
+ 0x01234567, // AccountNumber
+ false, // ExtendedLogging
+ false, // ExtendedLogToFile
+ "", // ExtendedLogFile
+ bbackupd, // rProgressNotifier
+ false, // TcpNiceMode
+ connection); // rClient
+
+ // Set the timeout to 1 second
+ context.SetKeepAliveTime(1);
+
+ // Check that DoKeepAlive() does nothing right now
+ context.DoKeepAlive();
+ TEST_EQUAL(0, connection.mNumKeepAlivesSent);
+
+ // Sleep until just before the timer expires, check that DoKeepAlive()
+ // still does nothing.
+ ShortSleep(MilliSecondsToBoxTime(900), true);
+ context.DoKeepAlive();
+ TEST_EQUAL(0, connection.mNumKeepAlivesSent);
+
+ // Sleep until just after the timer expires, check that DoKeepAlive()
+ // sends a GetIsAlive message now.
+ ShortSleep(MilliSecondsToBoxTime(200), true);
+ context.DoKeepAlive();
+ TEST_EQUAL(1, connection.mNumKeepAlivesSent);
+ TEST_EQUAL(1, connection.mNumKeepAlivesReceived);
+ TEST_EQUAL(3, context.mNumKeepAlivesPolled);
+ }
+
+ // Do the initial backup. There are no existing files to diff, so the only
+ // keepalives polled should be the ones for each directory entry while reading
+ // directories, and the one in UpdateItems(), which is also once per item (file
+ // or directory). test_base.tgz has 16 directory entries, so we expect 2 * 16 = 32
+ // keepalives in total.
+ std::auto_ptr<BackupClientContext> apContext = bbackupd.RunSyncNow();
+ MockClientContext* pContext = (MockClientContext *)(apContext.get());
+ TEST_EQUAL(32, pContext->mNumKeepAlivesPolled);
+ TEST_EQUAL(1, pContext->mKeepAliveTime);
+
+ // Calculate the number of blocks that will be in ./TestDir1/x1/dsfdsfs98.fd,
+ // which is 4269 bytes long.
+ int64_t NumBlocks;
+ int32_t BlockSize, LastBlockSize;
+ BackupStoreFileEncodeStream::CalculateBlockSizes(4269, NumBlocks, BlockSize, LastBlockSize);
+ TEST_EQUAL(4096, BlockSize);
+ TEST_EQUAL(173, LastBlockSize);
+ TEST_EQUAL(2, NumBlocks);
+
+ // Now modify the file and run another backup. It's the only file that should be
+ // diffed, and DoKeepAlive() should be called for each block size in the original
+ // file, times the number of times that block size fits into the new file,
+ // i.e. 1 + (4269 / 256) = 18 times (plus the same 32 while scanning, as above).
+
+ {
+ int fd = open("testfiles/TestDir1/x1/dsfdsfs98.fd", O_WRONLY);
+ TEST_THAT_OR(fd > 0, FAIL);
+
+ char buffer[4000];
memset(buffer, 0, sizeof(buffer));
+
TEST_EQUAL_LINE(sizeof(buffer),
write(fd, buffer, sizeof(buffer)),
"Buffer write");
TEST_THAT(close(fd) == 0);
- wait_for_operation(5, "modified file to be old enough");
-
- // two-second delay on the first read() of f1
- // should mean that a single keepalive is sent,
- // and diff does not abort.
- intercept_setup_delay("testfiles/TestDir1/spacetest/f1",
- 0, 2000, SYS_read, 1);
- bbackupd.RunSyncNow();
- TEST_THAT(intercept_triggered());
- intercept_clear_setup();
-
- // check that keepalive was written to logs, and
- // diff was not aborted, i.e. upload was a diff
- FileStream fs("testfiles/bbackupd.log", O_RDONLY);
- IOStreamGetLine reader(fs);
- bool found1 = false;
-
- while (!reader.IsEOF())
- {
- std::string line;
- TEST_THAT(reader.GetLine(line));
- if (line == "Send GetBlockIndexByName(0x3,\"f1\")")
- {
- found1 = true;
- break;
- }
- }
-
- TEST_THAT_OR(found1, FAIL);
- // TODO FIXME dedent
- {
- std::string line;
- TEST_THAT(reader.GetLine(line));
- std::string comp = "Receive Success(0x";
- TEST_EQUAL_LINE(comp, line.substr(0, comp.size()), line);
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Receiving stream, size 124", line);
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Send GetIsAlive()", line);
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Receive IsAlive()", line);
-
- TEST_THAT(reader.GetLine(line));
- comp = "Send StoreFile(0x3,";
- TEST_EQUAL_LINE(comp, line.substr(0, comp.size()),
- line);
- comp = ",\"f1\")";
- std::string sub = line.substr(line.size() - comp.size());
- TEST_EQUAL_LINE(comp, sub, line);
- std::string comp2 = ",0x0,";
- sub = line.substr(line.size() - comp.size() -
- comp2.size() + 1, comp2.size());
- TEST_LINE(comp2 != sub, line);
- }
-
- // four-second delay on first read() of f1
- // should mean that no keepalives were sent,
- // because diff was immediately aborted
- // before any matching blocks could be found.
- intercept_setup_delay("testfiles/TestDir1/spacetest/f1",
- 0, 4000, SYS_read, 1);
-
- {
- fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY);
- TEST_THAT(fd > 0);
- // write again, to update the file's timestamp
- TEST_EQUAL_LINE(1, write(fd, "z", 1), "Buffer write");
- TEST_THAT(close(fd) == 0);
-
- // wait long enough to put file into sync window
- wait_for_operation(5, "locally modified file to "
- "mature for sync");
-
- bbackupd.RunSyncNow();
- TEST_THAT(intercept_triggered());
- intercept_clear_setup();
- }
- // check that the diff was aborted, i.e. upload was not a diff
- found1 = false;
-
- while (!reader.IsEOF())
- {
- std::string line;
- TEST_THAT(reader.GetLine(line));
- if (line == "Send GetBlockIndexByName(0x3,\"f1\")")
- {
- found1 = true;
- break;
- }
- }
-
- TEST_THAT_OR(found1, FAIL);
- // TODO FIXME dedent
- {
- std::string line;
- TEST_THAT(reader.GetLine(line));
- std::string comp = "Receive Success(0x";
- TEST_EQUAL_LINE(comp, line.substr(0, comp.size()),
- line);
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Receiving stream, size 124", line);
-
- // delaying for 4 seconds in one step means that
- // the diff timer and the keepalive timer will
- // both expire, and the diff timer is honoured first,
- // so there will be no keepalives.
-
- TEST_THAT(reader.GetLine(line));
- comp = "Send StoreFile(0x3,";
- TEST_EQUAL_LINE(comp, line.substr(0, comp.size()),
- line);
- comp = ",0x0,\"f1\")";
- std::string sub = line.substr(line.size() - comp.size());
- TEST_EQUAL_LINE(comp, sub, line);
- }
-
- // Test that keepalives are sent while reading files
- {
- intercept_setup_delay("testfiles/TestDir1/spacetest/f1",
- 0, 1000, SYS_read, 3);
-
- // write again, to update the file's timestamp
- TEST_THAT(touch_and_wait("testfiles/TestDir1/spacetest/f1"));
-
- bbackupd.RunSyncNow();
- TEST_THAT(intercept_triggered());
- intercept_clear_setup();
- }
-
- // check that the diff was aborted, i.e. upload was not a diff
- found1 = false;
-
- while (!reader.IsEOF())
- {
- std::string line;
- TEST_THAT(reader.GetLine(line));
- if (line == "Send GetBlockIndexByName(0x3,\"f1\")")
- {
- found1 = true;
- break;
- }
- }
-
- TEST_THAT_OR(found1, FAIL);
- // TODO FIXME dedent
- {
- std::string line;
- TEST_THAT(reader.GetLine(line));
- std::string comp = "Receive Success(0x";
- TEST_EQUAL_LINE(comp, line.substr(0, comp.size()),
- line);
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Receiving stream, size 124", line);
-
- // delaying for 3 seconds in steps of 1 second
- // means that the keepalive timer will expire 3 times,
- // and on the 3rd time the diff timer will expire too.
- // The diff timer is honoured first, so there will be
- // only two keepalives.
-
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Send GetIsAlive()", line);
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Receive IsAlive()", line);
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Send GetIsAlive()", line);
- TEST_THAT(reader.GetLine(line));
- TEST_EQUAL("Receive IsAlive()", line);
-
- // but two matching blocks should have been found
- // already, so the upload should be a diff.
-
- TEST_THAT(reader.GetLine(line));
- comp = "Send StoreFile(0x3,";
- TEST_EQUAL_LINE(comp, line.substr(0, comp.size()),
- line);
- comp = ",\"f1\")";
- std::string sub = line.substr(line.size() - comp.size());
- TEST_EQUAL_LINE(comp, sub, line);
- std::string comp2 = ",0x0,";
- sub = line.substr(line.size() - comp.size() -
- comp2.size() + 1, comp2.size());
- TEST_LINE(comp2 != sub, line);
- }
-
- // Check that no read error has been reported yet
- TEST_THAT(!TestFileExists("testfiles/notifyran.read-error.1"));
- }
-
- {
- // Test that keepalives are sent while reading large directories
- {
- intercept_setup_readdir_hook("testfiles/TestDir1/spacetest/d1",
- readdir_test_hook_2);
- // time for two keepalives
- readdir_stop_time = time(NULL) + 2;
- TEST_THAT(::unlink("testfiles/bbackupd.log") == 0);
-
- bbackupd.RunSyncNow();
- TEST_THAT(intercept_triggered());
- intercept_clear_setup();
- }
-
- // check that keepalives were sent during the dir search
- FileStream fs("testfiles/bbackupd.log", O_RDONLY);
- IOStreamGetLine reader(fs);
- TEST_EQUAL("Send Version(0x1)", reader.GetLine());
- TEST_EQUAL("Receive Version(0x1)", reader.GetLine());
- TEST_EQUAL("Send Login(0x1234567,0x0)", reader.GetLine());
- TEST_STARTSWITH("Receive LoginConfirmed(", reader.GetLine());
- TEST_EQUAL("Send ListDirectory(0x1,0x2,0xc,false)", reader.GetLine());
- TEST_EQUAL("Receive Success(0x1)", reader.GetLine());
- TEST_STARTSWITH("Receiving stream, size ", reader.GetLine());
- TEST_EQUAL("Send GetIsAlive()", reader.GetLine());
- TEST_EQUAL("Receive IsAlive()", reader.GetLine());
- TEST_EQUAL("Send GetIsAlive()", reader.GetLine());
- TEST_EQUAL("Receive IsAlive()", reader.GetLine());
-
- // Finished reading dir, download to compare. We expect a listing of d1
- // now, but we don't know its directory ID yet, so ask the store for it.
- std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0 /* read-write */);
- int64_t test1_id = GetDirID(*client, "Test1",
- BackupProtocolListDirectory::RootDirectory);
- int64_t spacetest_id = GetDirID(*client, "spacetest", test1_id);
- int64_t d1_id = GetDirID(*client, "d1", spacetest_id);
- std::ostringstream expected;
- expected << "Send ListDirectory(" << BOX_FORMAT_OBJECTID(d1_id) <<
- ",0xffff,0xc,true)";
- TEST_EQUAL(expected.str(), reader.GetLine());
-
- // The following files should be on the server:
- // 00000001 -d---- 00002 (root)
- // 00000002 -d---- 00002 Test1
- // 00000003 -d---- 00002 Test1/spacetest
- // 00000004 f----- 00002 Test1/spacetest/f1
- // 00000005 f----- 00002 Test1/spacetest/f2
- // 00000006 -d---- 00002 Test1/spacetest/d1
- // 00000007 f----- 00002 Test1/spacetest/d1/f3
- // 00000008 f----- 00002 Test1/spacetest/d1/f4
- // 00000009 -d---- 00002 Test1/spacetest/d2
- // 0000000a -d---- 00002 Test1/spacetest/d3
- // 0000000b -d---- 00002 Test1/spacetest/d3/d4
- // 0000000c f----- 00002 Test1/spacetest/d3/d4/f5
- // 0000000d -d---- 00002 Test1/spacetest/d6
- // 0000000e -d---- 00002 Test1/spacetest/d7
- // 0000000f f--o-- 00002 Test1/spacetest/f1
- // 00000010 f--o-- 00002 Test1/spacetest/f1
- // 00000011 f----- 00002 Test1/spacetest/f1
- // This is 34 blocks total.
-
- TEST_THAT(check_num_files(5, 3, 0, 9));
- TEST_THAT(check_num_blocks(*client, 10, 6, 0, 18, 34));
- client->QueryFinished();
+ wait_for_operation(5, "modified file to be old enough");
}
-#endif // PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
+ apContext = bbackupd.RunSyncNow();
+ pContext = (MockClientContext *)(apContext.get());
+ TEST_EQUAL(32 + (4269/4096) + (4269/173), pContext->mNumKeepAlivesPolled);
TEARDOWN_TEST_BBACKUPD();
}
@@ -1752,7 +1574,7 @@ bool test_backup_pauses_when_store_is_full()
// BLOCK
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0 /* read-write */);
+ connect_and_login(sTlsContext, 0 /* read-write */);
TEST_THAT(check_num_files(5, 0, 0, 9));
TEST_THAT(check_num_blocks(*client, 10, 0, 0, 18, 28));
client->QueryFinished();
@@ -1825,7 +1647,7 @@ bool test_backup_pauses_when_store_is_full()
// BLOCK
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context,
+ connect_and_login(sTlsContext,
BackupProtocolLogin::Flags_ReadOnly);
std::auto_ptr<BackupStoreDirectory> root_dir =
ReadDirectory(*client, BACKUPSTORE_ROOT_DIRECTORY_ID);
@@ -1895,7 +1717,7 @@ bool test_bbackupd_exclusions()
// BLOCK
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0 /* read-write */);
+ connect_and_login(sTlsContext, 0 /* read-write */);
TEST_THAT(check_num_files(4, 0, 0, 8));
TEST_THAT(check_num_blocks(*client, 8, 0, 0, 16, 24));
client->QueryFinished();
@@ -1920,7 +1742,7 @@ bool test_bbackupd_exclusions()
// BLOCK
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0 /* read-write */);
+ connect_and_login(sTlsContext, 0 /* read-write */);
TEST_THAT(check_num_files(4, 0, 0, 8));
TEST_THAT(check_num_blocks(*client, 8, 0, 0, 16, 24));
client->QueryFinished();
@@ -1974,7 +1796,7 @@ bool test_bbackupd_exclusions()
#endif
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context,
+ connect_and_login(sTlsContext,
BackupProtocolLogin::Flags_ReadOnly);
std::auto_ptr<BackupStoreDirectory> rootDir =
@@ -2039,7 +1861,7 @@ bool test_bbackupd_exclusions()
BOX_INFO("Checking that the files were removed");
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0 /* read-write */);
+ connect_and_login(sTlsContext, 0 /* read-write */);
std::auto_ptr<BackupStoreDirectory> rootDir =
ReadDirectory(*client);
@@ -2091,7 +1913,7 @@ bool test_bbackupd_exclusions()
// BLOCK
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0 /* read-write */);
+ connect_and_login(sTlsContext, 0 /* read-write */);
TEST_THAT(check_num_files(4, 0, 0, 7));
TEST_THAT(check_num_blocks(*client, 8, 0, 0, 14, 22));
@@ -2399,7 +2221,7 @@ bool test_redundant_locations_deleted_on_time()
TEST_THAT(search_for_file("Test2"));
std::auto_ptr<BackupProtocolCallable> client = connect_and_login(
- context, 0 /* read-write */);
+ sTlsContext, 0 /* read-write */);
std::auto_ptr<BackupStoreDirectory> root_dir =
ReadDirectory(*client, BACKUPSTORE_ROOT_DIRECTORY_ID);
TEST_THAT(test_entry_deleted(*root_dir, "Test2"));
@@ -2576,7 +2398,7 @@ bool test_unicode_filenames_can_be_backed_up()
// Check that we can find it in directory listing
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0);
+ connect_and_login(sTlsContext, 0);
std::auto_ptr<BackupStoreDirectory> dir = ReadDirectory(
*client);
@@ -3556,7 +3378,7 @@ bool test_restore_files_and_directories()
{
// connect and log in
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context,
+ connect_and_login(sTlsContext,
BackupProtocolLogin::Flags_ReadOnly);
// Find the ID of the Test1 directory
@@ -3835,7 +3657,7 @@ bool test_changing_client_store_marker_pauses_daemon()
try
{
std::auto_ptr<BackupProtocolCallable>
- protocol = connect_to_bbstored(context);
+ protocol = connect_to_bbstored(sTlsContext);
// Make sure the marker isn't zero,
// because that's the default, and
// it should have changed
@@ -3932,7 +3754,7 @@ bool test_interrupted_restore_can_be_recovered()
{
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context,
+ connect_and_login(sTlsContext,
BackupProtocolLogin::Flags_ReadOnly);
// Find the ID of the Test1 directory
@@ -3940,7 +3762,7 @@ bool test_interrupted_restore_can_be_recovered()
BackupProtocolListDirectory::RootDirectory);
TEST_THAT_OR(restoredirid != 0, FAIL);
- do_interrupted_restore(context, restoredirid);
+ do_interrupted_restore(sTlsContext, restoredirid);
int64_t resumesize = 0;
TEST_THAT(FileExists("testfiles/"
"restore-interrupt.boxbackupresume",
@@ -3984,7 +3806,7 @@ bool test_interrupted_restore_can_be_recovered()
bool assert_x1_deleted_or_not(bool expected_deleted)
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0 /* read-write */);
+ connect_and_login(sTlsContext, 0 /* read-write */);
std::auto_ptr<BackupStoreDirectory> dir = ReadDirectory(*client);
int64_t testDirId = SearchDir(*dir, "Test1");
@@ -4019,7 +3841,7 @@ bool test_restore_deleted_files()
{
{
std::auto_ptr<BackupProtocolCallable> client =
- connect_and_login(context, 0 /* read-write */);
+ connect_and_login(sTlsContext, 0 /* read-write */);
// Find the ID of the Test1 directory
int64_t restoredirid = GetDirID(*client, "Test1",
@@ -4190,7 +4012,7 @@ int test(int argc, const char *argv[])
rcontroller.Initialise(config->GetKeyValue("RaidFileConf").c_str());
}
- context.Initialise(false /* client */,
+ sTlsContext.Initialise(false /* client */,
"testfiles/clientCerts.pem",
"testfiles/clientPrivKey.pem",
"testfiles/clientTrustedCAs.pem");
diff --git a/test/crypto/testcrypto.cpp b/test/crypto/testcrypto.cpp
index 6d90e5e7..4e623cc2 100644
--- a/test/crypto/testcrypto.cpp
+++ b/test/crypto/testcrypto.cpp
@@ -10,7 +10,6 @@
#include "Box.h"
#include <string.h>
-#include <strings.h>
#include <openssl/rand.h>
#include "Test.h"
diff --git a/test/raidfile/testraidfile.cpp b/test/raidfile/testraidfile.cpp
index 5a62b101..c8150387 100644
--- a/test/raidfile/testraidfile.cpp
+++ b/test/raidfile/testraidfile.cpp
@@ -10,7 +10,6 @@
#include "Box.h"
#include <fcntl.h>
-#include <unistd.h>
#include <stdio.h>
#include <errno.h>