From e746d8b857e916fa809f03488ec2db25ee2d36a9 Mon Sep 17 00:00:00 2001 From: Peter Ekberg Date: Tue, 2 Aug 2005 06:10:35 +0000 Subject: [PATCH] * ltmain.in (link mode) : Make sure skipped_export is set to colon if _some_ cmd of export_symbols_cmds is too long. --- ChangeLog | 5 +++++ libltdl/ltdl.c | 23 +++++++++++++++++------ ltmain.in | 3 +++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9fc18fac9..110782085 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-02 Peter Ekberg + + * ltmain.in (link mode) : Make sure skipped_export is + set to colon if _some_ cmd of export_symbols_cmds is too long. + 2005-07-24 Peter O'Gorman * libtool.m4 (CXX, archive_cmds) [sun]: Add -lCstd, -lCrun diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 4b99e742c..378b3e02d 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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 diff --git a/ltmain.in b/ltmain.in index 826716056..21af68ba1 100644 --- 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" -- 2.47.3