[Box Backup-commit] COMMIT r2493 - in box/trunk: bin/bbackupctl bin/bbackupobjdump bin/bbackupquery bin/bbstoreaccounts lib/backupclient lib/common lib/raidfile

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Fri Apr 3 11:52:33 BST 2009


Author: chris
Date: 2009-04-03 11:52:32 +0100 (Fri, 03 Apr 2009)
New Revision: 2493

Modified:
   box/trunk/bin/bbackupctl/bbackupctl.cpp
   box/trunk/bin/bbackupobjdump/bbackupobjdump.cpp
   box/trunk/bin/bbackupquery/bbackupquery.cpp
   box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp
   box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
   box/trunk/lib/backupclient/BackupStoreFile.h
   box/trunk/lib/backupclient/BackupStoreFileDiff.cpp
   box/trunk/lib/backupclient/BackupStoreFileEncodeStream.cpp
   box/trunk/lib/common/Configuration.cpp
   box/trunk/lib/common/DebugMemLeakFinder.cpp
   box/trunk/lib/common/Logging.cpp
   box/trunk/lib/common/MemLeakFinder.h
   box/trunk/lib/common/StreamableMemBlock.cpp
   box/trunk/lib/common/Test.h
   box/trunk/lib/common/WaitForEvent.h
   box/trunk/lib/raidfile/RaidFileRead.h
Log:
gcc 4.3 and 4.4 compile fixes, thanks to Reinhard Tartler and the Debian
project. See also:

http://patch-tracking.debian.net/package/boxbackup/0.11~rc2+r2072-1
http://lists.warhead.org.uk/pipermail/boxbackup/2009-April/005159.html


Modified: box/trunk/bin/bbackupctl/bbackupctl.cpp
===================================================================
--- box/trunk/bin/bbackupctl/bbackupctl.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/bin/bbackupctl/bbackupctl.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -9,7 +9,8 @@
 
 #include "Box.h"
 
-#include <stdio.h>
+#include <cstdio>
+#include <cstdlib>
 
 #ifdef HAVE_UNISTD_H
 	#include <unistd.h>

Modified: box/trunk/bin/bbackupobjdump/bbackupobjdump.cpp
===================================================================
--- box/trunk/bin/bbackupobjdump/bbackupobjdump.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/bin/bbackupobjdump/bbackupobjdump.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -9,7 +9,8 @@
 
 #include "Box.h"
 
-#include <stdio.h>
+#include <cstdio>
+#include <cstring>
 
 #include "MainHelper.h"
 #include "FileStream.h"

Modified: box/trunk/bin/bbackupquery/bbackupquery.cpp
===================================================================
--- box/trunk/bin/bbackupquery/bbackupquery.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/bin/bbackupquery/bbackupquery.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -14,7 +14,8 @@
 #endif
 
 #include <errno.h>
-#include <stdio.h>
+#include <cstdio>
+#include <cstdlib>
 
 #ifdef HAVE_SYS_TYPES_H
 	#include <sys/types.h>

Modified: box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp
===================================================================
--- box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -36,6 +36,8 @@
 
 #include "MemLeakFindOn.h"
 
+#include <cstring>
+
 // max size of soft limit as percent of hard limit
 #define MAX_SOFT_LIMIT_SIZE		97
 

Modified: box/trunk/lib/backupclient/BackupClientFileAttributes.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupClientFileAttributes.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/backupclient/BackupClientFileAttributes.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -28,6 +28,8 @@
 #include <sys/xattr.h>
 #endif
 
+#include <cstring>
+
 #include "BackupClientFileAttributes.h"
 #include "CommonException.h"
 #include "FileModificationTime.h"

Modified: box/trunk/lib/backupclient/BackupStoreFile.h
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFile.h	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/backupclient/BackupStoreFile.h	2009-04-03 10:52:32 UTC (rev 2493)
@@ -12,6 +12,7 @@
 
 #include <cstdlib>
 #include <memory>
+#include <cstdlib>
 
 #include "BackupClientFileAttributes.h"
 #include "BackupStoreFilename.h"

Modified: box/trunk/lib/backupclient/BackupStoreFileDiff.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFileDiff.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/backupclient/BackupStoreFileDiff.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -35,6 +35,8 @@
 
 #include "MemLeakFindOn.h"
 
+#include <cstring>
+
 using namespace BackupStoreFileCryptVar;
 using namespace BackupStoreFileCreation;
 

Modified: box/trunk/lib/backupclient/BackupStoreFileEncodeStream.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupStoreFileEncodeStream.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/backupclient/BackupStoreFileEncodeStream.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -26,6 +26,8 @@
 
 #include "MemLeakFindOn.h"
 
+#include <cstring>
+
 using namespace BackupStoreFileCryptVar;
 
 

Modified: box/trunk/lib/common/Configuration.cpp
===================================================================
--- box/trunk/lib/common/Configuration.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/common/Configuration.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -22,6 +22,8 @@
 
 #include "MemLeakFindOn.h"
 
+#include <cstring>
+
 // utility whitespace function
 inline bool iw(int c)
 {

Modified: box/trunk/lib/common/DebugMemLeakFinder.cpp
===================================================================
--- box/trunk/lib/common/DebugMemLeakFinder.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/common/DebugMemLeakFinder.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <set>
+#include <cstdlib> // for std::atexit
 
 #include "MemLeakFinder.h"
 
@@ -130,7 +131,7 @@
 {
 	InternalAllocGuard guard;
 
-	void *b = ::malloc(size);
+	void *b = std::malloc(size);
 	if(!memleakfinder_global_enable) return b;
 	if(!memleakfinder_initialised)   return b;
 
@@ -146,7 +147,7 @@
 
 	if(!memleakfinder_global_enable || !memleakfinder_initialised)
 	{
-		return ::realloc(ptr, size);
+		return std::realloc(ptr, size);
 	}
 
 	// Check it's been allocated
@@ -158,7 +159,7 @@
 			"objects?");
 	}
 
-	void *b = ::realloc(ptr, size);
+	void *b = std::realloc(ptr, size);
 
 	if(ptr && i!=sMallocBlocks.end())
 	{
@@ -215,7 +216,7 @@
 	}
 
 	//TRACE1("free(), %08x\n", ptr);
-	::free(ptr);
+	std::free(ptr);
 }
 
 
@@ -426,7 +427,7 @@
 	atexit_markertext[sizeof(atexit_markertext)-1] = 0;
 	if(!atexit_registered)
 	{
-		atexit(memleakfinder_atexit);
+		std::atexit(memleakfinder_atexit);
 		atexit_registered = true;
 	}
 }
@@ -490,7 +491,7 @@
 
 	{
 		InternalAllocGuard guard;
-		r = ::malloc(size);
+		r = std::malloc(size);
 	}
 	
 	if (sInternalAllocDepth == 0)
@@ -533,7 +534,7 @@
 {
 	InternalAllocGuard guard;
 
-	::free(ptr);
+	std::free(ptr);
 	remove_object_block(ptr);
 	//TRACE1("delete[]() called, %08x\n", ptr);
 }

Modified: box/trunk/lib/common/Logging.cpp
===================================================================
--- box/trunk/lib/common/Logging.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/common/Logging.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -11,7 +11,11 @@
 
 #include <errno.h>
 #include <time.h>
+#include <string.h> // for stderror
 
+// c.f. http://bugs.debian.org/512510
+#include <cstdio>
+
 #ifdef HAVE_SYSLOG_H
 	#include <syslog.h>
 #endif

Modified: box/trunk/lib/common/MemLeakFinder.h
===================================================================
--- box/trunk/lib/common/MemLeakFinder.h	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/common/MemLeakFinder.h	2009-04-03 10:52:32 UTC (rev 2493)
@@ -12,7 +12,7 @@
 
 #ifdef MEMLEAKFINDER_FULL_MALLOC_MONITORING
 	// include stdlib now, to avoid problems with having the macros defined already
-	#include <stdlib.h>
+	#include <cstdlib>
 #endif
 
 // global enable flag

Modified: box/trunk/lib/common/StreamableMemBlock.cpp
===================================================================
--- box/trunk/lib/common/StreamableMemBlock.cpp	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/common/StreamableMemBlock.cpp	2009-04-03 10:52:32 UTC (rev 2493)
@@ -10,7 +10,7 @@
 #include "Box.h"
 
 #include <new>
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 
 #include "StreamableMemBlock.h"

Modified: box/trunk/lib/common/Test.h
===================================================================
--- box/trunk/lib/common/Test.h	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/common/Test.h	2009-04-03 10:52:32 UTC (rev 2493)
@@ -10,7 +10,7 @@
 #ifndef TEST__H
 #define TEST__H
 
-#include <string>
+#include <cstring>
 
 #ifdef WIN32
 #define BBACKUPCTL      "..\\..\\bin\\bbackupctl\\bbackupctl.exe"

Modified: box/trunk/lib/common/WaitForEvent.h
===================================================================
--- box/trunk/lib/common/WaitForEvent.h	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/common/WaitForEvent.h	2009-04-03 10:52:32 UTC (rev 2493)
@@ -22,6 +22,8 @@
 	#endif
 #endif
 
+#include <cstdlib>
+
 #include "CommonException.h"
 
 #include "MemLeakFindOn.h"

Modified: box/trunk/lib/raidfile/RaidFileRead.h
===================================================================
--- box/trunk/lib/raidfile/RaidFileRead.h	2009-04-03 00:17:35 UTC (rev 2492)
+++ box/trunk/lib/raidfile/RaidFileRead.h	2009-04-03 10:52:32 UTC (rev 2493)
@@ -10,7 +10,8 @@
 #ifndef RAIDFILEREAD__H
 #define RAIDFILEREAD__H
 
-#include <string>
+#include <cstring>
+#include <cstdlib>
 #include <memory>
 #include <vector>
 




More information about the Boxbackup-commit mailing list