public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/10270: gccbug's echo displays '-n' instead of no-line-break
@ 2003-03-30 13:28 Hallvard B Furuseth
0 siblings, 0 replies; only message in thread
From: Hallvard B Furuseth @ 2003-03-30 13:28 UTC (permalink / raw)
To: gcc-gnats
>Number: 10270
>Category: other
>Synopsis: gccbug's echo displays '-n' instead of no-line-break
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 30 12:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Hallvard B Furuseth
>Release: 3.2.2
>Organization:
>Environment:
System: SunOS bombur.uio.no 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ../gcc-3.2.2/configure --enable-languages=c,c++,f77 --prefix=/usit/bombur/hbf --enable-version-specific-runtime-libs --enable-threads
>Description:
gccbug asks '-n a)bort, e)dit or s)end?' when /bin/echo
is the first echo in $PATH.
>How-To-Repeat:
PATH="/bin:$PATH" gccbug
>Fix:
Don't hard-code ECHON=bsd in gccbug, instead check for bsd vs. sysv echo
at run-time:
--- gccbug~ Sun Mar 30 01:15:28 2003
+++ gccbug Sun Mar 30 13:55:33 2003
@@ -56,16 +56,13 @@
PASSWD="cat /etc/passwd"
-ECHON=bsd
-
-if [ $ECHON = bsd ] ; then
- ECHON1="echo -n"
- ECHON2=
-elif [ $ECHON = sysv ] ; then
- ECHON1=echo
- ECHON2='\c'
-else
- ECHON1=echo
- ECHON2=
-fi
+ECHON1="echo -n"
+ECHON2='\c'
+case `$ECHON1 "foo $ECHON2"` in
+ -n*c) ECHON1=echo
+ ECHON2=
+ ;;
+ -n*) ECHON1=echo ;;
+ *) ECHON2= ;;
+esac
#\f
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-30 12:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-30 13:28 other/10270: gccbug's echo displays '-n' instead of no-line-break Hallvard B Furuseth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).