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