bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

echo should default to xpg behavior when posixly correct


From: llattanz
Subject: echo should default to xpg behavior when posixly correct
Date: Mon, 21 Jun 2004 12:07:10 -0700 (PDT)

Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: darwin8.0
Compiler: gcc
Compilation CFLAGS: -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -arch i386 -arch ppc -pipe -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc' -DCONF_OSTYPE='darwin8.0' -DCONF_MACHTYPE='powerpc-apple-darwin8.0' -DCONF_VENDOR='apple' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I. -I/SourceCache/bash/bash-30/bash -I/SourceCache/bash/bash-30/bash/include -I/SourceCache/bash/bash-30/bash/lib -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -arch i386 -arch ppc -pipe uname output: Darwin stderr.apple.com 8.0.0b1 Darwin Kernel Version 8.0.0b1: Mon May 10 23:45:14 PDT 2004; root:xnu/xnu-600.3.obj~4/RELEASE_PPC Power Macintosh powerpc
Machine Type: powerpc-apple-darwin8.0

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        echo '\\r' #should print \r when running as bash --posix

Repeat-By:
        echo '\\r'
        compare with
        echo -e '\\r'

Fix:
Index: echo.def
===================================================================
RCS file: /cvs/root/bash/bash/builtins/echo.def,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.18.1
diff -u -d -b -w -r1.1.1.3 -r1.1.1.3.18.1
--- echo.def    2003/04/05 08:00:27     1.1.1.3
+++ echo.def    2004/06/21 18:33:19     1.1.1.3.18.1
@@ -30,6 +30,7 @@

 #include <stdio.h>
 #include "../shell.h"
+extern int posixly_correct;

 $BUILTIN echo
 $FUNCTION echo_builtin
@@ -88,7 +89,7 @@
   int display_return, do_v9, i, len;
   char *temp, *s;

-  do_v9 = xpg_echo;
+  do_v9 = xpg_echo || posixly_correct;
   display_return = 1;

for (; list && (temp = list->word->word) && *temp == '-'; list = list->next)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]