]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (link mode) <lib>: Make sure skipped_export is
authorPeter Ekberg <peda@lysator.liu.se>
Tue, 2 Aug 2005 06:10:35 +0000 (06:10 +0000)
committerPeter Rosin <peda@lysator.liu.se>
Tue, 2 Aug 2005 06:10:35 +0000 (06:10 +0000)
set to colon if _some_ cmd of export_symbols_cmds is too long.

ChangeLog
libltdl/ltdl.c
ltmain.in

index 9fc18fac9fbf45370d7aee2d66492ee4c274523b..110782085062258ca20762f70c233515566fb471 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-02  Peter Ekberg  <peda@lysator.liu.se>
+
+       * ltmain.in (link mode) <lib>: Make sure skipped_export is
+       set to colon if _some_ cmd of export_symbols_cmds is too long.
+
 2005-07-24  Peter O'Gorman  <peter@pogma.com>
 
        * libtool.m4 (CXX, archive_cmds) [sun]: Add -lCstd, -lCrun
index 4b99e742caf7f2c98682f0a13e86578265cd656f..378b3e02d86df317d272f23d4bd1ffbcff436b11 100644 (file)
@@ -1348,15 +1348,26 @@ sys_wll_open (loader_data, filename)
   if (!searchname)
     return 0;
 
-#if __CYGWIN__
   {
-    char wpath[MAX_PATH];
-    cygwin_conv_to_full_win32_path(searchname, wpath);
-    module = LoadLibrary(wpath);
-  }
+    /* Silence dialog from LoadLibrary on some failures.
+       No way to get the error mode, but to set it,
+       so set it twice to preserve any previous flags. */
+    UINT errormode = SetErrorMode (SEM_FAILCRITICALERRORS);
+    SetErrorMode (errormode | SEM_FAILCRITICALERRORS);
+
+#if __CYGWIN__
+    {
+      char wpath[MAX_PATH];
+      cygwin_conv_to_full_win32_path (searchname, wpath);
+      module = LoadLibrary (wpath);
+    }
 #else
-  module = LoadLibrary (searchname);
+    module = LoadLibrary (searchname);
 #endif
+
+    /* Restore the error mode. */
+    SetErrorMode (errormode);
+  }
   LT_DLFREE (searchname);
 
   /* libltdl expects this function to fail if it is unable
index 826716056f58bfaf0a87c20b117381b026a12a8b..21af68ba188bcf48467bce7181c29e3542966d0b 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -3815,6 +3815,9 @@ EOF
                # The command line is too long to execute in one step.
                $show "using reloadable object file for export list..."
                skipped_export=:
+               # Break out early, otherwise skipped_export may be
+               # set to false by a later but shorter cmd.
+               break
              fi
            done
            IFS="$save_ifs"