bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bool definition in include/curses.h.in


From: Albert Chin
Subject: Re: bool definition in include/curses.h.in
Date: Tue, 22 Apr 2003 17:54:12 -0500
User-agent: Mutt/1.4i

On Tue, Apr 22, 2003 at 06:50:43PM -0400, Thomas Dickey wrote:
> On Tue, Apr 22, 2003 at 05:29:25PM -0500, Albert Chin wrote:
> > Can we now change:
> >   #if (!defined(__cplusplus) || address@hidden@) && (address@hidden@)
> > to:
> >   #if !defined(__cplusplus) && (address@hidden@)
> > 
> > If you build ncurses without a C++ compiler and with a C compiler that
> > does not support a native bool type, then build a C++ app that
> > includes the above header file, this breaks. You have to do the
> > initial build of ncurses with a C++ compiler for the above to always
> > be correct.
> 
> yes, that's been a known issue.  Since X/Open says curses.h defines bool,
> and C++ defines bool, I attempt to make the types coincide.  You don't
> have to _build_ ncurses with a C++ compiler, but it has to be available
> for configuring.  Note that internally ncurses uses NCURSES_BOOL, but
> I haven't found a good argument for making it visible in curses.h -- only
> the corresponding definition of 'bool'.
>  
> > Do we still need to worry about GCC 2.5.8?
> 
> not really (gcc 3.[0-9] will provide enough variety)

So can we shorten the above to:
  #if !defined(__cplusplus) && (address@hidden@)

-- 
albert chin (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]