[Box Backup-commit] COMMIT r3484 - in box/trunk: bin/bbackupd lib/common lib/raidfile lib/win32

subversion at boxbackup.org subversion at boxbackup.org
Fri Dec 26 23:16:08 GMT 2014


Author: chris
Date: 2014-12-26 23:16:08 +0000 (Fri, 26 Dec 2014)
New Revision: 3484

Modified:
   box/trunk/bin/bbackupd/BackupDaemon.cpp
   box/trunk/lib/common/BoxPlatform.h
   box/trunk/lib/raidfile/RaidFileRead.cpp
   box/trunk/lib/raidfile/RaidFileWrite.cpp
   box/trunk/lib/win32/emu.h
Log:
Fix more compile errors on MinGW

Modified: box/trunk/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.cpp	2014-12-26 23:16:03 UTC (rev 3483)
+++ box/trunk/bin/bbackupd/BackupDaemon.cpp	2014-12-26 23:16:08 UTC (rev 3484)
@@ -203,7 +203,8 @@
 	  mpProgressNotifier(this),
 	  mpLocationResolver(this),
 	  mpRunStatusProvider(this),
-	  mpSysadminNotifier(this)
+	  mpSysadminNotifier(this),
+	  mapCommandSocketPollTimer(NULL)
 	#ifdef WIN32
 	, mInstallService(false),
 	  mRemoveService(false),
@@ -443,6 +444,9 @@
 	// initialise global timer mechanism
 	Timers::Init();
 	
+	mapCommandSocketPollTimer.reset(new Timer(COMMAND_SOCKET_POLL_INTERVAL,
+		"CommandSocketPollTimer"));
+
 	#ifndef WIN32
 		// Ignore SIGPIPE so that if a command connection is broken,
 		// the daemon doesn't terminate.

Modified: box/trunk/lib/common/BoxPlatform.h
===================================================================
--- box/trunk/lib/common/BoxPlatform.h	2014-12-26 23:16:03 UTC (rev 3483)
+++ box/trunk/lib/common/BoxPlatform.h	2014-12-26 23:16:08 UTC (rev 3484)
@@ -40,9 +40,12 @@
 	#endif
 #endif
 
+#include "emu.h"
+
 #ifdef HAVE_SYS_TYPES_H
 	#include <sys/types.h>
 #endif
+
 #ifdef HAVE_INTTYPES_H
 	#include <inttypes.h>
 #else
@@ -182,8 +185,6 @@
 	#define WIN32_LEAN_AND_MEAN
 #endif
 
-#include "emu.h"
-
 #ifdef WIN32
 	#define INVALID_FILE INVALID_HANDLE_VALUE
 	typedef HANDLE tOSFileHandle;

Modified: box/trunk/lib/raidfile/RaidFileRead.cpp
===================================================================
--- box/trunk/lib/raidfile/RaidFileRead.cpp	2014-12-26 23:16:03 UTC (rev 3483)
+++ box/trunk/lib/raidfile/RaidFileRead.cpp	2014-12-26 23:16:08 UTC (rev 3484)
@@ -44,8 +44,8 @@
 #define READ_NUMBER_DISCS_REQUIRED	3
 #define READV_MAX_BLOCKS		64
 
-// We want to use POSIX fstat() for now, not the emulated one
-#undef fstat
+// We want to use POSIX fstat() for now, not the emulated one, because it's
+// difficult to rewrite all this code to use HANDLEs instead of ints.
 
 // --------------------------------------------------------------------------
 //

Modified: box/trunk/lib/raidfile/RaidFileWrite.cpp
===================================================================
--- box/trunk/lib/raidfile/RaidFileWrite.cpp	2014-12-26 23:16:03 UTC (rev 3483)
+++ box/trunk/lib/raidfile/RaidFileWrite.cpp	2014-12-26 23:16:08 UTC (rev 3484)
@@ -42,8 +42,8 @@
 // Must have this number of discs in the set
 #define TRANSFORM_NUMBER_DISCS_REQUIRED	3
 
-// we want to use POSIX fstat() for now, not the emulated one
-#undef fstat
+// We want to use POSIX fstat() for now, not the emulated one, because it's
+// difficult to rewrite all this code to use HANDLEs instead of ints.
 
 // --------------------------------------------------------------------------
 //

Modified: box/trunk/lib/win32/emu.h
===================================================================
--- box/trunk/lib/win32/emu.h	2014-12-26 23:16:03 UTC (rev 3483)
+++ box/trunk/lib/win32/emu.h	2014-12-26 23:16:08 UTC (rev 3484)
@@ -279,7 +279,7 @@
 #define strtoll _strtoi64
 #endif
 
-inline unsigned int sleep(unsigned int secs)
+extern "C" inline unsigned int sleep(unsigned int secs)
 {
 	Sleep(secs*1000);
 	return(ERROR_SUCCESS);




More information about the Boxbackup-commit mailing list