summaryrefslogtreecommitdiff
path: root/lib/intercept
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-10-11 22:52:55 +0000
committerChris Wilson <chris+github@qwirx.com>2008-10-11 22:52:55 +0000
commit86bb1916f107ccf361d13770a49c56bf3b039a5e (patch)
tree550f1378660c68439f4bd83f8ac62e7639f812c8 /lib/intercept
parentf49a08317b9c2fffcb333b9a40f877d95bb40071 (diff)
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.
Diffstat (limited to 'lib/intercept')
-rw-r--r--lib/intercept/intercept.cpp4
-rw-r--r--lib/intercept/intercept.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/intercept/intercept.cpp b/lib/intercept/intercept.cpp
index c6399a1c..7a33b610 100644
--- a/lib/intercept/intercept.cpp
+++ b/lib/intercept/intercept.cpp
@@ -232,6 +232,10 @@ int intercept_reterr()
} \
}
+#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, ...)
diff --git a/lib/intercept/intercept.h b/lib/intercept/intercept.h
index 64c42332..80a17d3f 100644
--- a/lib/intercept/intercept.h
+++ b/lib/intercept/intercept.h
@@ -22,9 +22,6 @@ extern "C"
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 */