sl@0: /* sl@0: * dlfcn.h -- sl@0: * sl@0: * This file provides a replacement for the header file "dlfcn.h" sl@0: * on systems where dlfcn.h is missing. It's primary use is for sl@0: * AIX, where Tcl emulates the dl library. sl@0: * sl@0: * This file is subject to the following copyright notice, which is sl@0: * different from the notice used elsewhere in Tcl but rougly sl@0: * equivalent in meaning. sl@0: * sl@0: * Copyright (c) 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH sl@0: * Not derived from licensed software. sl@0: * sl@0: * Permission is granted to freely use, copy, modify, and redistribute sl@0: * this software, provided that the author is not construed to be liable sl@0: * for any results of using the software, alterations are clearly marked sl@0: * as such, and this notice is not modified. sl@0: * sl@0: * RCS: @(#) $Id: dlfcn.h,v 1.2 1998/09/14 18:39:44 stanton Exp $ sl@0: */ sl@0: sl@0: /* sl@0: * @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52 sl@0: * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH sl@0: * 30159 Hannover, Germany sl@0: */ sl@0: sl@0: #ifndef __dlfcn_h__ sl@0: #define __dlfcn_h__ sl@0: sl@0: #ifndef _TCL sl@0: #include "tcl.h" sl@0: #endif sl@0: sl@0: #ifdef __cplusplus sl@0: extern "C" { sl@0: #endif sl@0: sl@0: /* sl@0: * Mode flags for the dlopen routine. sl@0: */ sl@0: #define RTLD_LAZY 1 /* lazy function call binding */ sl@0: #define RTLD_NOW 2 /* immediate function call binding */ sl@0: #define RTLD_GLOBAL 0x100 /* allow symbols to be global */ sl@0: sl@0: /* sl@0: * To be able to intialize, a library may provide a dl_info structure sl@0: * that contains functions to be called to initialize and terminate. sl@0: */ sl@0: struct dl_info { sl@0: void (*init) _ANSI_ARGS_((void)); sl@0: void (*fini) _ANSI_ARGS_((void)); sl@0: }; sl@0: sl@0: VOID *dlopen _ANSI_ARGS_((const char *path, int mode)); sl@0: VOID *dlsym _ANSI_ARGS_((void *handle, const char *symbol)); sl@0: char *dlerror _ANSI_ARGS_((void)); sl@0: int dlclose _ANSI_ARGS_((void *handle)); sl@0: sl@0: #ifdef __cplusplus sl@0: } sl@0: #endif sl@0: sl@0: #endif /* __dlfcn_h__ */