Using #define for Status and Bool can cause namespace conflicts

Bug #268643 reported by Ceriand
2
Affects Status Importance Assigned to Milestone
libx11 (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

In X11/Xlib.h on line 110:
#define Bool int
#define Status int

This can cause namespace conflicts if you use the word Status as a variable name or type eg:
SomeClass::Status SomeClass::SomeMethod(void)
{
    int Status;
}

These should be typedef'ed so they get the right scope.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

you should report this upstream: bugs.freedesktop.org.

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi ceriand,

Please attach the output of `lspci -vvnn`, and attach your /var/log/Xorg.0.log file from after reproducing this issue. If you've made any customizations to your /etc/X11/xorg.conf please attach that as well.

Changed in libx11:
status: New → Incomplete
Revision history for this message
Ceriand (ceriand) wrote :

Bryce,

Did you even read the bug? This is a compile time bug for programs using libX11. You don't even have to have X running for this to matter, so doing those things wouldn't help in the slightest.

Revision history for this message
Bryce Harrington (bryce) wrote :

You need to report this issue upstream, it's not something appropriate for fixing at the distro level.

Changed in libx11:
importance: Undecided → Wishlist
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.