* cygwin build problem - undefined setupterm
@ 2001-04-21 12:36 Andrej Borsenkow
2001-04-21 19:17 ` Bart Schaefer
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andrej Borsenkow @ 2001-04-21 12:36 UTC (permalink / raw)
To: ZSH Workers Mailing List
rm -f libzsh-4.0.1-pre-3.dll
dllwrap -s --export-all-symbols -o libzsh-4.0.1-pre-3.dll `cat
stamp-modobjs`-ltermcap -lm -lc
dllwrap: no export definition file provided
dllwrap: creating one, but that may not be what you want
Modules/termcap.o(.text+0xb6c):termcap.c: undefined reference to `setupterm'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
make[1]: *** [libzsh-4.0.1-pre-3.dll] Error 1
make[1]: Leaving directory `/tools/build/zsh/Src'
make: *** [all] Error 1
AFAIK setupterm belongs to curses interface suite and does not exist in
termcap (it was not there before, it came with Clint's patches). Clint, you
most probably have (n)curses in disguise ... and not the real termcap.
Moreover, we already have terminal setup code in zsh main - it should not be
duplicated (probably).
-andrej
Have a nice DOS!
B >>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cygwin build problem - undefined setupterm
2001-04-21 12:36 cygwin build problem - undefined setupterm Andrej Borsenkow
@ 2001-04-21 19:17 ` Bart Schaefer
2001-04-21 21:33 ` PATCH: " Bart Schaefer
2001-04-22 13:55 ` Clint Adams
2 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2001-04-21 19:17 UTC (permalink / raw)
To: Andrej Borsenkow, ZSH Workers Mailing List
On Apr 21, 4:36pm, Andrej Borsenkow wrote:
} Subject: cygwin build problem - undefined setupterm
}
} AFAIK setupterm belongs to curses interface suite and does not exist in
} termcap (it was not there before, it came with Clint's patches). Clint, you
} most probably have (n)curses in disguise ... and not the real termcap.
} Moreover, we already have terminal setup code in zsh main - it should not
} be duplicated (probably).
I believe setupterm() does not do terminal setup -- rather it assigns to
the TERM environment variable and to the TERMCAP or TERMINFO environment
variables as appropriate.
Of course it's going to do this "behind zsh's back" so if someone has done
something like `typeset -T TERMCAP tc' the linkage between those parameters
is going to be broken by setupterm().
There's also some issue of the interaction of setupterm() with LINES and
COLUMNS, and whether use_env() needs to be called before setupterm().
These are definitely (n)curses things rather than old termcap.
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* PATCH: Re: cygwin build problem - undefined setupterm
2001-04-21 12:36 cygwin build problem - undefined setupterm Andrej Borsenkow
2001-04-21 19:17 ` Bart Schaefer
@ 2001-04-21 21:33 ` Bart Schaefer
2001-04-22 13:55 ` Clint Adams
2 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2001-04-21 21:33 UTC (permalink / raw)
To: Andrej Borsenkow, ZSH Workers Mailing List
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cygwin build problem - undefined setupterm
2001-04-21 12:36 cygwin build problem - undefined setupterm Andrej Borsenkow
2001-04-21 19:17 ` Bart Schaefer
2001-04-21 21:33 ` PATCH: " Bart Schaefer
@ 2001-04-22 13:55 ` Clint Adams
2 siblings, 0 replies; 4+ messages in thread
From: Clint Adams @ 2001-04-22 13:55 UTC (permalink / raw)
To: Andrej Borsenkow; +Cc: ZSH Workers Mailing List
> AFAIK setupterm belongs to curses interface suite and does not exist in
> termcap (it was not there before, it came with Clint's patches). Clint, you
> most probably have (n)curses in disguise ... and not the real termcap.
That's true; all the systems I currently have access to (Debian, Solaris,
FreeBSD, OpenBSD) use (n)curses rather than GNU termcap or any other
such library.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-04-22 13:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-21 12:36 cygwin build problem - undefined setupterm Andrej Borsenkow
2001-04-21 19:17 ` Bart Schaefer
2001-04-21 21:33 ` PATCH: " Bart Schaefer
2001-04-22 13:55 ` Clint Adams
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).