summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-03-30 13:36:10 -0600
committerBrian Paul <[email protected]>2010-04-05 07:47:23 -0600
commit3258058d3b3fe0412007bfa699918bbe1665939d (patch)
tree5c84e11c3884920a69c0001561bec92dc2dfefa5 /src/gallium/auxiliary
parentee30e24f5f9cc2ec6c5a3edbe498e5e0334f788b (diff)
util: added util_dl_error()
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_dl.c13
-rw-r--r--src/gallium/auxiliary/util/u_dl.h7
2 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_dl.c b/src/gallium/auxiliary/util/u_dl.c
index 37ed789f955..220860ebf4b 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 85296c58af6..2853b447c61 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_ */