From owner-freebsd-current@FreeBSD.ORG Sat Jan 23 19:43:37 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CADD31065670; Sat, 23 Jan 2010 19:43:37 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 7B62B8FC1F; Sat, 23 Jan 2010 19:43:37 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 5FF5B14DA313; Sat, 23 Jan 2010 20:43:36 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bhcxdkPmtGeI; Sat, 23 Jan 2010 20:43:26 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id C4AA514DA363; Sat, 23 Jan 2010 20:43:26 +0100 (CET) Message-ID: <4B5B515C.9000109@FreeBSD.org> Date: Sat, 23 Jan 2010 20:43:24 +0100 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; es-ES; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Kostik Belousov References: <20100119212019.GL59590@deviant.kiev.zoral.com.ua> <4B56CACF.50508@FreeBSD.org> <20100123193834.GM59590@deviant.kiev.zoral.com.ua> In-Reply-To: <20100123193834.GM59590@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: attilio@freebsd.org, Hajimu UMEMOTO , current@freebsd.org Subject: Re: NLS/strerror efficiency X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 19:43:37 -0000 El 2010. 01. 23. 20:38, Kostik Belousov escribió: > Wouldn't this cause the locale for error strings to be fixated at the > time of the first strerror/gai_strerror call ? > > Current code, despite it inefficiency, allow dynamic change of locale > that is reflected in strerror() output, I believe. > That's a good point. Imho, it should be cached in another static variable just like in my patch, where I should store it in another member of the struct. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org