[Box Backup-commit] COMMIT r2257 - box/trunk/lib/common

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Thu Aug 21 12:08:44 BST 2008


Author: chris
Date: 2008-08-21 12:08:44 +0100 (Thu, 21 Aug 2008)
New Revision: 2257

Modified:
   box/trunk/lib/common/BoxPlatform.h
Log:
Better handle the case where __MSVCRT_VERSION__ is already defined (e.g. 
by wxWidgets) before including Box.h, as long as the defined version is 
high enough, to avoid mutual incompatibility with wxWidgets (needed for 
Boxi).

Define O_BINARY if it's not already defined rather than using configury. 


Modified: box/trunk/lib/common/BoxPlatform.h
===================================================================
--- box/trunk/lib/common/BoxPlatform.h	2008-08-21 11:06:55 UTC (rev 2256)
+++ box/trunk/lib/common/BoxPlatform.h	2008-08-21 11:08:44 UTC (rev 2257)
@@ -30,11 +30,14 @@
 
 #ifdef WIN32
 	#ifdef __MSVCRT_VERSION__
-		#error Must include Box.h before sys/types.h
+		#if __MSVCRT_VERSION__ < 0x0601
+			#error Must include Box.h before sys/types.h
+		#endif
+	#else
+		// need msvcrt version 6.1 or higher for _gmtime64()
+		// must define this before importing <sys/types.h>
+		#define __MSVCRT_VERSION__ 0x0601
 	#endif
-	// need msvcrt version 6.1 or higher for _gmtime64()
-	// must define this before importing <sys/types.h>
-	#define __MSVCRT_VERSION__ 0x0601
 #endif
 
 #ifdef HAVE_SYS_TYPES_H
@@ -153,7 +156,7 @@
 #endif
 
 // for Unix compatibility with Windows :-)
-#if !HAVE_DECL_O_BINARY
+#ifndef O_BINARY
 	#define O_BINARY 0
 #endif
 




More information about the Boxbackup-commit mailing list