109 |
system-specific stuff here, but it's not as general. |
system-specific stuff here, but it's not as general. |
110 |
*/ |
*/ |
111 |
# ifdef __WIN32__ |
# ifdef __WIN32__ |
112 |
snprintf(buffer,PATH_MAX,"%s.dll",partialname1); |
snprintf(buffer,PATH_MAX,"%s.dll",partialname); |
113 |
# elif defined(linux) |
# elif defined(linux) |
114 |
snprintf(buffer,PATH_MAX,"lib%s.so",partialname); /* changed from .o to .so -- JP */ |
snprintf(buffer,PATH_MAX,"lib%s.so",partialname); /* changed from .o to .so -- JP */ |
115 |
# elif defined(sun) || defined(solaris) |
# elif defined(sun) || defined(solaris) |
122 |
# error "Unknown system type (please define ASC_SHLIBSUFFIX and ASC_SHLIBPREFIX)" |
# error "Unknown system type (please define ASC_SHLIBSUFFIX and ASC_SHLIBPREFIX)" |
123 |
# endif |
# endif |
124 |
#endif |
#endif |
125 |
|
|
126 |
return buffer; |
return buffer; |
127 |
} |
} |
128 |
|
|
174 |
} |
} |
175 |
|
|
176 |
ASC_FREE(path); |
ASC_FREE(path); |
177 |
return result; |
return result; |
178 |
} |
} |
179 |
|
|
180 |
/*------------------------------------------------------------------------------ |
/*------------------------------------------------------------------------------ |
203 |
ERROR_REPORTER_HERE(ASC_PROG_ERR,"Failed to create 'extlib' import handler"); |
ERROR_REPORTER_HERE(ASC_PROG_ERR,"Failed to create 'extlib' import handler"); |
204 |
return 1; |
return 1; |
205 |
} |
} |
206 |
|
|
207 |
return 0; |
return 0; |
208 |
} |
} |
209 |
|
|
255 |
|
|
256 |
/** |
/** |
257 |
A FilePath 'test' function for passing to the ospath_searchpath_iterate function. |
A FilePath 'test' function for passing to the ospath_searchpath_iterate function. |
258 |
This test function will return a match when an importable file having the |
This test function will return a match when an importable file having the |
259 |
required name is present in the fully resolved path. |
required name is present in the fully resolved path. |
260 |
|
|
261 |
@param path the search path component |
@param path the search path component |
350 |
ospath_free(fp1); |
ospath_free(fp1); |
351 |
return NULL; |
return NULL; |
352 |
} |
} |
353 |
|
|
354 |
|
|
355 |
searchdata.relativedir = ospath_getdir(fp1); |
searchdata.relativedir = ospath_getdir(fp1); |
356 |
if(searchdata.relativedir ==NULL){ |
if(searchdata.relativedir ==NULL){ |
377 |
|
|
378 |
if(NULL==ospath_searchpath_iterate(sp,&importhandler_search_test,&searchdata)){ |
if(NULL==ospath_searchpath_iterate(sp,&importhandler_search_test,&searchdata)){ |
379 |
ospath_free(searchdata.relativedir); |
ospath_free(searchdata.relativedir); |
380 |
ASC_FREE(searchdata.partialname); |
ASC_FREE(searchdata.partialname); |
381 |
ospath_searchpath_free(sp); |
ospath_searchpath_free(sp); |
382 |
return NULL; |
return NULL; |
383 |
} |
} |