1 /* 2 * dlfcn.h -- 3 * 4 * This file provides a replacement for the header file "dlfcn.h" 5 * on systems where dlfcn.h is missing. It's primary use is for 6 * AIX, where Tcl emulates the dl library. 7 * 8 * This file is subject to the following copyright notice, which is 9 * different from the notice used elsewhere in Tcl but rougly 10 * equivalent in meaning. 11 * 12 * Copyright (c) 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH 13 * Not derived from licensed software. 14 * 15 * Permission is granted to freely use, copy, modify, and redistribute 16 * this software, provided that the author is not construed to be liable 17 * for any results of using the software, alterations are clearly marked 18 * as such, and this notice is not modified. 19 */ 20 21 /* 22 * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH 23 * 30159 Hannover, Germany 24 */ 25 26 #ifndef __dlfcn_h__ 27 #define __dlfcn_h__ 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 /* 34 * Mode flags for the dlopen routine. 35 */ 36 #define RTLD_LAZY 1 /* lazy function call binding */ 37 #define RTLD_NOW 2 /* immediate function call binding */ 38 #define RTLD_GLOBAL 0x100 /* allow symbols to be global */ 39 40 /* 41 * To be able to intialize, a library may provide a dl_info structure 42 * that contains functions to be called to initialize and terminate. 43 */ 44 struct dl_info { 45 void (*init) (void); 46 void (*fini) (void); 47 }; 48 49 void *dlopen (const char *path, int mode); 50 void *dlsym (void *handle, const char *symbol); 51 char *dlerror (void); 52 int dlclose (void *handle); 53 54 #ifdef __cplusplus 55 } 56 #endif 57 58 #endif /* __dlfcn_h__ */ 59