From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>,
"ZSH Workers Mailing List" <zsh-workers@sunsite.dk>
Subject: PATCH: Re: cygwin build problem - undefined setupterm
Date: Sat, 21 Apr 2001 21:33:59 +0000 [thread overview]
Message-ID: <1010421213359.ZM25863@candle.brasslantern.com> (raw)
In-Reply-To: <000601c0ca5f$aadba880$21c9ca95@mow.siemens.ru>
The build on my RedHat 5.2 machine is also broken by the latest termcap.c
changes:
In file included from ../../../new/Src/Modules/termcap.c:43:
/usr/include/term.h:710: conflicting types for `tputs'
/usr/include/termcap.h:57: previous declaration of `tputs'
/usr/include/term.h:725: conflicting types for `tgetent'
/usr/include/termcap.h:43: previous declaration of `tgetent'
../../../new/Src/Modules/termcap.c: In function `cleanup_':
../../../new/Src/Modules/termcap.c:374: warning: unused variable `pm'
See my remarks about term.h and termcap.h in 14056. You can't use both
termcap and ncurses at the same time.
I really don't know whether the following is any better everywhere, but it
seems to fix the compile/link problems on my system. The unused variable
was a result of a typo in an #ifdef.
Index: Src/Modules/termcap.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/termcap.c,v
retrieving revision 1.6
diff -u -r1.6 termcap.c
--- Src/Modules/termcap.c 2001/04/20 14:22:24 1.6
+++ Src/Modules/termcap.c 2001/04/21 21:32:05
@@ -37,20 +37,22 @@
/* echotc: output a termcap */
#ifdef HAVE_TGETENT
-# ifdef HAVE_TERMCAP_H
-# include <termcap.h>
-# ifdef HAVE_TERM_H
-# include <term.h>
-# endif
-# else
+# if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
# ifdef HAVE_TERMIO_H
# include <termio.h>
-# endif
-# ifdef HAVE_CURSES_H
-# include <curses.h>
# endif
-# ifdef HAVE_TERM_H
-# include <term.h>
+# include <curses.h>
+# include <term.h>
+# else
+# ifdef HAVE_TERMCAP_H
+# include <termcap.h>
+# else
+# ifdef HAVE_CURSES_H
+# include <curses.h>
+# endif
+# ifdef HAVE_TERM_H
+# include <term.h>
+# endif
# endif
# endif
@@ -356,7 +358,9 @@
boot_(Module m)
{
#ifdef HAVE_TGETENT
+# if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
setupterm((char *)0, 1, (int *)0);
+# endif
if (!createtchash())
return 1;
@@ -376,7 +380,7 @@
incleanup = 1;
-#ifdef HAVE_TGETENTR
+#ifdef HAVE_TGETENT
if ((pm = (Param) paramtab->getnode(paramtab, termcap_nam)) &&
pm == termcap_pm) {
pm->flags &= ~PM_READONLY;
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2001-04-21 21:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-21 12:36 Andrej Borsenkow
2001-04-21 19:17 ` Bart Schaefer
2001-04-21 21:33 ` Bart Schaefer [this message]
2001-04-22 13:55 ` Clint Adams
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=1010421213359.ZM25863@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=Andrej.Borsenkow@mow.siemens.ru \
--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).