util: added util_dl_error()
authorBrian Paul <brianp@vmware.com>
Tue, 30 Mar 2010 19:36:10 +0000 (13:36 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 5 Apr 2010 13:47:23 +0000 (07:47 -0600)
src/gallium/auxiliary/util/u_dl.c
src/gallium/auxiliary/util/u_dl.h

index 37ed789f955b95f1cddb9f5506931d1a4ffb74a5..220860ebf4bd96c389aaa6b6f74b8dadacad9312 100644 (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
+}
index 85296c58af640d6d44386e380207d25d1c8f2dcf..2853b447c61070f9a3a7d012af0ca45f62e38c15 100644 (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_ */