diff options
author | gjb <gjb@FreeBSD.org> | 2016-04-11 15:24:59 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2016-04-11 15:24:59 +0000 |
commit | e0e3598ce13850597a66fd28d102b36881f7d610 (patch) | |
tree | f5194d1ce3fa45b67cf63080fc519fec83abc57a /bin | |
parent | cbc3bd9845ba5fd58e8132f9565cfbc41433938d (diff) | |
parent | 26836fccd261358467b3d92e77ff4695af286de9 (diff) | |
download | FreeBSD-src-e0e3598ce13850597a66fd28d102b36881f7d610.zip FreeBSD-src-e0e3598ce13850597a66fd28d102b36881f7d610.tar.gz |
MFH
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'bin')
-rw-r--r-- | bin/csh/config_p.h | 4 | ||||
-rw-r--r-- | bin/sh/miscbltin.c | 2 | ||||
-rw-r--r-- | bin/sh/parser.c | 2 | ||||
-rw-r--r-- | bin/sh/tests/builtins/getopts1.0 | 8 | ||||
-rw-r--r-- | bin/sh/tests/builtins/getopts2.0 | 2 | ||||
-rw-r--r-- | bin/sh/tests/builtins/getopts9.0 | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/bin/csh/config_p.h b/bin/csh/config_p.h index f2d7ebc..c25e87a 100644 --- a/bin/csh/config_p.h +++ b/bin/csh/config_p.h @@ -34,7 +34,8 @@ * Note that some machines eg. rs6000 have a vfork, but not * with the berkeley semantics, so we cannot use it there either. */ -#define VFORK +/* #define VFORK */ +#define vfork fork /* * BSDJOBS You have BSD-style job control (both process groups and @@ -80,7 +81,6 @@ /****************** local defines *********************/ #if defined(__FreeBSD__) -#define SAVESIGVEC #define NLS_BUGS #define BSD_STYLE_COLORLS /* Use LC_MESSAGES locale category to open the message catalog */ diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 1537196..56ecae8 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -341,7 +341,7 @@ umaskcmd(int argc __unused, char **argv __unused) } else { void *set; INTOFF; - if ((set = setmode (ap)) == 0) + if ((set = setmode (ap)) == NULL) error("Illegal number: %s", ap); mask = getmode (set, ~mask & 0777); diff --git a/bin/sh/parser.c b/bin/sh/parser.c index da6defd..3f9732c 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -628,7 +628,7 @@ simplecmd(union node **rpp, union node *redir) /* If we don't have any redirections already, then we must reset */ /* rpp to be the address of the local redir variable. */ - if (redir == 0) + if (redir == NULL) rpp = &redir; args = NULL; diff --git a/bin/sh/tests/builtins/getopts1.0 b/bin/sh/tests/builtins/getopts1.0 index 64763bc..10d2b59 100644 --- a/bin/sh/tests/builtins/getopts1.0 +++ b/bin/sh/tests/builtins/getopts1.0 @@ -3,7 +3,7 @@ printf -- '-1-\n' set -- -abc getopts "ab:" OPTION -echo ${OPTION} +printf '%s\n' "${OPTION}" # In this case 'getopts' should realize that we have not provided the # required argument for "-b". @@ -14,12 +14,12 @@ echo ${OPTION} printf -- '-2-\n' set -- -ab getopts "ab:" OPTION -echo ${OPTION} +printf '%s\n' "${OPTION}" getopts "ab:" OPTION 3>&2 2>&1 >&3 3>&- -echo ${OPTION} +printf '%s\n' "${OPTION}" # The 'shift' is aimed at causing an error. printf -- '-3-\n' shift 1 getopts "ab:" OPTION -echo ${OPTION} +printf '%s\n' "${OPTION}" diff --git a/bin/sh/tests/builtins/getopts2.0 b/bin/sh/tests/builtins/getopts2.0 index 5a5dbe2..1bd2c32 100644 --- a/bin/sh/tests/builtins/getopts2.0 +++ b/bin/sh/tests/builtins/getopts2.0 @@ -3,4 +3,4 @@ set - -ax getopts ax option set -C getopts ax option -echo $option +printf '%s\n' "$option" diff --git a/bin/sh/tests/builtins/getopts9.0 b/bin/sh/tests/builtins/getopts9.0 index d23fc43..1c35fc6 100644 --- a/bin/sh/tests/builtins/getopts9.0 +++ b/bin/sh/tests/builtins/getopts9.0 @@ -2,8 +2,8 @@ args='-ab' getopts ab opt $args -echo $?:$opt:$OPTARG +printf '%s\n' "$?:$opt:$OPTARG" for dummy in dummy1 dummy2; do getopts ab opt $args - echo $?:$opt:$OPTARG + printf '%s\n' "$?:$opt:$OPTARG" done |