[Box Backup-commit] COMMIT r2351 - box/trunk/lib/intercept

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Sat Oct 11 23:52:55 BST 2008


Author: chris
Date: 2008-10-11 23:52:55 +0100 (Sat, 11 Oct 2008)
New Revision: 2351

Modified:
   box/trunk/lib/intercept/intercept.cpp
   box/trunk/lib/intercept/intercept.h
Log:
Ensure that _FILE_OFFSET_BITS is defined before testing its value.

Move definition of DEFINE_ONLY_OPEN64 into intercept.cpp which is
the only place that should use it.


Modified: box/trunk/lib/intercept/intercept.cpp
===================================================================
--- box/trunk/lib/intercept/intercept.cpp	2008-10-11 21:56:35 UTC (rev 2350)
+++ box/trunk/lib/intercept/intercept.cpp	2008-10-11 22:52:55 UTC (rev 2351)
@@ -232,6 +232,10 @@
 		} \
 	}
 
+#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
+	#define DEFINE_ONLY_OPEN64
+#endif
+
 extern "C" int
 #ifdef DEFINE_ONLY_OPEN64
 	open64(const char *path, int flags, ...)

Modified: box/trunk/lib/intercept/intercept.h
===================================================================
--- box/trunk/lib/intercept/intercept.h	2008-10-11 21:56:35 UTC (rev 2350)
+++ box/trunk/lib/intercept/intercept.h	2008-10-11 22:52:55 UTC (rev 2351)
@@ -22,9 +22,6 @@
 	typedef struct dirent *(readdir_t) (DIR *dir);
 	typedef struct dirent *(readdir_t) (DIR *dir);
 	typedef int            (closedir_t)(DIR *dir);
-#if _FILE_OFFSET_BITS == 64
-	#define DEFINE_ONLY_OPEN64
-#endif
 #if defined __GNUC__ && __GNUC__ >= 2
 	#define LINUX_WEIRD_LSTAT
 	#define STAT_STRUCT struct stat /* should be stat64 */




More information about the Boxbackup-commit mailing list