]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/config/ltmain.m4sh (func_lalib_unsafe_p) [osf]:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 28 Aug 2005 15:34:19 +0000 (15:34 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 28 Aug 2005 15:34:19 +0000 (15:34 +0000)
Save file descriptor to original STDIN, and restore after
redirection.  Fixes memory corruption with Tru64 and OSF sh.
Reported by Nicolas Joly <njoly@pasteur.fr>.

ChangeLog
libltdl/config/ltmain.m4sh

index eb7a07390366277ff98d4d933ad0af6d7f11598d..bff759e636b4c18087601a920fdcba50fba13a8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
-2005-08-26  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+2005-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>,
+           Gary V. Vaughan <gary@gnu.org>
+
+       * libltdl/config/ltmain.m4sh (func_lalib_unsafe_p) [osf]:
+       Save file descriptor to original STDIN, and restore after
+       redirection.  Fixes memory corruption with Tru64 and OSF sh.
+       Reported by Nicolas Joly <njoly@pasteur.fr>.
+
+2005-08-26  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>,
            Peter Ekberg  <peda@lysator.liu.se>
 
        * tests/early-libtool.at: Fix goofed up make rules in
index 17fe229f8a90af05cec19f510c501082f9dae0b2..a855fa1882ed8d3c87466020f9bf5baab189cf93 100644 (file)
@@ -603,7 +603,7 @@ func_lalib_p ()
 func_lalib_unsafe_p ()
 {
     lalib_p=no
-    if test -r "$1" && exec <"$1"; then
+    if test -r "$1" && exec 5<&1 <"$1"; then
        for lalib_p_l in 1 2 3 4
        do
            read lalib_p_line
@@ -611,7 +611,7 @@ func_lalib_unsafe_p ()
                \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
            esac
        done
-       exec <&-
+       exec 1<&5 5<&-
     fi
     test "$lalib_p" = yes
 }