libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mingw loadlibrary.c compile failure


From: Gary V. Vaughan
Subject: Re: mingw loadlibrary.c compile failure
Date: Thu, 02 Sep 2004 15:12:44 +0100
User-agent: Mozilla Thunderbird 0.7 (X11/20040615)

Hi Bob!

Bob Friesenhahn wrote:
> It seems that when compiling under native WIN32, the definition of the
> lt_dlloader type is inadequate:
> 
> loadlibrary.c: In function `loadlibrary_LTX_get_vtable':
> loadlibrary.c:62: request for member `name' in something not a structure
> or union
> loadlibrary.c:64: request for member `name' in something not a structure
> or union
> loadlibrary.c:65: request for member `module_open' in something not a
> structure or union
> loadlibrary.c:66: request for member `module_close' in something not a
> structure or union
> loadlibrary.c:67: request for member `find_sym' in something not a
> structure or union
> loadlibrary.c:68: request for member `dlloader_data' in something not a
> structure or union
> loadlibrary.c:69: request for member `priority' in something not a
> structure or union
> loadlibrary.c:72: request for member `dlloader_data' in something not a
> structure or union
> loadlibrary.c:78: warning: return from incompatible pointer type
> loadlibrary.c: In function `vm_open':
> loadlibrary.c:154: warning: dereferencing `void *' pointer
> loadlibrary.c:154: request for member `module' in something not a
> structure or union
> loadlibrary.c:160: warning: dereferencing `void *' pointer
> loadlibrary.c:160: request for member `module' in something not a
> structure or union
> c:/mingw/include/winnt.h: At top level:
> ../lt__private.h:121: warning: array `lt__error_strings' assumed to have
> one element

Thanks for the log.  Does the attached patch help?

Cheers,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
--- orig/libltdl/loaders/loadlibrary.c
+++ mod/libltdl/loaders/loadlibrary.c
@@ -52,7 +52,7 @@
 lt_dlvtable *
 get_vtable (lt_user_data loader_data)
 {
-  static lt_dlloader *vtable = 0;
+  static lt_dlvtable *vtable = 0;
  
   if (!vtable)
     {
@@ -95,7 +95,6 @@
 static lt_module
 vm_open (lt_user_data loader_data, const char *filename)
 {
-  lt_dlhandle  cur        = 0;
   lt_module    module     = 0;
   const char   *errormsg   = 0;
   char        *searchname = 0;
@@ -149,25 +148,29 @@
      We check whether LoadLibrary is returning a handle to
      an already loaded module, and simulate failure if we
      find one. */
-  while (cur = lt_dlhandle_next (cur))
-    {
-      if (!cur->module)
-       {
-         cur = 0;
-         break;
-       }
-
-      if (cur->module == module)
-       {
-         break;
-       }
-  }
+ {
+   lt__handle *        cur        = 0;
  
-  if (cur || !module)
-    {
-      LT__SETERROR (CANNOT_OPEN);
-      module = 0;
-    }
+   while (cur = (lt__handle *) lt_dlhandle_next ((lt_dlhandle) cur))
+     {
+       if (!cur->module)
+        {
+          cur = 0;
+          break;
+        }
+
+       if (cur->module == module)
+        {
+          break;
+        }
+     }
+
+   if (cur || !module)
+     {
+       LT__SETERROR (CANNOT_OPEN);
+       module = 0;
+     }
+ }
  
   return module;
 }

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]