From: Stas Maximov Date: Sun, 1 Jun 2008 07:36:19 +0000 (+0200) Subject: Check only regular files, not devices, for lalibs. X-Git-Tag: v2.2.6~31 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=154ca8a7087116d45e7e66d218d5d84f02708ebb;p=thirdparty%2Flibtool.git Check only regular files, not devices, for lalibs. * libltdl/config/ltmain.m4sh (functions func_lalib_p) (func_lalib_unsafe_p): Only read regular files and not device files. Avoids blocking libtool executing gdb, when a pseudo-terminal device /dev/pts/NN is given as one of the arguments to gdb, as in: libtool --mode=execute gdb -q -nw -i mi -tty /dev/pts/4 prog Signed-off-by: Stas Maximov Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 90c8ebda6..6dc24f322 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-05-01 Stas Maximov (tiny change) + + Check only regular files, not devices, for lalibs. + * libltdl/config/ltmain.m4sh (functions func_lalib_p) + (func_lalib_unsafe_p): Only read regular files and not device + files. Avoids blocking libtool executing gdb, when a + pseudo-terminal device /dev/pts/NN is given as one of the + arguments to gdb, as in: + libtool --mode=execute gdb -q -nw -i mi -tty /dev/pts/4 prog + 2008-05-31 Peter O'Gorman Skip darwin test if fat link fails. diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 144bc76b0..84977a0a8 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -451,8 +451,9 @@ $opt_help || { # determined imposters. func_lalib_p () { - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file @@ -465,7 +466,7 @@ func_lalib_p () func_lalib_unsafe_p () { lalib_p=no - if test -r "$1" && exec 5<&0 <"$1"; then + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line