opencv-2.3.1a uses True and and False as class names. This is a bad idea: these names clashes with #defines from other system headers. See bug #393555. The patch I supplied for opencv should be applied. Reproducible: Always
Created attachment 297489 [details, diff] patch for opencv-2.3.1 (still applies but breaks 2.4.3 build) Adding the patch here for completeness.
While I see the point of this, could you please file a bug at https://code.ros.org/trac/opencv/ and link to it here?!
The other question is of course, your patch modifies publicly installed headers. It's in the end up to upstream to decide...
Patch added in 2.3.1a-r1. Please still submit the upstream bug and link to it here.
As of 2.4.3, this patch makes the build fail. Removed. Did you submit it upstream for review and integration?
Reported upstream
Might want to poke upstream again; they reported on the bug that it's "fixed" by adding #undef True and #undef False in 2.4.3 to prevent the collision with the other headers. Not sure if we consider that to really be fixing the issue.
(In reply to comment #7) > Might want to poke upstream again; they reported on the bug that it's > "fixed" by adding #undef True and #undef False in 2.4.3 to prevent the > collision with the other headers. Not sure if we consider that to really be > fixing the issue. It's an incomplete and slighlty st&%/&%id fix (since now things might break if something calls True or False and expects the x11 definition). Having these names in a publicly exported interface just calls for trouble. However, unless sonething is actually reported broken, it probably makes no sense to keep this bug open.