changed dlerror() to sys_dl_error() in lib/main.c

This commit is contained in:
hyunghwan.chung 2018-02-04 04:39:11 +00:00
parent fe1731519e
commit 0269e10fd8

View File

@ -533,7 +533,7 @@ static void* dl_open (moo_t* moo, const moo_ooch_t* name, int flags)
handle = sys_dl_openext(bufptr); handle = sys_dl_openext(bufptr);
if (!handle) if (!handle)
{ {
MOO_DEBUG3 (moo, "Failed to open(ext) DL %hs[%js] - %hs\n", bufptr, name, dlerror()); MOO_DEBUG3 (moo, "Failed to open(ext) DL %hs[%js] - %hs\n", bufptr, name, sys_dl_error());
/* try without prefix and postfix */ /* try without prefix and postfix */
bufptr[xlen] = '\0'; bufptr[xlen] = '\0';
@ -541,7 +541,7 @@ static void* dl_open (moo_t* moo, const moo_ooch_t* name, int flags)
if (!handle) if (!handle)
{ {
moo_bch_t* dash; moo_bch_t* dash;
MOO_DEBUG3 (moo, "Failed to open(ext) DL %hs[%js] - %s\n", &bufptr[len], name, dlerror()); MOO_DEBUG3 (moo, "Failed to open(ext) DL %hs[%js] - %s\n", &bufptr[len], name, sys_dl_error());
dash = moo_rfindbchar(bufptr, moo_countbcstr(bufptr), '-'); dash = moo_rfindbchar(bufptr, moo_countbcstr(bufptr), '-');
if (dash) if (dash)
{ {
@ -576,13 +576,13 @@ static void* dl_open (moo_t* moo, const moo_ooch_t* name, int flags)
if (moo_findbchar (bufptr, bcslen, '.')) if (moo_findbchar (bufptr, bcslen, '.'))
{ {
handle = sys_dl_open(bufptr); handle = sys_dl_open(bufptr);
if (!handle) MOO_DEBUG2 (moo, "Failed to open DL %hs - %s\n", bufptr, dlerror()); if (!handle) MOO_DEBUG2 (moo, "Failed to open DL %hs - %s\n", bufptr, sys_dl_error());
else MOO_DEBUG2 (moo, "Opened DL %hs handle %p\n", bufptr, handle); else MOO_DEBUG2 (moo, "Opened DL %hs handle %p\n", bufptr, handle);
} }
else else
{ {
handle = sys_dl_openext(bufptr); handle = sys_dl_openext(bufptr);
if (!handle) MOO_DEBUG2 (moo, "Failed to open(ext) DL %hs - %s\n", bufptr, dlerror()); if (!handle) MOO_DEBUG2 (moo, "Failed to open(ext) DL %hs - %s\n", bufptr, sys_dl_error());
else MOO_DEBUG2 (moo, "Opened(ext) DL %hs handle %p\n", bufptr, handle); else MOO_DEBUG2 (moo, "Opened(ext) DL %hs handle %p\n", bufptr, handle);
} }
} }