/rusxmms/librcc

To get this branch, use:
bzr branch http://suren.me/webbzr/rusxmms/librcc

« back to all changes in this revision

Viewing changes to src/plugin.c

  • Committer: Suren A. Chilingaryan
  • Date: 2005-06-16 23:14:30 UTC
  • Revision ID: Arch-1:ds@dside.dyndns.org--darksoft-2004%librcc--main--0.1--base-0
Initial Import

Show diffs side-by-side

added added

removed removed

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