From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: setlocale - incorrect error signalled Date: Sat, 22 Jan 2005 08:49:42 +1100 Message-ID: <87mzv2e9l5.fsf@zip.com.au> References: <200501211315.01753.bruno@clisp.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106346140 25175 80.91.229.6 (21 Jan 2005 22:22:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Jan 2005 22:22:20 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jan 21 23:22:12 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cs7AS-0000M7-00 for ; Fri, 21 Jan 2005 23:22:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cs7MW-0005sw-QX for guile-devel@m.gmane.org; Fri, 21 Jan 2005 17:34:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cs7L0-0005CK-Kl for guile-devel@gnu.org; Fri, 21 Jan 2005 17:33:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cs7Jc-0004jP-BY for guile-devel@gnu.org; Fri, 21 Jan 2005 17:31:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cs7JV-0004Q4-KB for guile-devel@gnu.org; Fri, 21 Jan 2005 17:31:33 -0500 Original-Received: from [61.8.0.85] (helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cs6fD-0003pW-0b for guile-devel@gnu.org; Fri, 21 Jan 2005 16:49:55 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout2.pacific.net.au (8.12.3/8.12.3/Debian-7.1) with ESMTP id j0LLnmHn025914; Sat, 22 Jan 2005 08:49:48 +1100 Original-Received: from localhost (ppp2A8F.dyn.pacific.net.au [61.8.42.143]) by mailproxy1.pacific.net.au (8.12.3/8.12.3/Debian-7.1) with ESMTP id j0LLnlVT008344; Sat, 22 Jan 2005 08:49:47 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1Cs6f0-0000P5-00; Sat, 22 Jan 2005 08:49:42 +1100 Original-To: Bruno Haible Mail-Copies-To: never In-Reply-To: <200501211315.01753.bruno@clisp.org> (Bruno Haible's message of "Fri, 21 Jan 2005 13:15:01 +0100") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4718 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4718 Bruno Haible writes: > > "No such file or directory" is incorrect. glibc does end up setting that, it's not just what was left there from before. > setlocale() is not required to set errno when it fails, Yep. > rv = setlocale (scm_i_to_lc_category (category, 1), clocale); > if (rv == NULL) > SCM_SYSERROR; <=== This is the problem. Could force an errno=EINVAL in there, so that's always the error given. Or alternately put errno=EINVAL before the setlocale, as a default if setlocale doesn't change errno. I suppose the former might be most standards-compliant. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel