[Box Backup-dev] COMMIT r885 - box/chris/merge/lib/common

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Thu, 31 Aug 2006 23:26:54 +0100


Author: chris
Date: 2006-08-31 23:26:54 +0100 (Thu, 31 Aug 2006)
New Revision: 885

Modified:
   box/chris/merge/lib/common/BoxPlatform.h
Log:
Disable intercept tests on Win32 as well

Define O_BINARY to 0 (zero) if our platform doesn't have it (all except
Win32?) which enables us to reduce #ifdefs

(refs #3)


Modified: box/chris/merge/lib/common/BoxPlatform.h
===================================================================
--- box/chris/merge/lib/common/BoxPlatform.h	2006-08-31 22:25:27 UTC (rev 884)
+++ box/chris/merge/lib/common/BoxPlatform.h	2006-08-31 22:26:54 UTC (rev 885)
@@ -40,8 +40,8 @@
 	#endif
 #endif
 
-// Slight hack; disable interception on Darwin within raidfile test
-#ifdef __APPLE__
+// Slight hack; disable interception in raidfile test on Darwin and Windows
+#if defined __APPLE__ || defined WIN32
 	// TODO: Replace with autoconf test
 	#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
 #endif
@@ -138,6 +138,11 @@
 	#define INFTIM -1
 #endif
 
+// for Unix compatibility with Windows :-)
+#if !HAVE_DECL_O_BINARY
+	#define O_BINARY 0
+#endif
+
 #ifdef WIN32
 	typedef u_int64_t InodeRefType;
 #else