* 4.3.4 build fails on UnixWare 7
@ 2007-08-22 4:38 River Tarnell
2007-08-22 9:05 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: River Tarnell @ 2007-08-22 4:38 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
hello,
i am unable to build zsh 4.3.4 on UnixWare 7.1.3. the following error occurs:
cc -c -I. -DHAVE_CONFIG_H -O -o zle_refresh.o zle_refresh.c
UX:acomp: ERROR: "zle_refresh.c", line 182: integral constant expression
expected
*** Error code 1 (bu21)
UX:make: ERROR: fatal error.
UnixWare defines MB_CUR_MAX as:
#define MB_CUR_MAX ((int)__ctype[520])
i was able to fix this with the following diff:
*** zle_refresh.c.old Wed Aug 22 05:25:37 2007
--- zle_refresh.c Wed Aug 22 05:27:58 2007
***************
*** 179,187 ****
zwcputc(ZLE_INT_T c)
{
#ifdef MULTIBYTE_SUPPORT
! char mbtmp[MB_CUR_MAX + 1];
mbstate_t mbstate;
int i;
if (c == WEOF)
return;
--- 179,189 ----
zwcputc(ZLE_INT_T c)
{
#ifdef MULTIBYTE_SUPPORT
! char *mbtmp;
mbstate_t mbstate;
int i;
+
+ mbtmp = alloca(MB_CUR_MAX + 1);
if (c == WEOF)
return;
however, use of alloca seems suboptimal (perhaps malloc could be used
instead).
- river.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 4.3.4 build fails on UnixWare 7
2007-08-22 4:38 4.3.4 build fails on UnixWare 7 River Tarnell
@ 2007-08-22 9:05 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2007-08-22 9:05 UTC (permalink / raw)
To: zsh-workers
On Wed, 22 Aug 2007 05:38:59 +0100
River Tarnell <river@wikimedia.org> wrote:
> hello,
>
> i am unable to build zsh 4.3.4 on UnixWare 7.1.3. the following error occurs:
>
> cc -c -I. -DHAVE_CONFIG_H -O -o zle_refresh.o zle_refresh.c
> UX:acomp: ERROR: "zle_refresh.c", line 182: integral constant expression
> expected
> *** Error code 1 (bu21)
> UX:make: ERROR: fatal error.
That's a real bug---use of MB_CUR_MAX in arrays should use VARARR().
Index: Src/Zle/zle_refresh.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v
retrieving revision 1.47
diff -u -r1.47 zle_refresh.c
--- Src/Zle/zle_refresh.c 19 Mar 2007 22:27:45 -0000 1.47
+++ Src/Zle/zle_refresh.c 22 Aug 2007 09:01:23 -0000
@@ -179,9 +179,9 @@
zwcputc(ZLE_INT_T c)
{
#ifdef MULTIBYTE_SUPPORT
- char mbtmp[MB_CUR_MAX + 1];
mbstate_t mbstate;
int i;
+ VARARR(char, mbtmp, MB_CUR_MAX + 1);
if (c == WEOF)
return;
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-22 9:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-22 4:38 4.3.4 build fails on UnixWare 7 River Tarnell
2007-08-22 9:05 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).