[25] | 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 | * RCS: @(#) $Id: dlfcn.h,v 1.2 1998/09/14 18:39:44 stanton Exp $ |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | /* |
---|
| 24 | * @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52 |
---|
| 25 | * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH |
---|
| 26 | * 30159 Hannover, Germany |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #ifndef __dlfcn_h__ |
---|
| 30 | #define __dlfcn_h__ |
---|
| 31 | |
---|
| 32 | #ifndef _TCL |
---|
| 33 | #include <tcl.h> |
---|
| 34 | #endif |
---|
| 35 | |
---|
| 36 | #ifdef __cplusplus |
---|
| 37 | extern "C" { |
---|
| 38 | #endif |
---|
| 39 | |
---|
| 40 | /* |
---|
| 41 | * Mode flags for the dlopen routine. |
---|
| 42 | */ |
---|
| 43 | #define RTLD_LAZY 1 /* lazy function call binding */ |
---|
| 44 | #define RTLD_NOW 2 /* immediate function call binding */ |
---|
| 45 | #define RTLD_GLOBAL 0x100 /* allow symbols to be global */ |
---|
| 46 | |
---|
| 47 | /* |
---|
| 48 | * To be able to intialize, a library may provide a dl_info structure |
---|
| 49 | * that contains functions to be called to initialize and terminate. |
---|
| 50 | */ |
---|
| 51 | struct dl_info { |
---|
| 52 | void (*init) _ANSI_ARGS_((void)); |
---|
| 53 | void (*fini) _ANSI_ARGS_((void)); |
---|
| 54 | }; |
---|
| 55 | |
---|
| 56 | VOID *dlopen _ANSI_ARGS_((const char *path, int mode)); |
---|
| 57 | VOID *dlsym _ANSI_ARGS_((void *handle, const char *symbol)); |
---|
| 58 | char *dlerror _ANSI_ARGS_((void)); |
---|
| 59 | int dlclose _ANSI_ARGS_((void *handle)); |
---|
| 60 | |
---|
| 61 | #ifdef __cplusplus |
---|
| 62 | } |
---|
| 63 | #endif |
---|
| 64 | |
---|
| 65 | #endif /* __dlfcn_h__ */ |
---|