summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-12-29 17:18:17 +0000
committerChris Wilson <chris+github@qwirx.com>2006-12-29 17:18:17 +0000
commit34ce26dcc69416489a1520e18a657ea7e8771ae1 (patch)
tree82bc87f0dd3ea797592e6989aaa33538fc69bc75 /lib
parent640786c33e71dd30c98068a7b82f8713f780d9f8 (diff)
Compile fix for platforms without intercept capability (refs #3)
Diffstat (limited to 'lib')
-rw-r--r--lib/common/BoxPlatform.h2
-rw-r--r--lib/intercept/intercept.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h
index 3ae929ef..28822aa8 100644
--- a/lib/common/BoxPlatform.h
+++ b/lib/common/BoxPlatform.h
@@ -51,6 +51,8 @@
#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
#endif
+ #define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
+
// Disable memory testing under Darwin, it just doesn't like it very much.
#ifdef __APPLE__
// TODO: We really should get some decent leak detection code.
diff --git a/lib/intercept/intercept.h b/lib/intercept/intercept.h
index b1122434..bc6557f3 100644
--- a/lib/intercept/intercept.h
+++ b/lib/intercept/intercept.h
@@ -9,6 +9,7 @@
#ifndef INTERCEPT_H
#define INTERCEPT_H
+#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
#include <dirent.h>
@@ -35,8 +36,12 @@ extern "C"
void intercept_setup_error(const char *filename, unsigned int errorafter,
int errortoreturn, int syscalltoerror);
+void intercept_setup_delay(const char *filename, unsigned int delay_after,
+ int delay_ms, int syscall_to_delay, int num_delays);
+bool intercept_triggered();
void intercept_setup_readdir_hook(const char *dirname, readdir_t hookfn);
void intercept_setup_lstat_hook (const char *filename, lstat_t hookfn);
+#endif // !PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
#endif // !INTERCEPT_H