]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltdl.c: support lt_dlopen(0) for win32
authorPaul Sokolovsky <Paul.Sokolovsky@technologist.com>
Fri, 5 May 2000 02:31:48 +0000 (02:31 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 5 May 2000 02:31:48 +0000 (02:31 +0000)
ChangeLog
libltdl/ltdl.c

index 7134eafb48a95f30871a34ac7a6a3c4c6df6e8ce..131b3a83b35ddd308474e560b344740ee09489a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-05  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
+
+       * ltdl.c: support lt_dlopen(0) for win32
+
 2000-05-03  Thomas Tanner  <tanner@ffii.org>
 
        * doc/libtool.texi (libltdl): fix typos,
index 7964d44cc650df79e992ba9c985610024ed892eb..2f03fbbe0e133461927580a71d6c1f52b4fb813b 100644 (file)
@@ -1,4 +1,4 @@
-/* ltdl.c -- system independent dlopen wrapper
+g/* ltdl.c -- system independent dlopen wrapper
    Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
@@ -457,7 +457,16 @@ sys_wll_open (loader_data, filename)
        lt_dlhandle cur;
        lt_module_t module;
        char *searchname = 0;
-       char *ext = strrchr(filename, '.');
+        char *ext;
+        char self_name_buf[MAX_PATH];
+
+       if (!filename) {
+               /* Get the name of main module */
+               *self_name_buf = 0;
+               GetModuleFileName(NULL, self_name_buf, sizeof(self_name_buf));
+               filename = ext = self_name_buf;
+       }
+       else ext = strrchr(filename, '.');
 
        if (ext) {
                /* FILENAME already has an extension. */