��̬���� iconv.dll ��
| 60 | |
| 61 | // ��̬���� iconv.dll �� |
| 62 | static void __iconv_dll_load() |
| 63 | { |
| 64 | const char* path = "iconv.dll"; |
| 65 | |
| 66 | if (__iconv_dll != NULL) { |
| 67 | logger_fatal("__iconv_dll not null"); |
| 68 | } |
| 69 | |
| 70 | __iconv_dll = acl_dlopen(path); |
| 71 | if (__iconv_dll == NULL) { |
| 72 | logger_fatal("load %s error: %s", path, last_serror()); |
| 73 | } |
| 74 | |
| 75 | __iconv_open = (iconv_open_fn) acl_dlsym(__iconv_dll, "libiconv_open"); |
| 76 | if (__iconv_open == NULL) { |
| 77 | logger_fatal("load iconv_open from %s error: %s", path, last_serror()); |
| 78 | } |
| 79 | |
| 80 | __iconv_close = (iconv_close_fn) acl_dlsym(__iconv_dll, "libiconv_close"); |
| 81 | if (__iconv_close == NULL) { |
| 82 | logger_fatal("load iconv_close from %s error: %s", path, last_serror()); |
| 83 | } |
| 84 | |
| 85 | __iconv = (iconv_fn) acl_dlsym(__iconv_dll, "libiconv"); |
| 86 | if (__iconv == NULL) { |
| 87 | logger_fatal("load iconv from %s error: %s", path, last_serror()); |
| 88 | } |
| 89 | |
| 90 | __iconvctl = (iconvctl_fn) acl_dlsym(__iconv_dll, "libiconvctl"); |
| 91 | if (__iconvctl == NULL) { |
| 92 | logger_fatal("load iconvctl from %s error: %s", path, last_serror()); |
| 93 | } |
| 94 | |
| 95 | logger("iconv.dll loaded"); |
| 96 | #ifndef HAVE_NO_ATEXIT |
| 97 | atexit(__iconv_dll_unload); |
| 98 | #endif |
| 99 | } |
| 100 | |
| 101 | # else |
| 102 | # define __iconv_open iconv_open |
nothing calls this directly
no test coverage detected
searching dependent graphs…