Subject: misc/7356: vm/vm_param.h defines true. badly.
To: None <>
From: TheMan <>
List: netbsd-bugs
Date: 04/10/1999 18:36:32
>Number:         7356
>Category:       misc
>Synopsis:       vm/vm_param.h defines TRUE unconditionally
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 10 15:50:00 1999
>Originator:     TheMan
me, myslef, undt i
>Release:        (at least) 1.3.3 up to -current
System: NetBSD noc 1.3.3 NetBSD 1.3.3 (LINGAM) #0: Sat Mar 6 23:57:16 EST 1999 root@:/usr/src/sys/arch/i386/compile/LINGAM i386

compile a program that includes both <sys/sysctl.h> and <rpc/rpc.h>
(like, say, lsof?) in that order watch the compiler whine about TRUE.

rpc/rpc.h ultimately includes rpc/types.h and sys/sysctl.h ultimately
includes vm/vm_param.h.  these are the sources of the identical (to
me) conflicting definitions of TRUE.  rpc/types.h is nice about it and
checks #ifndef first, but vm/vm_param.h is just plain rude.  it should
be more polite.


download lsof.  skip the package system (which doesn't seem to work
around this anyway).  configure and compile it.  enjoy compiler spew.


--- vm_param.h.orig	Wed Mar 24 07:21:53 1999
+++ vm_param.h	Sat Apr 10 18:26:41 1999
@@ -77,8 +77,12 @@
  * This belongs in types.h, but breaks too many existing programs.
 typedef int	boolean_t;
+#ifndef TRUE
 #define	TRUE	1
+#ifndef FALSE
 #define	FALSE	0
  *	The machine independent pages are refered to as PAGES.  A page