Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 83 lines (65 sloc) 1.622 kb
02d1d62 Initial revision
Arnar Mar Hrafnkelsson authored
1 #ifndef _DYNALOAD_H_
2 #define _DYNALOAD_H_
3
4 #include "log.h"
5
6 #if defined(OS_hpux)
7 #include <dl.h>
8 typedef shl_t minthandle_t;
9 #elif defined(WIN32)
10 #define WIN32_LEAN_AND_MEAN
11 #include <windows.h>
12 typedef HMODULE minthandle_t;
13 #undef WIN32_LEAN_AND_MEAN
b6cfd21 added Artur's OSX dlload() emulation, with minor changes
Tony Cook authored
14 #elif defined(OS_darwin)
15 #define DL_LOADONCEONLY
16 #define DLSYMUN
17 #undef environ
18 #undef bool
19
20 #import <mach-o/dyld.h>
21 typedef void *minthandle_t;
02d1d62 Initial revision
Arnar Mar Hrafnkelsson authored
22 #else
23 #include <dlfcn.h>
24 typedef void *minthandle_t;
25 #endif
26
27 #include "EXTERN.h"
28 #include "perl.h"
29 #include "ppport.h"
30
31 #include "ext.h"
32
33 typedef struct {
34 minthandle_t handle;
35 char *filename;
36 func_ptr *function_list;
37 } DSO_handle;
38
39 typedef struct {
40 HV* hv;
41 char *key;
42 void *store;
43 } UTIL_args;
44
b33c08f hide or rename any symbols that are likely to conflict with other
Tony Cook authored
45 #if 0
02d1d62 Initial revision
Arnar Mar Hrafnkelsson authored
46 int getobj(void *hv_t,char *key,char *type,void **store);
47 int getint(void *hv_t,char *key,int *store);
48 int getdouble(void *hv_t,char *key,double *store);
49 int getvoid(void *hv_t,char *key,void **store);
b33c08f hide or rename any symbols that are likely to conflict with other
Tony Cook authored
50 #endif
02d1d62 Initial revision
Arnar Mar Hrafnkelsson authored
51
52 void *DSO_open(char* file,char** evalstring);
53 int DSO_close(void *);
54 void DSO_call(DSO_handle *handle,int func_index,HV* hv);
55
56 #ifdef __EMX__ /* OS/2 */
57 # ifndef RTLD_LAZY
58 # define RTLD_LAZY 0
59 # endif /* RTLD_LAZY */
60 int dlclose(minthandle_t);
61 #endif /* __EMX__ */
62
63 #ifdef DLSYMUN
64
65 #define I_EVALSTR "_evalstr"
66 #define I_SYMBOL_TABLE "_symbol_table"
67 #define I_UTIL_TABLE "_util_table"
68 #define I_FUNCTION_LIST "_function_list"
69 #define I_INSTALL_TABLES "_install_tables"
70
71 #else
72
73 #define I_EVALSTR "evalstr"
74 #define I_SYMBOL_TABLE "symbol_table"
75 #define I_UTIL_TABLE "util_table"
76 #define I_FUNCTION_LIST "function_list"
77 #define I_INSTALL_TABLES "install_tables"
78
79 #endif
80
81 #endif /* _DYNALOAD_H_ */
82
Something went wrong with that request. Please try again.