cannot be #included on its own
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rhialto@polder.ubc.kun.nl>
List: netbsd-bugs
Date: 02/20/2000 04:45:54
>Number: 9452
>Category: lib
>Synopsis: termcap.h cannot be #included on its own
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 20 04:45:00 2000
>Last-Modified:
>Originator: Olaf 'Rhialto' Seibert
>Organization:
>Release: 1.4.1 <NetBSD-current source date>
>Environment:
System: NetBSD azenomei.falu.nl 1.4.1 NetBSD 1.4.1 (AZENOMEI) #20: Sat Feb 5 02:02:09 CET 2000 rhialto@azenomei.falu.nl:/usr/src/sys/arch/alpha/compile/AZENOMEI alpha
>Description:
The termcap(3) manual page claims you need no other #include
files besides termcap.h to use its functions. This is not
true.
This breaks the configure process of (at least) vim.
I suspect that this is also why the vim pkg unnecessarily
depends on the ncurses pkg.
>How-To-Repeat:
azenomei.1:/tmp$ cat t.c
#include termcap.h /* angle brackets removed for send-pr ;-) */
char PC;
char *BC;
char *UP;
short ospeed;
azenomei.1:/tmp$ cc t.c
In file included from t.c:2:
/usr/include/termcap.h:45: syntax error before `int'
/usr/include/termcap.h:46: syntax error before `__P'
/usr/include/termcap.h:47: syntax error before `__P'
/usr/include/termcap.h:48: syntax error before `__P'
/usr/include/termcap.h:49: syntax error before `__P'
/usr/include/termcap.h:50: syntax error before `__P'
t.c:3: syntax error before `char'
azenomei.1:/tmp$ man termcap
TERMCAP(3) NetBSD Programmer's Manual TERMCAP(3)
NAME
tgetent, tgetnum, tgetflag, tgetstr, tgoto, tputs - terminal independent
operation routines
LIBRARY
Termcap Access Library (libtermcap, -ltermcap)
SYNOPSIS
#include <termcap.h>
char PC;
char *BC;
char *UP;
short ospeed;
>Fix:
Add #include "sys/cdefs.h" to /usr/include/termcap.h.
(with angle brackets - but send-pr would remove them)
-Olaf.
--
___ Olaf 'Rhialto' Seibert - rhialto@polder.ubc. -- If one tells the truth,
\X/ .kun.nl -- one is sure, sooner or later, to be found out. (Oscar Wilde)
>Audit-Trail:
>Unformatted: