From 3258058d3b3fe0412007bfa699918bbe1665939d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 30 Mar 2010 13:36:10 -0600 Subject: util: added util_dl_error() --- src/gallium/auxiliary/util/u_dl.c | 13 +++++++++++++ src/gallium/auxiliary/util/u_dl.h | 7 +++++++ 2 files changed, 20 insertions(+) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_dl.c b/src/gallium/auxiliary/util/u_dl.c index 37ed789f95..220860ebf4 100644 --- a/src/gallium/auxiliary/util/u_dl.c +++ b/src/gallium/auxiliary/util/u_dl.c @@ -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 +} diff --git a/src/gallium/auxiliary/util/u_dl.h b/src/gallium/auxiliary/util/u_dl.h index 85296c58af..2853b447c6 100644 --- a/src/gallium/auxiliary/util/u_dl.h +++ b/src/gallium/auxiliary/util/u_dl.h @@ -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_ */ -- cgit v1.2.3