equal
deleted
inserted
replaced
|
1 From 60c449cbb1769569ed5e98c75f26bd15627bd146 Mon Sep 17 00:00:00 2001 |
|
2 From: Peter Hutterer <[email protected]> |
|
3 Date: Mon, 15 Dec 2008 12:16:10 +1000 |
|
4 Subject: [PATCH] Protect _XiDevicePresenceNotifyEvent declaration against C++ includes. #19075 |
|
5 |
|
6 X.Org Bug 19075 <http://bugs.freedesktop.org/show_bug.cgi?id=19075> |
|
7 --- |
|
8 XInput.h | 9 ++++++++- |
|
9 1 files changed, 8 insertions(+), 1 deletions(-) |
|
10 |
|
11 diff --git a/XInput.h b/XInput.h |
|
12 index 702706d..3092e62 100644 |
|
13 --- a/XInput.h |
|
14 +++ b/XInput.h |
|
15 @@ -156,9 +156,16 @@ SOFTWARE. |
|
16 #define NoExtensionEvent(d,type,_class) \ |
|
17 { _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;} |
|
18 |
|
19 +#if defined(__cplusplus) || defined(c_plusplus) |
|
20 +extern "C" { |
|
21 +#endif |
|
22 + extern int _XiGetDevicePresenceNotifyEvent(Display *); |
|
23 +#if defined(__cplusplus) || defined(c_plusplus) |
|
24 +} |
|
25 +#endif |
|
26 + |
|
27 #define DevicePresence(dpy, type, _class) \ |
|
28 { \ |
|
29 - extern int _XiGetDevicePresenceNotifyEvent(Display *); \ |
|
30 type = _XiGetDevicePresenceNotifyEvent(dpy); \ |
|
31 _class = (0x10000 | _devicePresence); \ |
|
32 } |
|
33 -- |
|
34 1.5.6.5 |
|
35 |