zsh-workers
 help / color / mirror / code / Atom feed
* 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

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