blob: 53ff00cc75f792b0dee3dcac69168fcfec7d9d7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifdef RCC_PLUGINS
# include <dlfcn.h>
# ifndef RTLD_NOW
# define RTLD_NOW 0
# endif
#endif /* RCC_PLUGINS */
rcc_library_handle rccLibraryOpen(char *filename)
{
#ifdef RCC_PLUGINS
return (rcc_library_handle)dlopen(filename, RTLD_NOW);
#else
return NULL;
#endif /* RCC_PLUGINS */
}
void rccLibraryClose(rcc_library_handle handle)
{
#ifdef RCC_PLUGINS
dlclose(handle);
#endif /* RCC_PLUGINS */
}
void* rccLibraryFind(rcc_library_handle handle, const char *symbol)
{
#ifdef RCC_PLUGINS
return dlsym(handle, symbol);
#else
return NULL;
#endif /* RCC_PLUGINS */
}
|