[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Is --enable-utf8 working everywhere?

From: Blair Zajac <blair_at_orcaware.com>
Date: 2002-07-17 02:49:42 CEST

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. 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.

diff -u -r1.28 xlate.c
--- i18n/unix/xlate.c 15 Jul 2002 19:21:01 -0000 1.28
+++ i18n/unix/xlate.c 17 Jul 2002 00:45:19 -0000
@@ -269,7 +269,7 @@
     if (!found) {
         new->ich = iconv_open(topage, frompage);
         if (new->ich == (iconv_t)-1) {
- return errno;
+ return errno ? errno : EINVAL;
         }
         found = 1;
         check_sbcs(new);

Best,
Blair

-- 
Blair Zajac <blair@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 17 02:50:37 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.