Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Build problem on terminfo.c on FreeBSD 4.7



On 2 Nov, Felix Rosencrantz wrote:
> Since Clint's changes (zsh-workers/19076) I'm seeing build problems with
> terminfo.c on FreeBSD 4.7:
> 
> terminfo.c: In function `boot_':
> terminfo.c:381: warning: implicit declaration of function `setupterm'
> terminfo.c:381: `ERR' undeclared (first use in this function)
> terminfo.c:381: (Each undeclared identifier is reported only once
> terminfo.c:381: for each function it appears in.)
> 
> ERR is defined in curses.h.  Not sure why that is not included, because the
> autoconf code is opaque to me.

I get this same problem on one particular Linux box. With
--with-curses-terminfo, it builds. Unfortunately, the autoconf code for
handling curses/terminfo is fairly opaque to me too.

At the top of terminfo.c, the following is used around the curses.h
include:

# ifdef HAVE_CURSES_H
#  include <curses.h>
# endif

So curses.h would be included. However, HAVE_CURSES_H is not defined.
This seems to be because the curses.h header check is inside this in
zshconfig.ac:
  case "$LIBS" in
  *curses*)
This presumably fails because it uses just -ltermcap.

libtermcap.so is just a link to libncurses.so here. So how is that
situation otherwise handled? Should the HAVE_SETUPTERM test perhaps
similarly only be done if $LIBS = *curses*? Or can we perhaps safely
substitute -1 for ERR?

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author