From owner-freebsd-arch@FreeBSD.ORG Fri May 4 22:26:43 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6D8C16A400; Fri, 4 May 2007 22:26:43 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 4806013C45E; Fri, 4 May 2007 22:26:42 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.1/8.14.1) with ESMTP id l44MQXAi035598; Sat, 5 May 2007 02:26:33 +0400 (MSD) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id l44MQXL1035596; Sat, 5 May 2007 02:26:33 +0400 (MSD) (envelope-from ache) Date: Sat, 5 May 2007 02:26:32 +0400 From: Andrey Chernov To: "Sean C. Farley" Message-ID: <20070504222632.GA35447@nagual.pp.ru> References: <20070501160645.GA9333@nagual.pp.ru> <20070501135439.B36275@thor.farley.org> <20070502.102822.-957833022.imp@bsdimp.com> <20070502183100.P1317@baba.farley.org> <20070502230413.Y30614@thor.farley.org> <20070503160351.GA15008@nagual.pp.ru> <20070504085905.J39482@thor.farley.org> <20070504213312.GA33163@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070504213312.GA33163@nagual.pp.ru> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Daniel Eischen , arch@freebsd.org Subject: Re: HEADS DOWN X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2007 22:26:43 -0000 On Sat, May 05, 2007 at 01:33:12AM +0400, Andrey Chernov wrote: > On Fri, May 04, 2007 at 01:21:50PM -0500, Sean C. Farley wrote: > > I believe I check all that you did in your changes. Mine looks a little > > different since some checks were combined for speed (i.e., > > __strleneq()). > > Looking at > http://www.farley.org/freebsd/tmp/setenv-8/POSIX/sysenv.c It seems putenv("a=b"); ... putenv("a=c"); can be optimized a bit more. Currently you always realloc and rebuild_environ on any putenv call. But envVars[envNdx].active = false; if (envVars[envNdx].putenv) __remove_putenv(envNdx); in putenv() can be just changed to: if (envVars[envNdx].putenv) { envVars[envNdx].name = string; return (0); } envVars[envNdx].active = false; (unless I not miss something). -- http://ache.pp.ru/