]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/loaders/loadlibrary.c: Compilation fixes (originally
authorBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Wed, 15 Sep 2004 18:24:00 +0000 (18:24 +0000)
committerBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Wed, 15 Sep 2004 18:24:00 +0000 (18:24 +0000)
from Gary V. Vaughan) to compile under MinGW.
* config/mkstamp: Translate input data so that it is assured to
use the Unix line terminations. This is necessary under Windows if
the files are checked out with CR/NL line terminations. A
side-effect of this change is that input must always be from
stdin. Previously a filename argument was accepted as well.

ChangeLog
config/mkstamp
libltdl/loaders/loadlibrary.c

index 90a82f5108d0218721f98d89e556b18c57e08e37..0aa371cb18ce4a7c9119cee5912f3d0d6f7e3579 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-09-15  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
+
+       * libltdl/loaders/loadlibrary.c: Compilation fixes (originally
+       from Gary V. Vaughan) to compile under MinGW.
+       * config/mkstamp: Translate input data so that it is assured to
+       use the Unix line terminations. This is necessary under Windows if
+       the files are checked out with CR/NL line terminations. A
+       side-effect of this change is that input must always be from
+       stdin. Previously a filename argument was accepted as well.
+
 2004-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * tests/Makefile.am: Use the same CPP, F77, CXX and CXXFLAGS
index 2a1971b94b5dda9256650ff7227742260fc4e632..c59aef0b59d1273dfe187719a6bb422b28503e67 100755 (executable)
 # tags, and it edits this line so that it looks like ` $rev $date'
 
 # Command-line arguments are passed down to sed; additional -e cmd
-# arguments are acceptable.  If no input filename is specified in the
-# command line, sed will read from stdin.
+# arguments are acceptable.  Input is from from stdin.  The original
+# version of this script accepted input from a named file or stdin.
 
-exec sed -e '
+tr -d "\015" | sed -e '
        s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% \1 \2%
        t end
        d
index 98fc1ec97e75464da722f13cc81a436bea554b5d..ace878c74a2295a68d3ec523073535e57328f1a7 100644 (file)
@@ -52,7 +52,7 @@ static void *  vm_sym   (lt_user_data loader_data, lt_module module,
 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_dlhandle handles;
 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,26 +148,30 @@ vm_open (lt_user_data loader_data, const char *filename)
      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;
+
+    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;
+      }
   }
 
-  if (cur || !module)
-    {
-      LT__SETERROR (CANNOT_OPEN);
-      module = 0;
-    }
-
   return module;
 }