From owner-svn-src-all@FreeBSD.ORG Wed Aug 14 21:59:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D3118DC1; Wed, 14 Aug 2013 21:59:48 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BFBCD2A68; Wed, 14 Aug 2013 21:59:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7ELxmYl063418; Wed, 14 Aug 2013 21:59:48 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7ELxmhi063416; Wed, 14 Aug 2013 21:59:48 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308142159.r7ELxmhi063416@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 14 Aug 2013 21:59:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254339 - in head: bin/sh tools/regression/bin/sh/builtins X-SVN-Group: head 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.14 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, 14 Aug 2013 21:59:48 -0000 Author: jilles Date: Wed Aug 14 21:59:48 2013 New Revision: 254339 URL: http://svnweb.freebsd.org/changeset/base/254339 Log: sh: Recognize "--" as end of options in local builtin. Added: head/tools/regression/bin/sh/builtins/local4.0 (contents, props changed) Modified: head/bin/sh/var.c Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Wed Aug 14 21:51:32 2013 (r254338) +++ head/bin/sh/var.c Wed Aug 14 21:59:48 2013 (r254339) @@ -710,6 +710,7 @@ localcmd(int argc __unused, char **argv { char *name; + nextopt(""); if (! in_function()) error("Not in a function"); while ((name = *argptr++) != NULL) { Added: head/tools/regression/bin/sh/builtins/local4.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/local4.0 Wed Aug 14 21:59:48 2013 (r254339) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +f() { + local -- x + x=2 + [ "$x" = 2 ] +} +x=1 +f || exit 3 +[ "$x" = 1 ] || exit 3 +f || exit 3 +[ "$x" = 1 ] || exit 3