summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2020-04-22 21:45:43 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2020-04-22 21:45:43 +0000
commitda06ef25e65597c24daafba4e36a559207383441 (patch)
treeebe63b20618a63d78788758b5cd25ce009f68450 /bin
parent8262311cbe7491c50be9a815951f56ce7b73ad06 (diff)
downloadsrc-test-da06ef25e65597c24daafba4e36a559207383441.tar.gz
src-test-da06ef25e65597c24daafba4e36a559207383441.zip
sh: Remove remnants to compile out fc completely
r360139 made compiling with NO_HISTORY work. This #define does not remove the fc and bind builtins completely but makes them always write an error message. However, there was also some code in builtins.def and mkbuiltins to remove the fc builtin entirely (but not the bind builtin). The additional build system complication to make this work seems not worth it, so remove that code.
Notes
Notes: svn path=/head/; revision=360210
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/builtins.def4
-rwxr-xr-xbin/sh/mkbuiltins9
2 files changed, 3 insertions, 10 deletions
diff --git a/bin/sh/builtins.def b/bin/sh/builtins.def
index a3cea9f6e441e..f38af0f24dce5 100644
--- a/bin/sh/builtins.def
+++ b/bin/sh/builtins.def
@@ -39,8 +39,6 @@
# of a C routine.
# The -j flag specifies that this command is to be excluded from systems
# without job control.
-# The -h flag specifies that this command is to be excluded from systems
-# based on the NO_HISTORY compile-time symbol.
# The -n flag specifies that this command can safely be run in the same
# process when it is the only command in a command substitution. Some
# commands have special logic defined in safe_builtin().
@@ -71,7 +69,7 @@ fgcmd -j fg
freebsd_wordexpcmd freebsd_wordexp
getoptscmd getopts
hashcmd hash
-histcmd -h fc
+histcmd fc
jobidcmd -n jobid
jobscmd -n jobs
killcmd -n kill
diff --git a/bin/sh/mkbuiltins b/bin/sh/mkbuiltins
index 443a3dcbe7055..a04a796e275f4 100755
--- a/bin/sh/mkbuiltins
+++ b/bin/sh/mkbuiltins
@@ -35,11 +35,6 @@
# $FreeBSD$
temp=`mktemp -t ka`
-havehist=1
-if [ "X$1" = "X-h" ]; then
- havehist=0
- shift
-fi
srcdir=$1
havejobs=0
if grep '^#define[ ]*JOBS[ ]*1' $srcdir/shell.h > /dev/null
@@ -56,8 +51,8 @@ cat <<\!
#include "builtins.h"
!
-awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \
- print $0}' $srcdir/builtins.def | sed 's/-[hj]//' > $temp
+awk '/^[^#]/ {if('$havejobs' || $2 != "-j") \
+ print $0}' $srcdir/builtins.def | sed 's/-j//' > $temp
echo 'int (*const builtinfunc[])(int, char **) = {'
awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp
echo '};