From 9e6b3e8cb353583fb1aba7c7dc00d2871b356cc4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 18 May 2010 13:29:39 +0200 Subject: switching machine --- include/wolf/library/loader.h | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/wolf/library/loader.h b/include/wolf/library/loader.h index 85195a7..949d946 100644 --- a/include/wolf/library/loader.h +++ b/include/wolf/library/loader.h @@ -36,6 +36,7 @@ extern "C" { #include "port/sys.h" #include "errors.h" +#include /* for size_t */ /* @brief handle representing a shared library */ @@ -53,34 +54,25 @@ wolf_library_p wolf_library_load( const char *name, wolf_error_t *error ); /** * Free up resources used by the library object. * - * @param demon the library object to free + * @param library the library object to free * * @return WOLF_OK if library has been unloaded, * WOLF_ERR_INTERNAL_STATE if the library handle is in an illegal state * (like double freeing the same library) */ - wolf_error_t wolf_library_unload( wolf_library_p library ); -#if 0 - -#if !defined _WIN32 - -#include /* for dlxxx functions */ - - -#else - -#define WIN32_MEAN_AND_LEAN -#include - -#endif /* !defined _WIN32 */ - -#endif - -#ifdef __cplusplus -} -#endif +/** + * Converts the last error and state of the library object in a human readable message. + * + * @param error the error which happened after calling a library loader function + * @param library the library object for which we want a error message + * @param buf the buffer which will hold the error message + * @param buflen the size of the buffer + * + * @returns a pointer to buf for convenience + */ +char *wolf_libary_errmsg( const wolf_error_t error, const wolf_library_p library, char *buf, size_t buflen ); /** @} */ /* @addtogroup wolf_library */ -- cgit v1.2.3-54-g00ecf