Restore the "GPL licensing not permitted" in GLUT license headers.
[haiku.git] / headers / posix / dlfcn.h
blobe13ca6eee269118ba682f9374c92d623df331b71
1 /*
2 * Copyright 2003-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _DLFCN_H
6 #define _DLFCN_H
9 #include <sys/types.h>
12 #define RTLD_LAZY 0 /* relocations are performed as needed */
13 #define RTLD_NOW 1 /* the file gets relocated at load time */
14 #define RTLD_LOCAL 0 /* symbols are not available for relocating any other object */
15 #define RTLD_GLOBAL 2 /* all symbols are available */
17 /* not-yet-POSIX extensions (dlsym() handles) */
18 #define RTLD_DEFAULT ((void*)0)
19 /* find the symbol in the global scope */
20 #define RTLD_NEXT ((void*)-1L)
21 /* find the next definition of the symbol */
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 /* This is a gnu extension for the dladdr function */
28 typedef struct {
29 const char *dli_fname; /* Filename of defining object */
30 void *dli_fbase; /* Load address of that object */
31 const char *dli_sname; /* Name of nearest lower symbol */
32 void *dli_saddr; /* Exact value of nearest symbol */
33 } Dl_info;
35 extern int dlclose(void *image);
36 extern char *dlerror(void);
37 extern void *dlopen(const char *path, int mode);
38 extern void *dlsym(void *image, const char *symbolName);
39 extern int dladdr(const void *addr, Dl_info *info);
41 #ifdef __cplusplus
43 #endif
45 #endif /* _DLFCN_H */