zsh-workers
 help / color / mirror / code / Atom feed
From: Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>
To: travis@jedi.net
Cc: zsh-workers@sunsite.dk
Subject: Re: Compile errors for zsh 4.0.4 on Aix  4.3.3
Date: 09 May 2002 19:45:11 +0400	[thread overview]
Message-ID: <1020959117.27384.6.camel@localhost.localdomain> (raw)
In-Reply-To: <1020958309.27384.2.camel@localhost.localdomain>

В Чтв, 09.05.2002, в 19:31, Borsenkow Andrej написал:
> 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.
> 
> Whose baby termcap/terminfo is? I am afraid to touch it :-)
> 

OTOH why not :-)

Could you try this patch?

-andrej
Index: Etc/MACHINES
===================================================================
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.
 
-	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'.
 
Index: Src/Modules/termcap.c
===================================================================
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 @@
 
 static Param termcap_pm;
 
-#ifndef HAVE_BOOLCODES
-static char *boolcodes[] = {
+#ifdef HAVE_BOOLCODES
+#define zsh_boolcodes boolcodes
+#else
+static char *zsh_boolcodes[] = {
     "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 = (char **)boolcodes; *b; ++b)
+	for (b = (char **)zsh_boolcodes; *b; ++b)
 	    if (s[0] == (*b)[0] && s[1] == (*b)[1])
 		return 0;
 	break;
@@ -289,16 +291,20 @@
     int num;
     char **capcode, *tcstr, buf[2048], *u;
 
-#ifndef HAVE_NUMCODES
-    static char *numcodes[] = {
+#ifdef HAVE_NUMCODES
+#define zsh_numcodes numcodes
+#else
+    static char *zsh_numcodes[] = {
 	"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
 
-#ifndef HAVE_STRCODES
-    static char *strcodes[] = {
+#ifdef HAVE_STRCODES
+#define zsh_strcodes strcodes
+#else
+    static char *zsh_strcodes[] = {
 	"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 = buf;
 
     pm->flags = PM_READONLY | PM_SCALAR;
-    for (capcode = (char **)boolcodes; *capcode; capcode++) {
+    for (capcode = (char **)zsh_boolcodes; *capcode; capcode++) {
 	if ((num = ztgetflag(*capcode)) != -1) {
 	    pm->u.str = num ? dupstring("yes") : dupstring("no");
 	    pm->nam = dupstring(*capcode);
@@ -359,7 +365,7 @@
     }
 
     pm->flags = PM_READONLY | PM_INTEGER;
-    for (capcode = (char **)numcodes; *capcode; capcode++) {
+    for (capcode = (char **)zsh_numcodes; *capcode; capcode++) {
 	if ((num = tgetnum(*capcode)) != -1) {
 	    pm->u.val = num;
 	    pm->nam = dupstring(*capcode);
@@ -368,7 +374,7 @@
     }
 
     pm->flags = PM_READONLY | PM_SCALAR;
-    for (capcode = (char **)strcodes; *capcode; capcode++) {
+    for (capcode = (char **)zsh_strcodes; *capcode; capcode++) {
 	if ((tcstr = (char *)tgetstr(*capcode,&u)) != NULL &&
 	    tcstr != (char *)-1) {
 	    pm->u.str = dupstring(tcstr);


  reply	other threads:[~2002-05-09 15:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-09 14:08 travis
2002-05-09 15:03 ` Bart Schaefer
2002-05-09 15:05 ` Borsenkow Andrej
2002-05-09 15:31   ` Borsenkow Andrej
2002-05-09 15:45     ` Borsenkow Andrej [this message]
2002-05-09 15:56     ` Bart Schaefer
2002-05-09 15:08 ` Bart Schaefer
2002-05-09 15:17   ` Borsenkow Andrej
2002-05-10 23:01   ` Albert Chin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1020959117.27384.6.camel@localhost.localdomain \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=travis@jedi.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).