]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Check only regular files, not devices, for lalibs.
authorStas Maximov <smaximov@ieee.org>
Sun, 1 Jun 2008 07:36:19 +0000 (09:36 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 1 Jun 2008 07:38:31 +0000 (09:38 +0200)
* 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 <smaximov@ieee.org>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
libltdl/config/ltmain.m4sh

index 90c8ebda69b3c7a482a8df0bdf2c1df2f0841a08..6dc24f322138e9f405cd98c587217158151e9b97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-05-01  Stas Maximov  <smaximov@ieee.org>  (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  <peter@pogma.com>
 
        Skip darwin test if fat link fails.
index 144bc76b0366124c1b4e875512b549c8ab539720..84977a0a8c7fa00f5e37c783de7e4d0455ef2600 100644 (file)
@@ -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