Path to this page:
Subject: CVS commit: pkgsrc/x11/libXi
From: Thomas Klausner
Date: 2013-03-12 12:39:49
Message id: 20130312113950.05C09175DD@cvs.netbsd.org
Log Message:
redefinition of PointerBarrier.
gcc 4.6 won't complain about that, but earlier versions do:
http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=ce3765bf44e49ef0568a1ad4a0b7f807591d6412
gcc 4.6 with -pedantic-errors shows:
/opt/xorg/include/X11/extensions/XInput2.h:172:13: error: redefinition of
typedef âPointerBarrierâ [-pedantic]
In file included from test.c:1:0:
/opt/xorg/include/X11/extensions/Xfixes.h:255:13: note: previous declaration
of âPointerBarrierâ was here
PointerBarriers is defined in XFixes.h and here. So hook onto the only thing
we can in Xfixes.h and use that to figure out if we need to typedef
ourselves. XFIXES_MAJOR is defined in xfixeswire.h, so we can't hook onto it
directly.
Adding this ifdef here means we have include order dependency of XFixes.h
before XInput2.h unless we add a similar ifdef to the fixes headers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
Nasty, but can't think of a better way atm.
Files: