Hi Stas,

thanks for the patch.  I've fixed the issue Charles noted, and rewrote
the ChangeLog entry to match GCS requirements, and pushed like this.

(The "tiny change" is to note that your change does not need copyright
papers.)

Cheers
Ralf

commit 154ca8a7087116d45e7e66d218d5d84f02708ebb
Author: Stas Maximov <[EMAIL PROTECTED]>
Date:   Sun Jun 1 09:36:19 2008 +0200

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Wildenhues <[EMAIL PROTECTED]>

diff --git a/ChangeLog b/ChangeLog
index 90c8ebd..6dc24f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-05-01  Stas Maximov  <[EMAIL PROTECTED]>  (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  <[EMAIL PROTECTED]>
 
        Skip darwin test if fat link fails.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 144bc76..84977a0 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


Reply via email to