open-src/proto/inputproto/c++.patch
changeset 606 068c11b419c9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/proto/inputproto/c++.patch	Thu Jan 15 12:55:00 2009 -0800
@@ -0,0 +1,35 @@
+From 60c449cbb1769569ed5e98c75f26bd15627bd146 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <[email protected]>
+Date: Mon, 15 Dec 2008 12:16:10 +1000
+Subject: [PATCH] Protect _XiDevicePresenceNotifyEvent declaration against C++ includes. #19075
+
+X.Org Bug 19075 <http://bugs.freedesktop.org/show_bug.cgi?id=19075>
+---
+ XInput.h |    9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/XInput.h b/XInput.h
+index 702706d..3092e62 100644
+--- a/XInput.h
++++ b/XInput.h
+@@ -156,9 +156,16 @@ SOFTWARE.
+ #define NoExtensionEvent(d,type,_class) \
+     { _class =  ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}
+ 
++#if defined(__cplusplus) || defined(c_plusplus)
++extern "C" {
++#endif
++    extern int _XiGetDevicePresenceNotifyEvent(Display *);
++#if defined(__cplusplus) || defined(c_plusplus)
++}
++#endif
++
+ #define DevicePresence(dpy, type, _class)                       \
+     {                                                           \
+-        extern int _XiGetDevicePresenceNotifyEvent(Display *);  \
+         type = _XiGetDevicePresenceNotifyEvent(dpy);            \
+         _class =  (0x10000 | _devicePresence);                  \
+     }
+-- 
+1.5.6.5
+