From owner-svn-src-all@freebsd.org Wed Apr 22 21:45:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAEE22C3E33; Wed, 22 Apr 2020 21:45:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496vBH5wFHz41w7; Wed, 22 Apr 2020 21:45:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C659621838; Wed, 22 Apr 2020 21:45:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MLjhAm090822; Wed, 22 Apr 2020 21:45:43 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MLjhl0090820; Wed, 22 Apr 2020 21:45:43 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <202004222145.03MLjhl0090820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 22 Apr 2020 21:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360210 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 360210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:45:44 -0000 Author: jilles Date: Wed Apr 22 21:45:43 2020 New Revision: 360210 URL: https://svnweb.freebsd.org/changeset/base/360210 Log: 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. Modified: head/bin/sh/builtins.def head/bin/sh/mkbuiltins Modified: head/bin/sh/builtins.def ============================================================================== --- head/bin/sh/builtins.def Wed Apr 22 21:22:33 2020 (r360209) +++ head/bin/sh/builtins.def Wed Apr 22 21:45:43 2020 (r360210) @@ -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 Modified: head/bin/sh/mkbuiltins ============================================================================== --- head/bin/sh/mkbuiltins Wed Apr 22 21:22:33 2020 (r360209) +++ head/bin/sh/mkbuiltins Wed Apr 22 21:45:43 2020 (r360210) @@ -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 '};