From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5264 invoked from network); 18 Mar 2003 14:11:04 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Mar 2003 14:11:04 -0000 Received: (qmail 15573 invoked by alias); 18 Mar 2003 14:10:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18360 Received: (qmail 15565 invoked from network); 18 Mar 2003 14:10:58 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 18 Mar 2003 14:10:58 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [198.51.251.8] by sunsite.dk (MessageWall 1.0.8) with SMTP; 18 Mar 2003 14:10:57 -0000 Received: from chorus.teradyne.com (chorus.teradyne.com [131.101.1.195]) by rent.teradyne.com (8.8.8+Sun/8.8.8) with ESMTP id JAA15546; Tue, 18 Mar 2003 09:10:56 -0500 (EST) Received: from kiki.icd.teradyne.com (kiki.icd.teradyne.com [131.101.10.126]) by chorus.teradyne.com (8.8.8+Sun/8.7.1) with ESMTP id JAA19637; Tue, 18 Mar 2003 09:10:55 -0500 (EST) Received: from denver.icd.teradyne.com (denver [131.101.18.106]) by kiki.icd.teradyne.com (8.9.3+Sun/8.9.3) with ESMTP id JAA22746; Tue, 18 Mar 2003 09:11:07 -0500 (EST) Received: (from shelton@localhost) by denver.icd.teradyne.com (8.11.6+Sun/8.11.6) id h2IEAtZ29468; Tue, 18 Mar 2003 09:10:55 -0500 (EST) X-Authentication-Warning: denver.icd.teradyne.com: shelton set sender to shelton@icd.teradyne.com using -f To: Oliver Kiddle Cc: Zsh hackers list Subject: Re: 'make check' failures on Solaris 2.5 and 5.8 From: Vin Shelton Organization: Teradyne, Inc Date: Tue, 18 Mar 2003 09:10:55 -0500 In-Reply-To: <5757.1047989340@finches.logica.co.uk> (Oliver Kiddle's message of "Tue, 18 Mar 2003 13:09:00 +0100") Message-ID: <545y93crci8.fsf@icd.teradyne.com> References: <54565qh3n66.fsf@icd.teradyne.com> <5451y153msn.fsf@icd.teradyne.com> <5757.1047989340@finches.logica.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Oliver Kiddle writes: > Vin Shelton wrote: >> Sorry to followup my own post, but I forgot to mention that the >> failures started appearing on 2003-03-14. My 2003-03-13 build passed >> 'make check' fine, except for the expected C02cond failure. > > That narrows it down to being my fault in the \u/\U change. Thanks for > reporting it. > > The problem is that MB_LEN_MAX is less than 6 on Solaris so it wasn't > allocating enough memory. UTF-8 has characters up to 6 bytes in length > so this suprised me. Solaris 8 pretends to offer UTF-8 locales but I > can't get them to work. The patch below is a quick fix. MB_LEN_MAX is > defined to be 16 in recent glibc which seems high. Anyone know why or > what character sets need that? Handling of $'...' will need rethinking if > '\unnnn' can produce more than 6 bytes because $'...' is done by modifying > the string in place. > > If anyone has access to any operating systems other than Linux > and Solaris 8, it would be really useful to know whether it defines > __STDC_ISO_10646__, the value of MB_LEN_MAX and, even more valuably, what > iconv conversions it allows. iconv doesn't necessarily use the same names > for character sets as nl_langinfo(CODESET). unicode can be ISO-10646, > ISO646, 646, UCS4 and other variants so I perhaps should manually convert > to UTF-8 as that has fewer names and then try converting to WCHAR_T and > then nl_langinfo(CODESET). > > Oliver > > Index: utils.c > =================================================================== > RCS file: /cvsroot/zsh/zsh/Src/utils.c,v > retrieving revision 1.45 > diff -u -r1.45 utils.c > --- utils.c 14 Mar 2003 13:36:16 -0000 1.45 > +++ utils.c 18 Mar 2003 11:33:59 -0000 > @@ -3311,15 +3311,12 @@ > char *inptr, *outptr; > # endif > size_t count; > - size_t buflen = MB_LEN_MAX * (strlen(s) / 6) + (strlen(s) % 6) + 1; > -#else > - size_t buflen = strlen(s) + 1; > #endif > > if (fromwhere == 6) > t = buf = tmp; > else if (fromwhere != 4) > - t = buf = zhalloc(buflen); > + t = buf = zhalloc(strlen(s) + 1); > else { > t = buf = s; > s += 2; > Oliver, Your quick fix solved my 'make check' problems on both Solaris 5.5 and 5.8. Thanks, Vin