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  * SCCS: @(#) dlfcn.h 1.4 96/09/17 09:05:59
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 /*
33  * Mode flags for the dlopen routine.
34  */
35 #define RTLD_LAZY	1	/* lazy function call binding */
36 #define RTLD_NOW	2	/* immediate function call binding */
37 #define RTLD_GLOBAL	0x100	/* allow symbols to be global */
38 
39 /*
40  * To be able to intialize, a library may provide a dl_info structure
41  * that contains functions to be called to initialize and terminate.
42  */
43 struct dl_info {
44 	void (*init) (void);
45 	void (*fini) (void);
46 };
47 
48 void *dlopen (const char *path, int mode);
49 void *dlsym (void *handle, const char *symbol);
50 char *dlerror (void);
51 int dlclose (void *handle);
52 
53 #endif /* __dlfcn_h__ */
54