[patch][rfa] typedef of 'bool' in /usr/include/curses.h on Solaris

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch][rfa] typedef of 'bool' in /usr/include/curses.h on Solaris

Dave Brolley-2
Hi,

/usr/include/curses.h on some Solaris platforms defines a typedef of
'bool', even for C++ compiles unless the macro _BOOL is defined.

Is this patch OK to commit?

Dave


2006-12-07  Dave Brolley  <[hidden email]>

        * lcd-char-display.cxx (_BOOL): New macro definition.


Index: sid/component/lcd/lcd-char-display.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/lcd/lcd-char-display.cxx,v
retrieving revision 1.7
diff -c -p -r1.7 lcd-char-display.cxx
*** sid/component/lcd/lcd-char-display.cxx 1 Mar 2006 21:07:00 -0000 1.7
--- sid/component/lcd/lcd-char-display.cxx 3 Jan 2007 20:28:03 -0000
***************
*** 15,20 ****
--- 15,23 ----
  #include <sidwatchutil.h>
 
  #ifdef HAVE__USR_INCLUDE_CURSES_H
+ // The following macro definition prevents curses.h from providing a typedef
+ // for bool on Solaris.
+ #define _BOOL 1
  #include "/usr/include/curses.h"
  #else
  #ifdef HAVE_CURSES_H
Reply | Threaded
Open this post in threaded view
|

Re: [patch][rfa] typedef of 'bool' in /usr/include/curses.h on Solaris

Frank Ch. Eigler
Hi -

> Is this patch [#define _BOOK 1] OK to commit?

Sure, assuming it continues to build on a other oddball
platforms like linux and cygwin. :-)

- FChE