This is the mail archive of the
sid@sourceware.org
mailing list for the SID project.
[patch][rfa] typedef of 'bool' in /usr/include/curses.h on Solaris
- From: Dave Brolley <brolley at redhat dot com>
- To: sid at sources dot redhat dot com
- Date: Wed, 03 Jan 2007 15:31:05 -0500
- Subject: [patch][rfa] typedef of 'bool' in /usr/include/curses.h on Solaris
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 <brolley@redhat.com>
* 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