16#if defined(linux) && !defined(__ELF__) && !defined(__LCC__)
23this code is no being maintained anymore
30Yap_FindExecutable(
void)
34 if(name != NULL && (res=dld_find_executable(name))) {
35 return GLOBAL_Executable;
43Yap_LoadForeignFile(
char *file,
int flags)
50Yap_CallForeignFile(
void *handle,
char *f)
56Yap_CloseForeignFile(
void *handle)
67 char *proc_name, YapInitProc *init_proc)
69 static int firstTime = 1;
73 error = dld_init(GLOBAL_Executable);
75 strcpy(LOCAL_ErrorSay,dld_strerror(error));
82 if((error=dld_link(AtomName(ofiles->name))) !=0) {
83 strcpy(LOCAL_ErrorSay,dld_strerror(error));
86 ofiles = ofiles->next;
91 *init_proc = (YapInitProc) dld_get_func(proc_name);
93 strcpy(LOCAL_ErrorSay,
"Could not locate initialization routine");
96 if(!dld_function_executable_p(proc_name)) {
97 char **undefs = dld_list_undefined_sym();
99 int k = dld_undefined_sym_count;
100 strcpy(LOCAL_ErrorSay,
"Could not resolve all symbols");
102 YP_printf(
"[undefined symbol %s]\n",*p++);
109 return LOAD_SUCCEEDED;
114 char *proc_name, YapInitProc *init_proc)
116 return LoadForeign(ofiles, libs, proc_name, init_proc);
120Yap_ShutdownLoadForeign(
void)
126 char *proc_name, YapInitProc *init_proc)
128 return(LoadForeign(ofiles,libs, proc_name, init_proc));
load_foreign_files/3 has works for the following configurations: