Subject: port-pmax/3803: systat doesn't build
To: None <gnats-bugs@gnats.netbsd.org>
From: Simon Burge <simonb@telstra.com.au>
List: netbsd-bugs
Date: 06/28/1997 22:57:18
>Number: 3803
>Category: port-pmax
>Synopsis: systat fails to build
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 28 06:05:03 1997
>Last-Modified:
>Originator: Simon Burge
>Organization:
Telstra Corp, Australia.
>Release: NetBSD-current 970626
>Environment:
System: NetBSD vlad 1.2G NetBSD 1.2G (MONA) #0: Thu Jun 26 15:03:49 EST 1997 simonb@vlad:/usr/src/sys-970626/arch/pmax/compile/MONA pmax
>Description:
vmstat.c includes <sys/user.h>, which includes <machine/pcb.h>
which includes <mips/reg.h> which defines register numbers for
PC, K0, K1 and SR. Then it includes "systat.h" which includes
<curses.h> which wants to declare variables called PC, K0, K1
and SR. At this stage, everything falls apart :)
>How-To-Repeat:
make build (or cd /usr/src/usr.bin/systat; make)
>Fix:
The following works - I don't know if it's the "best" solution.
sys/arch/mips/mips/reg.h and sys/arch/mips/mips/regnum.h also
duplicate a log of information, but that's a different story...
*** /usr/src/sys/arch/mips/include/reg.h.00 Mon Jun 16 21:44:00 1997
--- /usr/src/sys/arch/mips/include/reg.h Sat Jun 28 22:49:50 1997
***************
*** 53,58 ****
--- 53,59 ----
int r_regs[33];
};
+ #ifdef _KERNEL
#define ZERO 0
#define AST 1
#define V0 2
***************
*** 92,96 ****
--- 93,98 ----
#define BADVADDR 35
#define CAUSE 36
#define PC 37
+ #endif /* _KERNEL */
#endif /*_MACHINE_REG_H_*/
>Audit-Trail:
>Unformatted: