Go to the source code of this file.
◆ DYNL_KERNEL_HANDLE
#define DYNL_KERNEL_HANDLE ((void*) 0x1) |
◆ lib_types
Enumerator |
---|
LT_NONE | |
LT_NOTFOUND | |
LT_SINGULAR | |
LT_ELF | |
LT_HPUX | |
LT_MACH_O | |
LT_BUILTIN | |
LT_DLL | |
Definition at line 16 of file mod_raw.h.
◆ dynl_check_opened()
int dynl_check_opened |
( |
char * |
filename | ) |
|
Definition at line 135 of file mod_raw.cc.
138{
139 return dlopen(filename,RTLD_NOW|RTLD_NOLOAD) !=
NULL;
140}
◆ dynl_close()
int dynl_close |
( |
void * |
handle | ) |
|
Definition at line 170 of file mod_raw.cc.
171{
172 return(dlclose (handle));
173}
◆ dynl_error()
const char * dynl_error |
( |
| ) |
|
Definition at line 175 of file mod_raw.cc.
176{
177 return(dlerror());
178}
◆ dynl_open()
void * dynl_open |
( |
char * |
filename | ) |
|
Definition at line 142 of file mod_raw.cc.
145{
146 return dlopen(filename, RTLD_NOW|RTLD_GLOBAL);
147#if 0
148
149 if ((filename==
NULL) || (dlopen(filename,RTLD_NOW|RTLD_NOLOAD)==
NULL))
150 return(dlopen(filename, RTLD_NOW|RTLD_GLOBAL));
151 else
152 Werror(
"module %s already loaded",filename);
154
155
156#endif
157}
void Werror(const char *fmt,...)
◆ dynl_open_binary_warn()
void * dynl_open_binary_warn |
( |
const char * |
binary_name, |
|
|
const char * |
msg = NULL |
|
) |
| |
Definition at line 45 of file mod_raw.cc.
46{
48 char* binary_name_so=
NULL;
50
51
53 if (proc_path !=
NULL)
54 {
56 char *q;
58 int binary_name_so_length = 3 + strlen(
DL_TAIL) + strlen(binary_name) + strlen(
DIR_SEPP) + strlen(proc_path);
59 binary_name_so = (
char *)
omAlloc0( binary_name_so_length *
sizeof(
char) );
60 while((
p!=
NULL)&&(*
p!=
'\0'))
61 {
64 strcpy(binary_name_so,
p);
67 strcat(binary_name_so,binary_name);
69 if(!access(binary_name_so, R_OK)) {
found=
TRUE;
break; }
71 }
73 }
74
76 {
77 Warn(
"Could not find dynamic library: %s%s (path %s)",
78 binary_name,
DL_TAIL,proc_path);
81 WarnS(
"See the INSTALL section in the Singular manual for details.");
83 }
85
86 return handle;
87}
char * feGetResource(const char id, int warn)
STATIC_VAR BOOLEAN warn_handle
const char * dynl_error()
void * dynl_open(char *filename)
◆ dynl_sym()
void * dynl_sym |
( |
void * |
handle, |
|
|
const char * |
symbol |
|
) |
| |
Definition at line 159 of file mod_raw.cc.
160{
162 {
166 }
167 return(dlsym(handle, symbol));
168}
STATIC_VAR void * kernel_handle
#define DYNL_KERNEL_HANDLE
◆ dynl_sym_warn()
void * dynl_sym_warn |
( |
void * |
handle, |
|
|
const char * |
proc, |
|
|
const char * |
msg = NULL |
|
) |
| |
Definition at line 89 of file mod_raw.cc.
90{
91 void *proc_ptr =
NULL;
93 {
96 {
97 WarnS(
"Could load a procedure from a dynamic library");
100 WarnS(
"See the INSTALL section in the Singular manual for details.");
102 }
103 }
104 return proc_ptr;
105}
unsigned char * proc[NUM_PROC]
void * dynl_sym(void *handle, const char *symbol)
STATIC_VAR BOOLEAN warn_proc