Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #ifndef _DLFCN_H |
2 | #define _DLFCN_H | ||||
3 | |||||
Rich Felker | 230f181 | 2011-06-27 01:02:28 -0400 | [diff] [blame] | 4 | #ifdef __cplusplus |
5 | extern "C" { | ||||
6 | #endif | ||||
7 | |||||
Rich Felker | c1a9658 | 2012-09-07 23:13:55 -0400 | [diff] [blame] | 8 | #include <features.h> |
Rich Felker | 400c5e5 | 2012-09-06 22:44:55 -0400 | [diff] [blame] | 9 | |
Rich Felker | 87a30ce | 2011-06-27 01:01:19 -0400 | [diff] [blame] | 10 | #define RTLD_LAZY 1 |
11 | #define RTLD_NOW 2 | ||||
12 | #define RTLD_GLOBAL 256 | ||||
13 | #define RTLD_LOCAL 0 | ||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 14 | |
Rich Felker | 230f181 | 2011-06-27 01:02:28 -0400 | [diff] [blame] | 15 | #define RTLD_NEXT ((void *)-1) |
16 | #define RTLD_DEFAULT ((void *)0) | ||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 17 | |
18 | int dlclose(void *); | ||||
19 | char *dlerror(void); | ||||
20 | void *dlopen(const char *, int); | ||||
Rich Felker | 400c5e5 | 2012-09-06 22:44:55 -0400 | [diff] [blame] | 21 | void *dlsym(void *__restrict, const char *__restrict); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 22 | |
Rich Felker | ac5d085 | 2012-09-06 22:58:34 -0400 | [diff] [blame] | 23 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
Rich Felker | f419bcb | 2012-08-26 21:09:26 -0400 | [diff] [blame] | 24 | typedef struct { |
25 | const char *dli_fname; | ||||
26 | void *dli_fbase; | ||||
27 | const char *dli_sname; | ||||
28 | void *dli_saddr; | ||||
29 | } Dl_info; | ||||
30 | int dladdr(void *, Dl_info *); | ||||
31 | #endif | ||||
32 | |||||
Rich Felker | 230f181 | 2011-06-27 01:02:28 -0400 | [diff] [blame] | 33 | #ifdef __cplusplus |
34 | } | ||||
35 | #endif | ||||
36 | |||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 37 | #endif |