1/* 2 * @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52 3 * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH 4 * 30159 Hannover, Germany 5 */ 6 7#ifndef __dlfcn_h__ 8#define __dlfcn_h__ 9 10#ifdef __cplusplus 11extern "C" { 12#endif 13 14/* 15 * Mode flags for the dlopen routine. 16 */ 17#define RTLD_LAZY 1 /* lazy function call binding */ 18#define RTLD_NOW 2 /* immediate function call binding */ 19#define RTLD_GLOBAL 0x100 /* allow symbols to be global */ 20 21/* 22 * To be able to initialize, a library may provide a dl_info structure 23 * that contains functions to be called to initialize and terminate. 24 */ 25struct dl_info { 26 void (*init)(void); 27 void (*fini)(void); 28}; 29 30#if __STDC__ || defined(_IBMR2) 31void *dlopen(const char *path, int mode); 32void *dlsym(void *handle, const char *symbol); 33char *dlerror(void); 34int dlclose(void *handle); 35#else 36void *dlopen(); 37void *dlsym(); 38char *dlerror(); 39int dlclose(); 40#endif 41 42#ifdef __cplusplus 43} 44#endif 45 46#endif /* __dlfcn_h__ */ 47