This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bash-ism in #!/bin/sh script stdio-common/tst-printf.sh


Hi.

Current CVS head.  Make check fails when /bin/sh is PD KSH, because the
script stdio-common/tst-printf.sh says "#! /bin/sh" at the top, but uses
the bash-ism "... >& /dev/null" to redirect both stdout and stderr to
/dev/null.

Patch:
------------------------------------------------------------------------------
Index: stdio-common/tst-printf.sh
===================================================================
RCS file: /cvs/glibc/libc/stdio-common/tst-printf.sh,v
retrieving revision 1.4
diff -u -r1.4 tst-printf.sh
--- tst-printf.sh	2000/09/25 05:09:39	1.4
+++ tst-printf.sh	2001/02/27 02:46:30
@@ -138,7 +138,7 @@
 printf ("%hu", 65537) = 1
 --- Should be no further output. ---
 EOF
-cmp - ${common_objpfx}stdio-common/tst-printf.out >& /dev/null ||
+cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 ||
 cat <<'EOF' |
 %.4x:	`0012'
 %04x:	`0012'
@@ -249,7 +249,7 @@
 printf ("%hu", 65537) = 1
 --- Should be no further output. ---
 EOF
-cmp - ${common_objpfx}stdio-common/tst-printf.out >& /dev/null ||
+cmp - ${common_objpfx}stdio-common/tst-printf.out > /dev/null 2>&1 ||
 {
   status=1
   echo "*** output comparison failed"
------------------------------------------------------------------------------

Matt.
-- 
"Oh bother," said the Borg, "We have assimilated Pooh".
	-- MHR on afp
				-- According to a .sig by Chris Suslowicz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]