From asmodai@nexus.ninth-circle.org  Thu Dec  5 12:29:43 2002
Return-Path: <asmodai@nexus.ninth-circle.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5E62537B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  5 Dec 2002 12:29:43 -0800 (PST)
Received: from 213-84-207-11.adsl.xs4all.nl (nexus.xs4all.nl [213.84.207.11])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8261B43E9C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  5 Dec 2002 12:29:37 -0800 (PST)
	(envelope-from asmodai@nexus.ninth-circle.org)
Received: by 213-84-207-11.adsl.xs4all.nl (Postfix, from userid 1000)
	id C912BB1; Thu,  5 Dec 2002 21:30:34 +0100 (CET)
Message-Id: <20021205203034.C912BB1@213-84-207-11.adsl.xs4all.nl>
Date: Thu,  5 Dec 2002 21:30:34 +0100 (CET)
From: Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
Reply-To: Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [Patch] Fix non standard C code
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46015
>Category:       bin
>Synopsis:       [Patch] Fix non standard C code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 05 12:30:01 PST 2002
>Closed-Date:    Fri Jan 31 02:40:54 PST 2003
>Last-Modified:  Fri Jan 31 02:40:54 PST 2003
>Originator:     Jeroen Ruigrok van der Werven
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Ninth Circle Enterprises
>Environment:
System: FreeBSD nexus.chronias.ninth-circle.org 4.7-STABLE FreeBSD 4.7-STABLE #5: Sat Oct 19 12:35:12 CEST 2002 asmodai@nexus.chronias.ninth-circle.org:/usr/src/sys/compile/NEXUS i386


>Description:

FreeBSD depends on some very specific gcc C code.  This makes it less
portable to other compilers.

>How-To-Repeat:

Read src/bin/sh/bltin/echo.c, look for \e.

>Fix:

Index: src/bin/sh/bltin/echo.c
===================================================================
RCS file: /home/ncvs/FreeBSD/src/bin/sh/bltin/echo.c,v
retrieving revision 1.11
diff -u -r1.11 echo.c
--- src/bin/sh/bltin/echo.c	2 Feb 2002 06:50:55 -0000	1.11
+++ src/bin/sh/bltin/echo.c	5 Dec 2002 19:05:42 -0000
@@ -80,7 +80,7 @@
 				case 'a':  c = '\a';  break;
 				case 'b':  c = '\b';  break;
 				case 'c':  return 0;		/* exit */
-				case 'e':  c = '\e';  break;
+				case 'e':  c = '\0033'; break;
 				case 'f':  c = '\f';  break;
 				case 'n':  c = '\n';  break;
 				case 'r':  c = '\r';  break;
>Release-Note:
>Audit-Trail:

From: Jeroen Ruigrok/asmodai <asmodai@wxs.nl>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc:  
Subject: Re: bin/46015: [Patch] Fix non standard C code
Date: Thu, 5 Dec 2002 22:27:01 +0100

 --ZGiS0Q5IWpPtfppv
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Of course,
 
 I botched the patch, here's the right one:
 
 -- 
 Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / Kita no Mono
 Ninth Circle Enterprises | WTO + WIPO = DMCA? 
 http://www.tendra.org/   | http://www.anti-dmca.org/
 To meet, to know, to love - and then to part, is the sad tale of many a
 heart...
 
 --ZGiS0Q5IWpPtfppv
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="sh-echo.diff"
 
 Index: src/bin/sh/bltin/echo.c
 ===================================================================
 RCS file: /home/ncvs/FreeBSD/src/bin/sh/bltin/echo.c,v
 retrieving revision 1.11
 diff -u -r1.11 echo.c
 --- src/bin/sh/bltin/echo.c	2 Feb 2002 06:50:55 -0000	1.11
 +++ src/bin/sh/bltin/echo.c	5 Dec 2002 21:20:56 -0000
 @@ -80,7 +80,7 @@
  				case 'a':  c = '\a';  break;
  				case 'b':  c = '\b';  break;
  				case 'c':  return 0;		/* exit */
 -				case 'e':  c = '\e';  break;
 +				case 'e':  c = '\033'; break;
  				case 'f':  c = '\f';  break;
  				case 'n':  c = '\n';  break;
  				case 'r':  c = '\r';  break;
 
 --ZGiS0Q5IWpPtfppv--
Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Sun Dec 22 13:35:22 PST 2002 
Responsible-Changed-Why:  
Committed to -current, I will close the PR when I MFC. 

I trust your TenDRA work is going well ;-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46015 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Fri Jan 31 02:40:39 PST 2003 
State-Changed-Why:  
Fixed in -current and -stable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46015 
>Unformatted:
