1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
$NetBSD: patch-ad,v 1.6 2002/10/03 02:06:32 seb Exp $
--- info/terminal.c.orig Sat Nov 17 00:16:04 2001
+++ info/terminal.c
@@ -31,13 +31,17 @@
#ifdef HAVE_NCURSES_TERMCAP_H
#include <ncurses/termcap.h>
#else
-#ifdef HAVE_TERMCAP_H
+#if defined(HAVE_TERMCAP_H) && !defined(__NetBSD__)
#include <termcap.h>
#else
/* On Solaris2, sys/types.h #includes sys/reg.h, which #defines PC.
Unfortunately, PC is a global variable used by the termcap library. */
#undef PC
+#if defined(__NetBSD__)
+#include <termcap.h>
+#endif
+
/* Termcap requires these variables, whether we access them or not. */
char *BC, *UP;
char PC; /* Pad character */
@@ -115,12 +119,18 @@
/* Although I can't find any documentation that says this is supposed to
return its argument, all the code I've looked at (termutils, less)
does so, so fine. */
+#ifdef __NetBSD__
+void
+#else
static int
+#endif
output_character_function (c)
int c;
{
putc (c, stdout);
+#ifndef __NetBSD__
return c;
+#endif
}
/* Macro to send STRING to the terminal. */
|