aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-09-24 20:56:23 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-09-24 20:56:23 -0700
commit2f10b98df9dfb8459bcf8a174c6f851522b932b4 (patch)
treedc81c70e884d06997529c8667cd9e94a4c915485
parent6983a2290487551295765b0f92d1b5c183cbcb31 (diff)
handwritten dlfcn.h; fixes test_dlfcn
-rw-r--r--system/include/dlfcn.h15
-rw-r--r--tools/shared.py1
2 files changed, 16 insertions, 0 deletions
diff --git a/system/include/dlfcn.h b/system/include/dlfcn.h
new file mode 100644
index 00000000..f3439c70
--- /dev/null
+++ b/system/include/dlfcn.h
@@ -0,0 +1,15 @@
+
+extern "C" {
+
+#define RTLD_LAZY 1
+#define RTLD_NOW 2
+#define RTLD_GLOBAL 4
+#define RTLD_LOCAL 8
+
+void *dlopen(const char *, int);
+void *dlsym(void *, const char *);
+int dlclose(void *);
+char *dlerror(void);
+
+}
+
diff --git a/tools/shared.py b/tools/shared.py
index 75804746..ba1f7dcc 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -28,6 +28,7 @@ EXEC_LLVM = path_from_root('tools', 'exec_llvm.py')
# Additional compiler options
COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-nostdinc', '-v', '-U__i386__', '-U__x86_64__', '-U__i386', '-U__x86_64', '-U__SSE__', '-U__SSE2__', '-UX87_DOUBLE_ROUNDING', '-UHAVE_GCC_ASM_FOR_X87'] + [
+ '-I' + path_from_root('system', 'include'),
'-I' + path_from_root('system', 'include', 'libc'),
'-I' + path_from_root('system', 'include', 'libcxx'),
]