summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/bbackupctl/bbackupctl.cpp2
-rw-r--r--bin/bbackupd/BackupDaemon.cpp4
-rw-r--r--bin/bbackupquery/bbackupquery.cpp4
-rw-r--r--bin/bbstored/BackupStoreContext.cpp2
-rw-r--r--infrastructure/buildenv-testmain-template.cpp4
-rwxr-xr-xinfrastructure/makebuildenv.pl.in3
-rw-r--r--infrastructure/msvc/2003/bbackupctl.vcproj4
-rw-r--r--infrastructure/msvc/2003/bbackupd.vcproj4
-rw-r--r--infrastructure/msvc/2003/boxquery.vcproj4
-rw-r--r--infrastructure/msvc/2003/common.vcproj4
-rw-r--r--infrastructure/msvc/2003/win32test.vcproj2
-rw-r--r--infrastructure/msvc/2005/bbackupctl.vcproj2
-rw-r--r--infrastructure/msvc/2005/bbackupd.vcproj2
-rw-r--r--infrastructure/msvc/2005/boxquery.vcproj2
-rw-r--r--infrastructure/msvc/2005/common.vcproj2
-rw-r--r--infrastructure/msvc/2005/win32test.vcproj2
-rw-r--r--lib/backupclient/BackupStoreFile.h2
-rw-r--r--lib/backupclient/BackupStoreFileDiff.cpp20
-rw-r--r--lib/backupclient/BackupStoreFileEncodeStream.cpp2
-rw-r--r--lib/backupstore/BackupStoreCheck.h4
-rw-r--r--lib/backupstore/BackupStoreCheckData.cpp2
-rw-r--r--lib/backupstore/BackupStoreInfo.cpp2
-rw-r--r--lib/backupstore/StoreStructure.h2
-rw-r--r--lib/common/Box.h2
-rw-r--r--lib/common/DebugAssertFailed.cpp4
-rw-r--r--lib/common/DebugMemLeakFinder.cpp4
-rw-r--r--lib/common/DebugPrintf.cpp4
-rw-r--r--lib/common/FdGetLine.h2
-rw-r--r--lib/common/IOStreamGetLine.h2
-rw-r--r--lib/common/Timer.cpp10
-rw-r--r--lib/common/Utils.cpp2
-rw-r--r--lib/compress/CompressStream.cpp2
-rw-r--r--lib/raidfile/RaidFileUtil.cpp4
-rw-r--r--lib/raidfile/RaidFileWrite.cpp2
-rw-r--r--lib/server/Daemon.cpp2
-rw-r--r--lib/server/Protocol.cpp2
-rw-r--r--lib/server/SSLLib.cpp2
-rw-r--r--lib/server/SSLLib.h2
-rw-r--r--lib/server/ServerStream.h2
-rw-r--r--lib/server/SocketStreamTLS.cpp2
-rw-r--r--test/backupdiff/testbackupdiff.cpp2
-rw-r--r--test/common/testcommon.cpp8
42 files changed, 70 insertions, 71 deletions
diff --git a/bin/bbackupctl/bbackupctl.cpp b/bin/bbackupctl/bbackupctl.cpp
index f55c689c..0340f400 100644
--- a/bin/bbackupctl/bbackupctl.cpp
+++ b/bin/bbackupctl/bbackupctl.cpp
@@ -356,7 +356,7 @@ int main(int argc, const char *argv[])
MAINHELPER_END
-#if defined WIN32 && ! defined NDEBUG
+#if defined WIN32 && ! defined BOX_RELEASE_BUILD
closelog();
#endif
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index f192f763..7ddaba40 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -1522,12 +1522,12 @@ void BackupDaemon::SetupLocations(BackupClientContext &rClientContext, const Con
#endif // HAVE_STRUCT_MNTENT_MNT_DIR
// Check sorting and that things are as we expect
ASSERT(mountPoints.size() > 0);
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
{
std::set<std::string, mntLenCompare>::reverse_iterator i(mountPoints.rbegin());
ASSERT(*i == "/");
}
-#endif // n NDEBUG
+#endif // n BOX_RELEASE_BUILD
#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME || n HAVE_STRUCT_STATVFS_F_MNTONNAME
#endif // HAVE_MOUNTS
diff --git a/bin/bbackupquery/bbackupquery.cpp b/bin/bbackupquery/bbackupquery.cpp
index 31c28046..bbe8dd14 100644
--- a/bin/bbackupquery/bbackupquery.cpp
+++ b/bin/bbackupquery/bbackupquery.cpp
@@ -94,7 +94,7 @@ int main(int argc, const char *argv[])
#endif
// Really don't want trace statements happening, even in debug mode
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
BoxDebugTraceOn = false;
#endif
@@ -114,7 +114,7 @@ int main(int argc, const char *argv[])
Logging::SetProgramName("bbackupquery");
- #ifdef NDEBUG
+ #ifdef BOX_RELEASE_BUILD
int masterLevel = Log::NOTICE; // need an int to do math with
#else
int masterLevel = Log::INFO; // need an int to do math with
diff --git a/bin/bbstored/BackupStoreContext.cpp b/bin/bbstored/BackupStoreContext.cpp
index f8108beb..990be05d 100644
--- a/bin/bbstored/BackupStoreContext.cpp
+++ b/bin/bbstored/BackupStoreContext.cpp
@@ -33,7 +33,7 @@
// Maximum number of directories to keep in the cache
// When the cache is bigger than this, everything gets
// deleted.
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
#define MAX_CACHE_SIZE 32
#else
#define MAX_CACHE_SIZE 2
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp
index 0099b0d0..b646a27b 100644
--- a/infrastructure/buildenv-testmain-template.cpp
+++ b/infrastructure/buildenv-testmain-template.cpp
@@ -43,7 +43,7 @@
int test(int argc, const char *argv[]);
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
#define MODE_TEXT "release"
#else
#define MODE_TEXT "debug"
@@ -167,7 +167,7 @@ int main(int argc, char * const * argv)
Logging::SetProgramName(BOX_MODULE);
#ifdef HAVE_GETOPT_H
- #ifdef NDEBUG
+ #ifdef BOX_RELEASE_BUILD
int logLevel = Log::NOTICE; // need an int to do math with
#else
int logLevel = Log::INFO; // need an int to do math with
diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in
index 8b91b972..5ed4a0ab 100755
--- a/infrastructure/makebuildenv.pl.in
+++ b/infrastructure/makebuildenv.pl.in
@@ -457,7 +457,6 @@ __E
if (-d "$module/testfiles")
{
print TESTFILE <<__E;
-echo Killing any running daemons...
kill_process bbackupd
kill_process bbstored
__E
@@ -560,7 +559,7 @@ DEFAULT_CXXFLAGS = @CPPFLAGS@ $default_cxxflags @CXXFLAGS_STRICT@ \\
LDFLAGS = @LDFLAGS@ @LDADD_RDYNAMIC@
.ifdef RELEASE
-CXXFLAGS = -DNDEBUG $release_flags \$(DEFAULT_CXXFLAGS)
+CXXFLAGS = -DBOX_RELEASE_BUILD $release_flags \$(DEFAULT_CXXFLAGS)
OUTBASE = ../../release
OUTDIR = ../../release/$mod
DEPENDMAKEFLAGS = -D RELEASE
diff --git a/infrastructure/msvc/2003/bbackupctl.vcproj b/infrastructure/msvc/2003/bbackupctl.vcproj
index b2249ff8..02f7482e 100644
--- a/infrastructure/msvc/2003/bbackupctl.vcproj
+++ b/infrastructure/msvc/2003/bbackupctl.vcproj
@@ -20,7 +20,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -72,7 +72,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2003/bbackupd.vcproj b/infrastructure/msvc/2003/bbackupd.vcproj
index 182c10a2..f34db0cc 100644
--- a/infrastructure/msvc/2003/bbackupd.vcproj
+++ b/infrastructure/msvc/2003/bbackupd.vcproj
@@ -20,7 +20,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\include&quot;;&quot;$(SolutionDir)..\..\..\..\zlib\include&quot;;&quot;$(SolutionDir)..\..\..\lib\backupclient&quot;;&quot;$(SolutionDir)..\..\..\lib\server&quot;;&quot;$(SolutionDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\lib\compress&quot;;&quot;$(SolutionDir)..\..\..\lib\win32&quot;;&quot;$(SolutionDir)..\..\..\lib\common\&quot;"
- PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -73,7 +73,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2003/boxquery.vcproj b/infrastructure/msvc/2003/boxquery.vcproj
index 8d8cf20c..6ac09024 100644
--- a/infrastructure/msvc/2003/boxquery.vcproj
+++ b/infrastructure/msvc/2003/boxquery.vcproj
@@ -21,7 +21,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
- PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -73,7 +73,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2003/common.vcproj b/infrastructure/msvc/2003/common.vcproj
index bdae0bb8..fb18b76a 100644
--- a/infrastructure/msvc/2003/common.vcproj
+++ b/infrastructure/msvc/2003/common.vcproj
@@ -20,7 +20,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0\&quot;"
- PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -64,7 +64,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0\&quot;"
- PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;NDEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2003/win32test.vcproj b/infrastructure/msvc/2003/win32test.vcproj
index e758be34..2ef7164e 100644
--- a/infrastructure/msvc/2003/win32test.vcproj
+++ b/infrastructure/msvc/2003/win32test.vcproj
@@ -72,7 +72,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/bbackupctl.vcproj b/infrastructure/msvc/2005/bbackupctl.vcproj
index 620ca6e6..216a284b 100644
--- a/infrastructure/msvc/2005/bbackupctl.vcproj
+++ b/infrastructure/msvc/2005/bbackupctl.vcproj
@@ -123,7 +123,7 @@
Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/bbackupd.vcproj b/infrastructure/msvc/2005/bbackupd.vcproj
index 8a1d71e3..ac8eb86a 100644
--- a/infrastructure/msvc/2005/bbackupd.vcproj
+++ b/infrastructure/msvc/2005/bbackupd.vcproj
@@ -124,7 +124,7 @@
Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/boxquery.vcproj b/infrastructure/msvc/2005/boxquery.vcproj
index 24136106..776c0ac9 100644
--- a/infrastructure/msvc/2005/boxquery.vcproj
+++ b/infrastructure/msvc/2005/boxquery.vcproj
@@ -123,7 +123,7 @@
Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/common.vcproj b/infrastructure/msvc/2005/common.vcproj
index a732ca36..256bce06 100644
--- a/infrastructure/msvc/2005/common.vcproj
+++ b/infrastructure/msvc/2005/common.vcproj
@@ -111,7 +111,7 @@
Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\..\pcre\pcre-6.7\&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/win32test.vcproj b/infrastructure/msvc/2005/win32test.vcproj
index 62d812f3..0f97c302 100644
--- a/infrastructure/msvc/2005/win32test.vcproj
+++ b/infrastructure/msvc/2005/win32test.vcproj
@@ -123,7 +123,7 @@
Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/lib/backupclient/BackupStoreFile.h b/lib/backupclient/BackupStoreFile.h
index d7a71318..7bd75fa5 100644
--- a/lib/backupclient/BackupStoreFile.h
+++ b/lib/backupclient/BackupStoreFile.h
@@ -215,7 +215,7 @@ public:
static BackupStoreFileStats msStats;
// For debug
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
static bool TraceDetailsOfDiffProcess;
#endif
diff --git a/lib/backupclient/BackupStoreFileDiff.cpp b/lib/backupclient/BackupStoreFileDiff.cpp
index da0324fd..87cf7cff 100644
--- a/lib/backupclient/BackupStoreFileDiff.cpp
+++ b/lib/backupclient/BackupStoreFileDiff.cpp
@@ -40,7 +40,7 @@ using namespace BackupStoreFileCreation;
// By default, don't trace out details of the diff as we go along -- would fill up logs significantly.
// But it's useful for the test.
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
bool BackupStoreFile::TraceDetailsOfDiffProcess = false;
#endif
@@ -436,7 +436,7 @@ static void FindMostUsedSizes(BlocksAvailableEntry *pIndex, int64_t NumBlocks, i
}
// trace the size table in debug builds
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
if(BackupStoreFile::TraceDetailsOfDiffProcess)
{
for(int t = 0; t < BACKUP_FILE_DIFF_MAX_BLOCK_SIZES; ++t)
@@ -728,7 +728,7 @@ static void SearchForMatchingBlocks(IOStream &rFile, std::map<int64_t, int64_t>
throw;
}
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
if(BackupStoreFile::TraceDetailsOfDiffProcess)
{
// Trace out the found blocks in debug mode
@@ -810,7 +810,7 @@ static bool SecondStageMatch(BlocksAvailableEntry *pFirstInHashList, RollingChec
ASSERT(pFirstInHashList != 0);
ASSERT(pIndex != 0);
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
uint16_t DEBUG_Hash = fastSum.GetComponentForHashing();
#endif
uint32_t Checksum = fastSum.GetChecksum();
@@ -916,7 +916,7 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA
instruction.mSpaceBefore = SizeOfInputFile;
rRecipe.push_back(instruction);
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
if(BackupStoreFile::TraceDetailsOfDiffProcess)
{
BOX_TRACE("Diff: Default recipe generated, " <<
@@ -936,7 +936,7 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA
ASSERT(i != rFoundBlocks.end()); // check logic
// Counting for debug tracing
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
int64_t debug_NewBytesFound = 0;
int64_t debug_OldBlocksUsed = 0;
#endif
@@ -963,7 +963,7 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA
instruction.mSpaceBefore = i->first - loc;
// Move location forward to match
loc += instruction.mSpaceBefore;
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
debug_NewBytesFound += instruction.mSpaceBefore;
#endif
}
@@ -989,7 +989,7 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA
instruction.mBlocks += 1;
}
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
debug_OldBlocksUsed++;
#endif
@@ -1005,14 +1005,14 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA
{
RESET_INSTRUCTION
instruction.mSpaceBefore = SizeOfInputFile - loc;
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
debug_NewBytesFound += instruction.mSpaceBefore;
#endif
rRecipe.push_back(instruction);
}
// dump out the recipe
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
BOX_TRACE("Diff: " <<
debug_NewBytesFound << " new bytes found, " <<
debug_OldBlocksUsed << " old blocks used");
diff --git a/lib/backupclient/BackupStoreFileEncodeStream.cpp b/lib/backupclient/BackupStoreFileEncodeStream.cpp
index 3b45e6c0..b2d44697 100644
--- a/lib/backupclient/BackupStoreFileEncodeStream.cpp
+++ b/lib/backupclient/BackupStoreFileEncodeStream.cpp
@@ -236,7 +236,7 @@ void BackupStoreFileEncodeStream::Setup(const char *Filename,
{
throw std::bad_alloc();
}
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
// In debug builds, make sure that the reallocation code is exercised.
mEncodedBuffer.Allocate(mAllocatedBufferSize / 4);
#else
diff --git a/lib/backupstore/BackupStoreCheck.h b/lib/backupstore/BackupStoreCheck.h
index 3f48312a..1d5c1b1e 100644
--- a/lib/backupstore/BackupStoreCheck.h
+++ b/lib/backupstore/BackupStoreCheck.h
@@ -48,7 +48,7 @@ The following problems can be fixed:
// Size of blocks in the list of IDs
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
#define BACKUPSTORECHECK_BLOCK_SIZE (64*1024)
#else
#define BACKUPSTORECHECK_BLOCK_SIZE 8
@@ -150,7 +150,7 @@ private:
return (pBlock->mFlags[Index / Flags__NumItemsPerEntry] >> ((Index % Flags__NumItemsPerEntry) * Flags__NumFlags)) & Flags__MASK;
}
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
void DumpObjectInfo();
#define DUMP_OBJECT_INFO DumpObjectInfo();
#else
diff --git a/lib/backupstore/BackupStoreCheckData.cpp b/lib/backupstore/BackupStoreCheckData.cpp
index aeb96173..fed0c3f1 100644
--- a/lib/backupstore/BackupStoreCheckData.cpp
+++ b/lib/backupstore/BackupStoreCheckData.cpp
@@ -174,7 +174,7 @@ BackupStoreCheck::IDBlock *BackupStoreCheck::LookupID(BackupStoreCheck_ID_t ID,
}
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
// --------------------------------------------------------------------------
//
// Function
diff --git a/lib/backupstore/BackupStoreInfo.cpp b/lib/backupstore/BackupStoreInfo.cpp
index 70d51a12..1d55fdf0 100644
--- a/lib/backupstore/BackupStoreInfo.cpp
+++ b/lib/backupstore/BackupStoreInfo.cpp
@@ -55,7 +55,7 @@ typedef struct
END_STRUCTURE_PACKING_FOR_WIRE
#endif
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
#define NUM_DELETED_DIRS_BLOCK 256
#else
#define NUM_DELETED_DIRS_BLOCK 2
diff --git a/lib/backupstore/StoreStructure.h b/lib/backupstore/StoreStructure.h
index 094c0deb..ffbe83dd 100644
--- a/lib/backupstore/StoreStructure.h
+++ b/lib/backupstore/StoreStructure.h
@@ -12,7 +12,7 @@
#include <string>
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
#define STORE_ID_SEGMENT_LENGTH 8
#define STORE_ID_SEGMENT_MASK 0xff
#else
diff --git a/lib/common/Box.h b/lib/common/Box.h
index 6b50ade1..1124a062 100644
--- a/lib/common/Box.h
+++ b/lib/common/Box.h
@@ -37,7 +37,7 @@
#include "CommonException.h"
#include "Logging.h"
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
extern bool AssertFailuresToSyslog;
#define ASSERT_FAILS_TO_SYSLOG_ON {AssertFailuresToSyslog = true;}
diff --git a/lib/common/DebugAssertFailed.cpp b/lib/common/DebugAssertFailed.cpp
index cceab0ef..e498d641 100644
--- a/lib/common/DebugAssertFailed.cpp
+++ b/lib/common/DebugAssertFailed.cpp
@@ -7,7 +7,7 @@
//
// --------------------------------------------------------------------------
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
#include "Box.h"
@@ -33,5 +33,5 @@ void BoxDebugAssertFailed(const char *cond, const char *file, int line)
}
-#endif // NDEBUG
+#endif // BOX_RELEASE_BUILD
diff --git a/lib/common/DebugMemLeakFinder.cpp b/lib/common/DebugMemLeakFinder.cpp
index 90372a72..230d7163 100644
--- a/lib/common/DebugMemLeakFinder.cpp
+++ b/lib/common/DebugMemLeakFinder.cpp
@@ -8,7 +8,7 @@
// --------------------------------------------------------------------------
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
#include "Box.h"
@@ -548,4 +548,4 @@ void operator delete(void *ptr) throw ()
internal_delete(ptr);
}
-#endif // NDEBUG
+#endif // BOX_RELEASE_BUILD
diff --git a/lib/common/DebugPrintf.cpp b/lib/common/DebugPrintf.cpp
index 8d75f458..1335d473 100644
--- a/lib/common/DebugPrintf.cpp
+++ b/lib/common/DebugPrintf.cpp
@@ -7,7 +7,7 @@
//
// --------------------------------------------------------------------------
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
#include "Box.h"
@@ -80,4 +80,4 @@ int BoxDebugTrace(const char *format, ...)
}
-#endif // NDEBUG
+#endif // BOX_RELEASE_BUILD
diff --git a/lib/common/FdGetLine.h b/lib/common/FdGetLine.h
index a18007a3..df43c3c9 100644
--- a/lib/common/FdGetLine.h
+++ b/lib/common/FdGetLine.h
@@ -12,7 +12,7 @@
#include <string>
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
#define FDGETLINE_BUFFER_SIZE 1024
#elif defined WIN32
// need enough space for at least one unicode character
diff --git a/lib/common/IOStreamGetLine.h b/lib/common/IOStreamGetLine.h
index cf152e5a..9a5d1818 100644
--- a/lib/common/IOStreamGetLine.h
+++ b/lib/common/IOStreamGetLine.h
@@ -14,7 +14,7 @@
#include "IOStream.h"
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
#define IOSTREAMGETLINE_BUFFER_SIZE 1024
#else
#define IOSTREAMGETLINE_BUFFER_SIZE 4
diff --git a/lib/common/Timer.cpp b/lib/common/Timer.cpp
index b4629ed2..cac86512 100644
--- a/lib/common/Timer.cpp
+++ b/lib/common/Timer.cpp
@@ -347,7 +347,7 @@ Timer::Timer(size_t timeoutSecs, const std::string& rName)
, mTimerHandle(INVALID_HANDLE_VALUE)
#endif
{
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
if (timeoutSecs == 0)
{
BOX_TRACE(TIMER_ID "initialised for " << timeoutSecs <<
@@ -476,7 +476,7 @@ void Timer::Stop()
Timer::~Timer()
{
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
BOX_TRACE(TIMER_ID "destroyed");
#endif
@@ -503,7 +503,7 @@ Timer::Timer(const Timer& rToCopy)
, mTimerHandle(INVALID_HANDLE_VALUE)
#endif
{
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
if (mExpired)
{
BOX_TRACE(TIMER_ID "initialised from timer " << &rToCopy << ", "
@@ -544,7 +544,7 @@ Timer::Timer(const Timer& rToCopy)
Timer& Timer::operator=(const Timer& rToCopy)
{
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
if (rToCopy.mExpired)
{
BOX_TRACE(TIMER_ID "initialised from timer " << &rToCopy << ", "
@@ -595,7 +595,7 @@ Timer& Timer::operator=(const Timer& rToCopy)
void Timer::OnExpire()
{
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
BOX_TRACE(TIMER_ID "fired");
#endif
diff --git a/lib/common/Utils.cpp b/lib/common/Utils.cpp
index c259edeb..408eaa57 100644
--- a/lib/common/Utils.cpp
+++ b/lib/common/Utils.cpp
@@ -58,7 +58,7 @@ void SplitString(const std::string &String, char SplitOn, std::vector<std::strin
{
rOutput.push_back(String.substr(b));
}
-/*#ifndef NDEBUG
+/*#ifndef BOX_RELEASE_BUILD
BOX_TRACE("Splitting string '" << String << " on " << (char)SplitOn);
for(unsigned int l = 0; l < rOutput.size(); ++l)
{
diff --git a/lib/compress/CompressStream.cpp b/lib/compress/CompressStream.cpp
index 322b203b..9bb73e3d 100644
--- a/lib/compress/CompressStream.cpp
+++ b/lib/compress/CompressStream.cpp
@@ -19,7 +19,7 @@
#include "MemLeakFindOn.h"
// How big a buffer to use
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
// debug!
#define BUFFER_SIZE 256
#else
diff --git a/lib/raidfile/RaidFileUtil.cpp b/lib/raidfile/RaidFileUtil.cpp
index 84ff2060..079d14d0 100644
--- a/lib/raidfile/RaidFileUtil.cpp
+++ b/lib/raidfile/RaidFileUtil.cpp
@@ -58,7 +58,7 @@ RaidFileUtil::ExistType RaidFileUtil::RaidFileExists(RaidFileDiscSet &rDiscSet,
if(pRevisionID != 0)
{
(*pRevisionID) = FileModificationTime(st);
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
// The resolution of timestamps may be very
// low, e.g. 1 second. So add the size to it
// to give a bit more chance of it changing.
@@ -107,7 +107,7 @@ RaidFileUtil::ExistType RaidFileUtil::RaidFileExists(RaidFileDiscSet &rDiscSet,
if(pRevisionID != 0)
{
(*pRevisionID) = revisionID;
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
// The resolution of timestamps may be very low, e.g.
// 1 second. So add the size to it to give a bit more
// chance of it changing.
diff --git a/lib/raidfile/RaidFileWrite.cpp b/lib/raidfile/RaidFileWrite.cpp
index ab405c6f..efec43a2 100644
--- a/lib/raidfile/RaidFileWrite.cpp
+++ b/lib/raidfile/RaidFileWrite.cpp
@@ -390,7 +390,7 @@ void RaidFileWrite::TransformToRaidStorage()
// // DEBUG MODE -- check file system size block size is same as block size for files
// // doesn't really apply, as space benefits of using fragment size are worth efficiency,
// // and anyway, it'll be buffered eventually so it won't matter.
-// #ifndef NDEBUG
+// #ifndef BOX_RELEASE_BUILD
// {
// if(writeFileStat.st_blksize != blockSize)
// {
diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp
index 4d7cbb34..3c21f6f9 100644
--- a/lib/server/Daemon.cpp
+++ b/lib/server/Daemon.cpp
@@ -296,7 +296,7 @@ int Daemon::Main(const char *DefaultConfigFile, int argc, const char *argv[])
mConfigFileName = DefaultConfigFile;
mAppName = argv[0];
- #ifdef NDEBUG
+ #ifdef BOX_RELEASE_BUILD
mLogLevel = Log::NOTICE; // need an int to do math with
#else
mLogLevel = Log::INFO; // need an int to do math with
diff --git a/lib/server/Protocol.cpp b/lib/server/Protocol.cpp
index 41f60e5a..5dc5d0b1 100644
--- a/lib/server/Protocol.cpp
+++ b/lib/server/Protocol.cpp
@@ -26,7 +26,7 @@
#include "MemLeakFindOn.h"
-#ifdef NDEBUG
+#ifdef BOX_RELEASE_BUILD
#define PROTOCOL_ALLOCATE_SEND_BLOCK_CHUNK 1024
#else
// #define PROTOCOL_ALLOCATE_SEND_BLOCK_CHUNK 1024
diff --git a/lib/server/SSLLib.cpp b/lib/server/SSLLib.cpp
index c4d71f78..de7a941b 100644
--- a/lib/server/SSLLib.cpp
+++ b/lib/server/SSLLib.cpp
@@ -23,7 +23,7 @@
#include "MemLeakFindOn.h"
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
bool SSLLib__TraceErrors = false;
#endif
diff --git a/lib/server/SSLLib.h b/lib/server/SSLLib.h
index 5802a601..ff4aab19 100644
--- a/lib/server/SSLLib.h
+++ b/lib/server/SSLLib.h
@@ -10,7 +10,7 @@
#ifndef SSLLIB__H
#define SSLLIB__H
-#ifndef NDEBUG
+#ifndef BOX_RELEASE_BUILD
extern bool SSLLib__TraceErrors;
#define SET_DEBUG_SSLLIB_TRACE_ERRORS {SSLLib__TraceErrors = true;}
#else
diff --git a/lib/server/ServerStream.h b/lib/server/ServerStream.h
index c7d81740..34de7def 100644
--- a/lib/server/ServerStream.h
+++ b/lib/server/ServerStream.h
@@ -108,7 +108,7 @@ public:
{
// Child task, dump leaks to trace, which we make sure is on
#ifdef BOX_MEMORY_LEAK_TESTING
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
TRACE_TO_SYSLOG(true);
TRACE_TO_STDOUT(true);
#endif
diff --git a/lib/server/SocketStreamTLS.cpp b/lib/server/SocketStreamTLS.cpp
index 5b7bf646..979aee9b 100644
--- a/lib/server/SocketStreamTLS.cpp
+++ b/lib/server/SocketStreamTLS.cpp
@@ -391,7 +391,7 @@ void SocketStreamTLS::Write(const void *pBuffer, int NBytes)
case SSL_ERROR_WANT_WRITE:
// wait for the requried data
{
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
bool conditionmet =
#endif
WaitWhenRetryRequired(se, IOStream::TimeOutInfinite);
diff --git a/test/backupdiff/testbackupdiff.cpp b/test/backupdiff/testbackupdiff.cpp
index d735befa..816f50d1 100644
--- a/test/backupdiff/testbackupdiff.cpp
+++ b/test/backupdiff/testbackupdiff.cpp
@@ -388,7 +388,7 @@ void test_combined_diffs()
int test(int argc, const char *argv[])
{
// Want to trace out all the details
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
#ifndef WIN32
BackupStoreFile::TraceDetailsOfDiffProcess = true;
#endif
diff --git a/test/common/testcommon.cpp b/test/common/testcommon.cpp
index 9d24a882..da2133cd 100644
--- a/test/common/testcommon.cpp
+++ b/test/common/testcommon.cpp
@@ -298,7 +298,7 @@ int test(int argc, const char *argv[])
// Check that using timer methods without initialisation
// throws an assertion failure. Can only do this in debug mode
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
TEST_CHECK_THROWS(Timers::Add(*(Timer*)NULL),
CommonException, AssertFailed);
TEST_CHECK_THROWS(Timers::Remove(*(Timer*)NULL),
@@ -306,7 +306,7 @@ int test(int argc, const char *argv[])
#endif
// TEST_CHECK_THROWS(Timers::Signal(), CommonException, AssertFailed);
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
TEST_CHECK_THROWS(Timers::Cleanup(), CommonException,
AssertFailed);
#endif
@@ -315,7 +315,7 @@ int test(int argc, const char *argv[])
Timers::Init();
// Check that double initialisation throws an exception
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
TEST_CHECK_THROWS(Timers::Init(), CommonException,
AssertFailed);
#endif
@@ -324,7 +324,7 @@ int test(int argc, const char *argv[])
Timers::Cleanup();
// Check that double cleanup throws an exception
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
TEST_CHECK_THROWS(Timers::Cleanup(), CommonException,
AssertFailed);
#endif