Some global variables(Yap_thread_gl) in C/init.c are now declared in misc/LOCALS

This commit is contained in:
Joao
2011-05-23 16:19:47 +01:00
parent 2f964c9f51
commit 8170f6d3cb
81 changed files with 1982 additions and 1794 deletions

View File

@@ -73,7 +73,7 @@ LoadForeign(StringList ofiles, StringList libs,
if(firstTime) {
error = dld_init(YapExecutable);
if(error) {
strcpy(Yap_ErrorSay,dld_strerror(error));
strcpy(LOCAL_ErrorSay,dld_strerror(error));
return LOAD_FAILLED;
}
firstTime=0;
@@ -81,7 +81,7 @@ LoadForeign(StringList ofiles, StringList libs,
while (ofiles) {
if((error=dld_link(AtomName(ofiles->name))) !=0) {
strcpy(Yap_ErrorSay,dld_strerror(error));
strcpy(LOCAL_ErrorSay,dld_strerror(error));
return LOAD_FAILLED;
}
ofiles = ofiles->next;
@@ -91,14 +91,14 @@ LoadForeign(StringList ofiles, StringList libs,
/* TODO: handle libs */
*init_proc = (YapInitProc) dld_get_func(proc_name);
if(! *init_proc) {
strcpy(Yap_ErrorSay,"Could not locate initialization routine");
strcpy(LOCAL_ErrorSay,"Could not locate initialization routine");
return LOAD_FAILLED;
}
if(!dld_function_executable_p(proc_name)) {
char **undefs = dld_list_undefined_sym();
char **p = undefs;
int k = dld_undefined_sym_count;
strcpy(Yap_ErrorSay,"Could not resolve all symbols");
strcpy(LOCAL_ErrorSay,"Could not resolve all symbols");
while(k) {
YP_printf("[undefined symbol %s]\n",*p++);
--k;