dlfcn.h 719 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _DLFCN_H
  2. #define _DLFCN_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #if __STDC_VERSION__ >= 199901L
  7. #define __restrict restrict
  8. #elif !defined(__GNUC__)
  9. #define __restrict
  10. #endif
  11. #define RTLD_LAZY 1
  12. #define RTLD_NOW 2
  13. #define RTLD_GLOBAL 256
  14. #define RTLD_LOCAL 0
  15. #define RTLD_NEXT ((void *)-1)
  16. #define RTLD_DEFAULT ((void *)0)
  17. int dlclose(void *);
  18. char *dlerror(void);
  19. void *dlopen(const char *, int);
  20. void *dlsym(void *__restrict, const char *__restrict);
  21. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  22. typedef struct {
  23. const char *dli_fname;
  24. void *dli_fbase;
  25. const char *dli_sname;
  26. void *dli_saddr;
  27. } Dl_info;
  28. int dladdr(void *, Dl_info *);
  29. #endif
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif