Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 66638 invoked by uid 500); 17 Jul 2002 01:14:09 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 66623 invoked from network); 17 Jul 2002 01:14:08 -0000 Message-ID: <3D34C4E6.5040909@xbc.nu> Date: Wed, 17 Jul 2002 03:14:14 +0200 From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a) Gecko/20020611 X-Accept-Language: sl, en-gb, en MIME-Version: 1.0 To: Blair Zajac CC: Ulrich Drepper , Karl Fogel , dev@subversion.tigris.org, Apache Apr Mailing List Subject: Re: Is --enable-utf8 working everywhere? References: <85r8i5c8ee.fsf_-_@newton.ch.collab.net> <3D345ADA.B3C49ED5@orcaware.com> <1026856417.3672.120.camel@myware.mynet> <3D34A2AC.7F3D417F@orcaware.com> <1026865314.3673.126.camel@myware.mynet> <3D34BF26.FF32DF50@orcaware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Blair Zajac wrote: >Ulrich Drepper wrote: > > >>On Tue, 2002-07-16 at 15:48, Blair Zajac wrote: >> >>As a real patch use >> >>--- apr/i18n/unix/xlate.c Tue Apr 16 15:37:07 2002 >>+++ apr/i18n/unix/xlate.c-new Tue Jul 16 17:21:07 2002 >>@@ -255,7 +255,8 @@ >> if (!found) { >> new->ich = iconv_open(topage, frompage); >> if (new->ich == (iconv_t)-1) { >>- return errno; >>+ int e = errno; >>+ return e ? e : EINVAL; >> } >> found = 1; >> check_sbcs(new); >> >> > >Karl, can you help out here and check in a fix for this? > >We don't need to make a copy of errno. > Strictly speaking, Ulrich's patch is better, because there's no guarantee that "errno" is a simple global variable. It could be translated into a function call, for all you know -- depends on the platform, linc implementation, threading support, etc. etc. So making a copy makes sense. > It's not clear to me which >error value we should pick. Is EINVAL appropriate when the OS >doesn't set errno when it should? Maybe we should use something >else that signifies we don't know what the real errno is. The >Solaris man pages for iconv_open() says it can return EMFILE, >ENFILE, ENOMEM and EINVAL. > EINVAL is right. -- Brane Čibej http://www.xbc.nu/brane/