200 |
ERROR_REPORTER_HERE(ASC_PROG_ERR,"Required function '%s' not found", initFun); |
ERROR_REPORTER_HERE(ASC_PROG_ERR,"Required function '%s' not found", initFun); |
201 |
(void)FreeLibrary(xlib); |
(void)FreeLibrary(xlib); |
202 |
return 1; |
return 1; |
203 |
}else{ |
#if 0 |
204 |
|
}else{ |
205 |
FPRINTF(ASCERR,"FOUND INITFCN %s AT %d\n",initFun,install); |
FPRINTF(ASCERR,"FOUND INITFCN %s AT %d\n",initFun,install); |
206 |
|
#endif |
207 |
} |
} |
208 |
} |
} |
209 |
if (0 != AscAddRecord(xlib,path)) { |
if (0 != AscAddRecord(xlib,path)) { |
501 |
SEARCHING FOR LIBRARIES |
SEARCHING FOR LIBRARIES |
502 |
*/ |
*/ |
503 |
|
|
504 |
|
|
505 |
|
/** |
506 |
|
Create a library filename according to platform standard naming. |
507 |
|
|
508 |
|
@param partialname The partial filename (eg 'mylib') |
509 |
|
@return Complete filename (eg 'libmylib.so' or 'mylib.dlll', etc) |
510 |
|
|
511 |
|
Basically just adds ASC_SHLIBPREFIX to start and ASC_SHLIBSUFFIX to end. |
512 |
|
|
513 |
|
No allowance made for 'soname' suffixes eg 'libsomething.so.1' etc. But |
514 |
|
that's probably OK as those methods aren't really applicable to dlopened |
515 |
|
libraries (eg the soname symlink mechanism breaks down). |
516 |
|
*/ |
517 |
|
char *dynaload_lib_filename(const char *partialname){ |
518 |
|
char *buffer; |
519 |
|
buffer = ASC_NEW_ARRAY(char,PATH_MAX); |
520 |
|
#if !defined(ASC_SHLIBSUFFIX) || !defined(ASC_SHLIBPREFIX) |
521 |
|
# error "ASC_SHLIBSUFFIX and ASC_SHLIBPREFIX are not defined" |
522 |
|
#endif |
523 |
|
snprintf(buffer,PATH_MAX,"%s%s%s",ASC_SHLIBPREFIX,partialname,ASC_SHLIBSUFFIX); |
524 |
|
return buffer; |
525 |
|
} |
526 |
|
|
527 |
|
|
528 |
/** |
/** |
529 |
A little structure to help with searching for libraries |
A little structure to help with searching for libraries |
530 |
|
|
611 |
return NULL; |
return NULL; |
612 |
} |
} |
613 |
|
|
614 |
buffer = importhandler_extlib_filename(s1); |
buffer = dynaload_lib_filename(s1); |
615 |
|
|
616 |
fp3 = ospath_new(buffer); |
fp3 = ospath_new(buffer); |
617 |
ASC_FREE(buffer); |
ASC_FREE(buffer); |