From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24746 invoked from network); 9 May 2002 15:45:40 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 9 May 2002 15:45:40 -0000 Received: (qmail 11807 invoked by alias); 9 May 2002 15:45:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17113 Received: (qmail 11796 invoked from network); 9 May 2002 15:45:32 -0000 From: Borsenkow Andrej To: travis@jedi.net Cc: zsh-workers@sunsite.dk Subject: Re: Compile errors for zsh 4.0.4 on Aix 4.3.3 In-Reply-To: <1020958309.27384.2.camel@localhost.localdomain> References: <20020509090819.A10978@yoda.jedi.net> <1020956741.26762.12.camel@localhost.localdomain> <1020958309.27384.2.camel@localhost.localdomain> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Mailer: Ximian Evolution 1.0.3-1mdk Date: 09 May 2002 19:45:11 +0400 Message-Id: <1020959117.27384.6.camel@localhost.localdomain> Mime-Version: 1.0 =F7 =FE=D4=D7, 09.05.2002, =D7 19:31, Borsenkow Andrej = =CE=C1=D0=C9=D3=C1=CC: > Stupid me. There is no need to test for declaration. Just test for > availability and #define if available. Else simply use local name = that > do not clash. >=20 > Whose baby termcap/terminfo is? I am afraid to touch it :-) >=20 OTOH why not :-) Could you try this patch? -andrej Index: Etc/MACHINES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Etc/MACHINES,v retrieving revision 1.12.4.2 diff -u -r1.12.4.2 MACHINES --- Etc/MACHINES 23 Oct 2001 06:44:05 -0000 1.12.4.2 +++ Etc/MACHINES 9 May 2002 15:44:02 -0000 @@ -89,12 +89,6 @@ 4.1, though native cc works. More information about this problem would be appreciated. =20 - It was reported, that at least some 4.x versions have problem - with curses - variables boolcodes and some other are declared - in term.h but missing is libcurses.a. That makes native compiler - very unhappy (GCC 3.0 apparently does not mind). Zsh now defaults - to termcap on AIX; any info about this problem is appreciated. - Linux: Linux 2.* (various 32-bit and 64-bit processors) Should build `out-of-the-box'. =20 Index: Src/Modules/termcap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Src/Modules/termcap.c,v retrieving revision 1.13.4.1 diff -u -r1.13.4.1 termcap.c --- Src/Modules/termcap.c 18 Jun 2001 17:40:52 -0000 1.13.4.1 +++ Src/Modules/termcap.c 9 May 2002 15:44:03 -0000 @@ -67,8 +67,10 @@ =20 static Param termcap_pm; =20 -#ifndef HAVE_BOOLCODES -static char *boolcodes[] =3D { +#ifdef HAVE_BOOLCODES +#define zsh_boolcodes boolcodes +#else +static char *zsh_boolcodes[] =3D { "bw", "am", "ut", "cc", "xs", "YA", "YF", "YB", "xt", "xn", "eo", "gn", "hc", "HC", "km", "YC", "hs", "hl", "in", "YG", "da", "db", "mi", "ms", "nx", "xb", "NP", "ND", "NR", "os", "5i", "YD", "YE", @@ -89,7 +91,7 @@ case -1: break; case 0: - for (b =3D (char **)boolcodes; *b; ++b) + for (b =3D (char **)zsh_boolcodes; *b; ++b) if (s[0] =3D=3D (*b)[0] && s[1] =3D=3D (*b)[1]) return 0; break; @@ -289,16 +291,20 @@ int num; char **capcode, *tcstr, buf[2048], *u; =20 -#ifndef HAVE_NUMCODES - static char *numcodes[] =3D { +#ifdef HAVE_NUMCODES +#define zsh_numcodes numcodes +#else + static char *zsh_numcodes[] =3D { "co", "it", "lh", "lw", "li", "lm", "sg", "ma", "Co", "pa", "MW", "NC", "Nl", "pb", "vt", "ws", "Yo", "Yp", "Ya", "BT", "Yc", "Yb", "Yd", "Ye", "Yf", "Yg", "Yh", "Yi", "Yk", "Yj", "Yl", "Ym", "Yn", NULL}; #endif =20 -#ifndef HAVE_STRCODES - static char *strcodes[] =3D { +#ifdef HAVE_STRCODES +#define zsh_strcodes strcodes +#else + static char *zsh_strcodes[] =3D { "ac", "bt", "bl", "cr", "ZA", "ZB", "ZC", "ZD", "cs", "rP", "ct", "MC", "cl", "cb", "ce", "cd", "ch", "CC", "CW", "cm", "do", "ho", "vi", "le", "CM", "ve", "nd", "ll", "up", "vs", "ZE", "dc", "dl", @@ -350,7 +356,7 @@ u =3D buf; =20 pm->flags =3D PM_READONLY | PM_SCALAR; - for (capcode =3D (char **)boolcodes; *capcode; capcode++) { + for (capcode =3D (char **)zsh_boolcodes; *capcode; capcode++) { if ((num =3D ztgetflag(*capcode)) !=3D -1) { pm->u.str =3D num ? dupstring("yes") : dupstring("no"); pm->nam =3D dupstring(*capcode); @@ -359,7 +365,7 @@ } =20 pm->flags =3D PM_READONLY | PM_INTEGER; - for (capcode =3D (char **)numcodes; *capcode; capcode++) { + for (capcode =3D (char **)zsh_numcodes; *capcode; capcode++) { if ((num =3D tgetnum(*capcode)) !=3D -1) { pm->u.val =3D num; pm->nam =3D dupstring(*capcode); @@ -368,7 +374,7 @@ } =20 pm->flags =3D PM_READONLY | PM_SCALAR; - for (capcode =3D (char **)strcodes; *capcode; capcode++) { + for (capcode =3D (char **)zsh_strcodes; *capcode; capcode++) { if ((tcstr =3D (char *)tgetstr(*capcode,&u)) !=3D NULL && tcstr !=3D (char *)-1) { pm->u.str =3D dupstring(tcstr);