|
|
| version 1.18, 2021/02/01 18:56:45 | version 1.20, 2021/11/08 09:03:09 |
|---|---|
| Line 509 private: | Line 509 private: |
| private: // sqlite client library funcs linking | private: // sqlite client library funcs linking |
| const char *dlink(const char *dlopen_file_spec) { | const char *dlink(char *dlopen_file_spec) { |
| if(lt_dlinit()){ | if(lt_dlinit()){ |
| if(const char* result=lt_dlerror()) | if(const char* result=lt_dlerror()) |
| return result; | return result; |
| return "can not prepare to dynamic loading"; | return "can not prepare to dynamic loading"; |
| } | } |
| lt_dlhandle handle=lt_dlopen(dlopen_file_spec); | lt_dlhandle handle; |
| do { | |
| char *next=lsplit(dlopen_file_spec, ','); | |
| handle=lt_dlopen(dlopen_file_spec); | |
| dlopen_file_spec=next; | |
| } while (!handle && dlopen_file_spec); | |
| if(!handle){ | if(!handle){ |
| if(const char* result=lt_dlerror()) | if(const char* result=lt_dlerror()) |
| Line 526 private: // sqlite client library funcs | Line 531 private: // sqlite client library funcs |
| #define DSLINK(name, action) \ | #define DSLINK(name, action) \ |
| pa_##name=(t_##name)lt_dlsym(handle, #name); \ | pa_##name=(t_##name)lt_dlsym(handle, #name); \ |
| if(!name) \ | if(!pa_##name) \ |
| action; | action; |
| #define DLINK(name) DSLINK(name, return "function " #name " was not found") | #define DLINK(name) DSLINK(name, return "function " #name " was not found") |