Author: leo
Date: Tue Apr 12 07:14:17 2005
New Revision: 7813

Modified:
   trunk/src/dynext.c
Log:
strip leading lib off dynamic lib names on WIN32

Modified: trunk/src/dynext.c
==============================================================================
--- trunk/src/dynext.c  (original)
+++ trunk/src/dynext.c  Tue Apr 12 07:14:17 2005
@@ -215,6 +215,19 @@
         string_cstring_free(file_name);
         return path;
     }
+    /*
+     * and on windows strip a leading "lib"
+     */
+#ifdef WIN32
+    if (memcmp(file_name, "lib", 3) == 0) {
+        *handle = Parrot_dlopen(file_name + 3);
+        if (*handle) {
+            path = string_from_cstring(interpreter, file_name + 3, 0);
+            string_cstring_free(file_name);
+            return path;
+        }
+    }
+#endif
     err = Parrot_dlerror();
     fprintf(stderr, "Couldn't load '%s': %s\n",
             file_name, err ? err : "unknown reason");

Reply via email to