From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19739 invoked by alias); 7 Feb 2010 12:01:06 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27678 Received: (qmail 23074 invoked from network); 7 Feb 2010 12:01:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at NetBSD.org does not designate permitted sender hosts) Message-ID: <4B6EA9B1.4030001@NetBSD.org> Date: Sun, 07 Feb 2010 11:53:21 +0000 From: Roy Marples User-Agent: Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv:1.9.1.5) Gecko/20100124 Shredder/3.0 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: termcap/terminfo includes Content-Type: multipart/mixed; boundary="------------030201080300010609060308" --------------030201080300010609060308 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi NetBSD recently gained terminfo and zsh is now failing to build. The exact error is due to a zsh definition vs our curses.h underscore() function. Looking through the code, I see no reason why either termcap or terminfo code should include curses header as no curses calls are made. Also, it is an unsafe assumption that either curses.h or term.h pulls in termcap.h for the function decs. Attached is a patch to cvs HEAD. Thanks Roy PS, not subed to the list as I'm not a zsh user - just fixing a problem, so reply directly. --------------030201080300010609060308 Content-Type: text/plain; name="zsh.term.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="zsh.term.diff" Index: Src/Modules/termcap.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/termcap.c,v retrieving revision 1.27 diff -u -p -r1.27 termcap.c --- Src/Modules/termcap.c 11 Nov 2009 16:26:19 -0000 1.27 +++ Src/Modules/termcap.c 7 Feb 2010 11:48:43 -0000 @@ -36,13 +36,7 @@ #include "../../config.h" #ifdef HAVE_TGETENT -# if defined(ZSH_HAVE_CURSES_H) && defined(ZSH_HAVE_TERM_H) -# define USES_TERM_H 1 -# else -# ifdef HAVE_TERMCAP_H -# define USES_TERMCAP_H 1 -# endif -# endif +# define USES_TERMCAP_H 1 #endif #include "termcap.mdh" @@ -50,19 +44,7 @@ /**/ #ifdef HAVE_TGETENT -# ifdef USES_TERM_H -# ifdef HAVE_TERMIO_H -# include -# endif -# ifdef ZSH_HAVE_CURSES_H -# include "../zshcurses.h" -# endif -# include "../zshterm.h" -# else -# ifdef USES_TERMCAP_H -# include -# endif -# endif +# include #ifndef HAVE_BOOLCODES static char *boolcodes[] = { @@ -367,15 +349,7 @@ enables_(Module m, int **enables) int boot_(Module m) { -#ifdef HAVE_TGETENT -# ifdef HAVE_SETUPTERM - int errret; - if (setupterm((char *)0, 1, &errret) == ERR) { - return 1; - } -# endif -#endif - return 0; + return 0; } /**/ Index: Src/Modules/terminfo.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.c,v retrieving revision 1.34 diff -u -p -r1.34 terminfo.c --- Src/Modules/terminfo.c 13 Mar 2008 11:11:05 -0000 1.34 +++ Src/Modules/terminfo.c 7 Feb 2010 11:48:45 -0000 @@ -49,13 +49,7 @@ # undef offsetof # endif -#ifdef ZSH_HAVE_CURSES_H -# include "../zshcurses.h" -#endif - -# ifdef ZSH_HAVE_TERM_H -# include "../zshterm.h" -# endif +#include /* echoti: output a terminfo capability */ --------------030201080300010609060308--