Subject: Re: TRUE/FALSE defs
To: Wailer <banshee@gabriella.abattoir.com>
From: J.D.Coleman <J.D.Coleman@newcastle.ac.uk>
List: current-users
Date: 02/27/1997 09:13:57
Wailer wrote:
> something should be done about this stuff
> 
> In file included from /usr/include/vm/vm.h:63,
>                  from /usr/include/sys/sysctl.h:51,
>                  from maindisp.c:2,
>                  from main.c:518:
> /usr/include/vm/vm_param.h:80: warning: `TRUE' redefined
> /usr/include/curses.h:55: warning: this is the location of the previous definition
> /usr/include/vm/vm_param.h:81: warning: `FALSE' redefined
> /usr/include/curses.h:58: warning: this is the location of the previous definition
> *** Error code 1

A quick grep through the header files reveals a split between

	#define TRUE 1

and

	#define TRUE (1)

However, most headers have a

	#ifndef TRUE
	#endif

around their declaration.

So, you could change <vm_param.h> and add the #ifndef's or include
<curses.h> later in your code.  Presumably, adding the #ifndef's to
<vm_param.h> is a better solution.  Even better (IMHO) would be to make
all the headers have a consistent view of TRUE and FALSE, as well as
#ifndef's.

J

PS.  Send a PR?

-- 
"Railways have always been plagued by politicians, and it is not hard to
think that Robert Stephenson had the right idea when he drove his engine
over one of them at the opening of the Liverpool & Manchester Railway"