Bug 245973 - x11-libs/wxGTK-2.8.9.1-r1: wx/db.h undefines BOOL when USE=odbc
|
Bug#:
245973
|
Product: Gentoo Linux
|
Version: 2008.0
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: minor
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: wxwidgets@gentoo.org
|
Reported By: Martin.vGagern@gmx.net
|
|
Component: Library
|
|
|
URL:
http://trac.wxwidgets.org/ticket/10167
|
|
Summary: x11-libs/wxGTK-2.8.9.1-r1: wx/db.h undefines BOOL when USE=odbc
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2008-11-07 15:33 0000
|
I encountered this while trying to compile truecrypt-6.1 from bug 245322. The
build process there calls g++ with -DBOOL=int, but still I get errors like this
"error: ‘BOOL’ does not name a type". I traced this to wx/db.h which
defines BOOL, includes some other headers, and then unconditionally undefines
it again.
The inclusion path is the following:
<wx/wx.h> -> "wx/window.h" -> "wx/colour.h" -> "wx/variant.h" -> "wx/db.h"
Bug 210024 worked around this for previous truecrypt releases, and including
that workaround again would be easy. On the other hand, I consider it bad
behaviour for a header file to undefine any macros, especially such common
ones. Therefore I'd prefer wxGTK to address this issue. I'll attach a patch.
Created an attachment (id=171002) [details]
Use and keep already defined BOOL
This patch only defines and undefines BOOL if it hasn't already been defined.
If it already is defined, it is assumed to be compatible with int, or that the
application won't use that part of the wxGTK interface. No further checks made.
Patch applied to wx sources, will be in 2.8.10, thanks.
Thanks for the quick response. Fixed in wxGTK-2.8.9.1-r2 and -r3.