Revision: 44808
http://brlcad.svn.sourceforge.net/brlcad/?rev=44808&view=rev
Author: erikgreenwald
Date: 2011-06-07 20:59:25 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
take a whack at porting these functions to windows
Modified Paths:
--------------
brlcad/trunk/src/libbu/dlfcn.c
Modified: brlcad/trunk/src/libbu/dlfcn.c
===================================================================
--- brlcad/trunk/src/libbu/dlfcn.c 2011-06-07 20:45:35 UTC (rev 44807)
+++ brlcad/trunk/src/libbu/dlfcn.c 2011-06-07 20:59:25 UTC (rev 44808)
@@ -38,6 +38,8 @@
{
#ifdef HAVE_DLOPEN
return dlopen(path, mode);
+#elif defined(WIN32)
+ return LoadLibrary(path);
#else
bu_log("dlopen not supported\n");
return NULL;
@@ -49,6 +51,8 @@
{
#ifdef HAVE_DLOPEN
return dlsym(handle, symbol);
+#elif defined(WIN32)
+ return GetProcAddress(path, symbol);
#else
bu_log("dlsym not supported\n");
return NULL;
@@ -60,6 +64,8 @@
{
#ifdef HAVE_DLOPEN
return dlclose(handle);
+#elif defined(WIN32)
+ return 0;
#else
bu_log("dlclose not supported\n");
return 0;
@@ -71,6 +77,10 @@
{
#ifdef HAVE_DLOPEN
return dlerror();
+#elif defined(WIN32)
+ static char buf[BUFSIZ];
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), &buf, 0,
NULL);
+ return (const char *)buf;
#else
bu_log("dlerror not supported\n");
return NULL;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits