zsh-workers
 help / color / mirror / code / Atom feed
From: Roy Marples <roy@NetBSD.org>
To: zsh-workers@zsh.org
Subject: termcap/terminfo includes
Date: Sun, 07 Feb 2010 11:53:21 +0000	[thread overview]
Message-ID: <4B6EA9B1.4030001@NetBSD.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

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.

[-- Attachment #2: zsh.term.diff --]
[-- Type: text/plain, Size: 1815 bytes --]

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 <termio.h>
-#  endif
-#  ifdef ZSH_HAVE_CURSES_H
-#   include "../zshcurses.h"
-#  endif
-#  include "../zshterm.h"
-# else
-#  ifdef USES_TERMCAP_H
-#   include <termcap.h>
-#  endif
-# endif
+# include <termcap.h>
 
 #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 <term.h>
 
 /* echoti: output a terminfo capability */
 

             reply	other threads:[~2010-02-07 12:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-07 11:53 Roy Marples [this message]
2010-02-08 10:50 ` Peter Stephenson
2010-02-08 22:45   ` Geoff Wing

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=4B6EA9B1.4030001@NetBSD.org \
    --to=roy@netbsd.org \
    --cc=zsh-workers@zsh.org \
    /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).