freebsd-src/bin/sh
Martin Cracauer bd80d26f3b PR 28852
sh -e behaviour was incorrect when && and || statements where used in
"if" clauses.

This is the patch submitted by MORI Kouji <mori@tri.asanuma.co.jp>.

It fixes the issue at hand, but sh fixes like this are super-hard to
verify that they don't break anything else.  I ran some of my old test
cases and a few big GNU configure scripts that detected mistakes
before, with the previous sh, patched sh and bash.  No differences in
behaviour found.  MFC recommended after longer than usual time.

Compiles on i386 and sledge.
2003-12-28 02:05:12 +00:00
..
bltin Add FBSDID. 2003-02-05 13:23:46 +00:00
funcs $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
alias.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
alias.h o __P has been reoved 2002-02-02 06:50:57 +00:00
arith.h Style cleanup, mostly 2003-09-04 18:28:42 +00:00
arith.y Fix testing of arith_assign() value for $((a=15)). 2003-09-07 10:14:56 +00:00
arith_lex.l #include <string.h> for prototypes for strcpy() and strlen(). 2003-09-06 16:33:55 +00:00
builtins.def Add the "wordexp" shell built-in command which will be used to implement 2002-12-26 14:28:54 +00:00
cd.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
cd.h o __P has been reoved 2002-02-02 06:50:57 +00:00
error.c Convert the remaining callers of errmsg() to use strerror(), and remove 2002-09-29 11:37:39 +00:00
error.h Convert the remaining callers of errmsg() to use strerror(), and remove 2002-09-29 11:37:39 +00:00
eval.c PR 28852 2003-12-28 02:05:12 +00:00
eval.h Implement the P1003.2 `command' builtin command, which is used to suppress 2002-07-21 06:49:14 +00:00
exec.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
exec.h Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
expand.c Remove collate_range_cmp() stabilization, it conflicts with ranges 2003-08-03 04:28:10 +00:00
expand.h Add the "wordexp" shell built-in command which will be used to implement 2002-12-26 14:28:54 +00:00
histedit.c Delete worthless comments. 2002-10-30 06:34:52 +00:00
init.h o __P has been reoved 2002-02-02 06:50:57 +00:00
input.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
input.h o __P has been reoved 2002-02-02 06:50:57 +00:00
jobs.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
jobs.h Avoid using ints or shorts to store process id's, use pid_t instead. 2002-07-18 10:22:42 +00:00
mail.c Consistently use FBSDID 2002-06-30 05:15:05 +00:00
mail.h o __P has been reoved 2002-02-02 06:50:57 +00:00
main.c Remove some kind of profiling support that required the 4.2BSD monitor() 2002-10-01 01:30:33 +00:00
main.h o __P has been reoved 2002-02-02 06:50:57 +00:00
Makefile The is_name and is_in_name macros are FUBAR'ed. 2003-05-02 06:24:51 +00:00
memalloc.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
memalloc.h o __P has been reoved 2002-02-02 06:50:57 +00:00
miscbltin.c - Don't use quad_t when we really mean rlim_t. 2002-10-01 11:44:38 +00:00
mkbuiltins Do not assume there is only a space between #define and the macro name 2003-09-13 06:59:22 +00:00
mkinit.c Consistently use FBSDID 2002-06-30 05:15:05 +00:00
mknodes.c Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
mksyntax.c Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
mktokens Minor const cleanup. 2002-06-20 05:20:50 +00:00
myhistedit.h Add a `bind' builtin command, which is simply a wrapper around libedit's 2002-07-23 11:50:53 +00:00
mystring.c Consistently use FBSDID 2002-06-30 05:15:05 +00:00
mystring.h o __P has been reoved 2002-02-02 06:50:57 +00:00
nodes.c.pat Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
nodetypes Implement the -C (-o noclobber) option, which prevents existing regular 2002-05-19 06:03:05 +00:00
options.c Consistently use FBSDID 2002-06-30 05:15:05 +00:00
options.h Add a -P/-o physical option which behaves similarly to bash/ksh's options 2002-07-25 10:57:39 +00:00
output.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
output.h Missing prototypes from previous commit. 2002-06-04 13:13:54 +00:00
parser.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
parser.h o __P has been reoved 2002-02-02 06:50:57 +00:00
redir.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
redir.h o __P has been reoved 2002-02-02 06:50:57 +00:00
sh.1 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
shell.h Style cleanup, mostly 2003-09-04 18:28:42 +00:00
show.c Make this compile with DEBUG defined now that WARNS=0 has been removed 2003-01-21 10:06:04 +00:00
show.h o __P has been reoved 2002-02-02 06:50:57 +00:00
TOUR $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
trap.c Avoid calling el_resize() from a signal handler, even though libedit 2002-07-24 02:06:07 +00:00
trap.h Avoid calling el_resize() from a signal handler, even though libedit 2002-07-24 02:06:07 +00:00
var.c Changes following CScout analysis: 2003-07-05 15:18:44 +00:00
var.h Remove bits and pieces of support for atty, which was made obsolete by 2002-10-01 00:54:14 +00:00