Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 245973 - x11-libs/wxGTK-2.8.9.1-r1: wx/db.h undefines BOOL when USE=odbc
Summary: x11-libs/wxGTK-2.8.9.1-r1: wx/db.h undefines BOOL when USE=odbc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo wxWidgets project
URL: http://trac.wxwidgets.org/ticket/10167
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-07 15:33 UTC by Martin von Gagern
Modified: 2008-11-07 23:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Use and keep already defined BOOL (wxGTK-2.8.9-BOOL.patch,773 bytes, patch)
2008-11-07 15:34 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2008-11-07 15:33:16 UTC
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.
Comment 1 Martin von Gagern 2008-11-07 15:34:59 UTC
Created attachment 171002 [details, diff]
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.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2008-11-07 22:41:13 UTC
makes sense to me.  http://trac.wxwidgets.org/ticket/10167
Comment 3 Vadim Zeitlin 2008-11-07 22:46:58 UTC
Patch applied to wx sources, will be in 2.8.10, thanks.
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2008-11-07 23:34:54 UTC
Thanks for the quick response.  Fixed in wxGTK-2.8.9.1-r2 and -r3.