Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  5 Dec 2002 21:30:34 +0100 (CET)
From:      Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/46015: [Patch] Fix non standard C code
Message-ID:  <20021205203034.C912BB1@213-84-207-11.adsl.xs4all.nl>

next in thread | raw e-mail | index | archive | help

>Number:         46015
>Category:       bin
>Synopsis:       [Patch] Fix non standard C code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 05 12:30:01 PST 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021205203034.C912BB1>