From: Ralf Wildenhues Date: Wed, 5 Mar 2008 20:14:43 +0000 (+0000) Subject: * libltdl/config/ltmain.m4sh (func_lalib_unsafe_p): redirect X-Git-Tag: v2.2.2~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54c180945e5b9240f710ae922146b4f913bd33c1;p=thirdparty%2Flibtool.git * libltdl/config/ltmain.m4sh (func_lalib_unsafe_p): redirect and restore from stdin, not stdout. * tests/execute-mode.at (execute mode): Adjust test to catch this. Report by Roberto Bagnara. --- diff --git a/ChangeLog b/ChangeLog index ee4ff3dde..082dea531 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-05 Ralf Wildenhues + + * libltdl/config/ltmain.m4sh (func_lalib_unsafe_p): redirect + and restore from stdin, not stdout. + * tests/execute-mode.at (execute mode): Adjust test to catch + this. + Report by Roberto Bagnara. + 2008-03-04 Ralf Wildenhues Fix libltdl to not skip dlopen on systems with several loaders, diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 0d0d8a6f5..13b221d08 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -648,7 +648,7 @@ func_lalib_p () func_lalib_unsafe_p () { lalib_p=no - if test -r "$1" && exec 5<&1 <"$1"; then + if test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line @@ -656,7 +656,7 @@ func_lalib_unsafe_p () \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done - exec 1<&5 5<&- + exec 0<&5 5<&- fi test "$lalib_p" = yes } diff --git a/tests/execute-mode.at b/tests/execute-mode.at index 257e9d3c8..349c829f7 100644 --- a/tests/execute-mode.at +++ b/tests/execute-mode.at @@ -51,6 +51,30 @@ fi AT_DATA([lt-real], [[#! /bin/sh echo "$@" +cat +]]) + +AT_DATA([libfakelib.la], +[[# libfakelib.la - a libtool library file +# Generated by ltmain.sh (GNU libtool 1.2605 2008/03/04 22:31:32) 2.3a +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +dlname='' +library_names='' +old_library='libfakelib.a' +inherited_linker_flags='' +dependency_libs='' +weak_library_names='' +current= +age= +revision= +installed=no +shouldnotlink=yes +dlopen='' +dlpreopen='' +libdir='' ]]) mkdir sub @@ -61,20 +85,26 @@ AT_CHECK([$LIBTOOL --mode=execute ./foo]) AT_CHECK([$LIBTOOL --mode=execute sub/foo]) AT_CHECK([$LIBTOOL --mode=execute ./foo foo], [], [foo ]) -AT_CHECK([$LIBTOOL --mode=execute ./lt-wrapper foo], [], [foo +AT_CHECK([$LIBTOOL --mode=execute ./lt-wrapper foo