util: added util_dl_error()

This commit is contained in:
Brian Paul
2010-03-30 13:36:10 -06:00
parent ee30e24f5f
commit 3258058d3b
2 changed files with 20 additions and 0 deletions
+13
View File
@@ -78,3 +78,16 @@ util_dl_close(struct util_dl_library *library)
(void)library;
#endif
}
const char *
util_dl_error(void)
{
#if defined(PIPE_OS_UNIX)
return dlerror();
#elif defined(PIPE_OS_WINDOWS)
return "unknown error";
#else
return "unknown error";
#endif
}
+7
View File
@@ -70,4 +70,11 @@ void
util_dl_close(struct util_dl_library *library);
/**
* Return most recent error message.
*/
const char *
util_dl_error(void);
#endif /* U_DL_H_ */