From 85c2c5ba8c7bdd7beda8b95eb2fab07bdba1c1ee Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 15 Dec 2008 12:16:10 +1000 Subject: [PATCH] Protect _XiDevicePresenceNotifyEvent declaration against C++ includes. --- 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.6.0.4