Reicher82 / python / sbpython3

Forked from python/sbpython3 3 years ago
Clone
Blob Blame History Raw
#ifndef _CTYPES_DLFCN_H_
#define _CTYPES_DLFCN_H_

#ifndef PY_ALL_STATIC
#error  something went wrong
#endif

#include <dlfcn.h>

#ifdef __cplusplus
extern "C" {
#endif

void *  dlfake_dlopen(const char *, int);
int     dlfake_dlclose(void *);
void *  dlfake_dlsym(void *, const char *);
char *  dlfake_dlerror(void);
int     dlfake_dladdr(const void *, void *);

#define ctypes_dlopen  dlfake_dlopen
#define ctypes_dlclose dlfake_dlclose
#define ctypes_dlsym   dlfake_dlsym
#define ctypes_dladdr  dlfake_dladdr
#define ctypes_dlerror dlfake_dlerror

#ifdef __cplusplus
}
#endif

#endif