summaryrefslogtreecommitdiff
path: root/src/dynlib.h
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2015-11-16 00:36:35 +0100
committerTed Zlatanov <tzz@lifelogs.com>2015-11-18 14:23:53 -0500
commit435cf35bcc28ab4220764dff7874f477310d9a48 (patch)
tree1d0eabdd58b93d90efc424690f830e6a7d0243e1 /src/dynlib.h
parent7cdc5d628a737e2153c38d0d285c9879071beaa7 (diff)
downloademacs-435cf35bcc28ab4220764dff7874f477310d9a48.tar.gz
emacs-435cf35bcc28ab4220764dff7874f477310d9a48.tar.bz2
emacs-435cf35bcc28ab4220764dff7874f477310d9a48.zip
Add portable layer for dynamic loading
* src/dynlib.h: New file. * src/dynlib.c: New file. Co-authored-by: Philipp Stephani <phst@google.com>
Diffstat (limited to 'src/dynlib.h')
-rw-r--r--src/dynlib.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dynlib.h b/src/dynlib.h
new file mode 100644
index 00000000000..229fc960221
--- /dev/null
+++ b/src/dynlib.h
@@ -0,0 +1,14 @@
+#ifndef DYNLIB_H
+#define DYNLIB_H
+
+#include <config.h>
+#include <stdbool.h>
+
+typedef void* dynlib_handle_ptr;
+dynlib_handle_ptr dynlib_open (const char * path);
+void * dynlib_sym (dynlib_handle_ptr h, const char * sym);
+bool dynlib_addr (void *ptr, const char **path, const char **sym);
+const char * dynlib_error (void);
+int dynlib_close (dynlib_handle_ptr h);
+
+#endif /* DYNLIB_H */