~ubuntu-branches/ubuntu/natty/libxi/natty-201011191114

« back to all changes in this revision

Viewing changes to debian/patches/101_fix_devicepresence_declaration_cplusplus.diff

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-11-21 18:39:28 UTC
  • mfrom: (1.1.10 upstream) (0.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20091121183928-ek2jwqx3rmhv3zjz
Tags: 2:1.3-1
* Bump Standards-Version to 3.8.3.
* Add build-deps on xmlto and asciidoc to build the manpages.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: libxi/include/X11/extensions/XInput.h
2
 
===================================================================
3
 
--- libxi-1.2.0.orig/include/X11/extensions/XInput.h    2009-05-08 15:25:01.000000000 +0200
4
 
+++ libxi-1.2.0/include/X11/extensions/XInput.h 2009-05-08 15:40:12.000000000 +0200
5
 
@@ -156,9 +156,18 @@
6
 
 #define NoExtensionEvent(d,type,_class) \
7
 
     { _class =  ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}
8
 
 
9
 
+
10
 
+/* We need the declaration for DevicePresence. */
11
 
+#if defined(__cplusplus) || defined(c_plusplus)
12
 
+extern "C" {
13
 
+#endif
14
 
+    extern int _XiGetDevicePresenceNotifyEvent(Display *);
15
 
+#if defined(__cplusplus) || defined(c_plusplus)
16
 
+}
17
 
+#endif
18
 
+
19
 
 #define DevicePresence(dpy, type, _class)                       \
20
 
     {                                                           \
21
 
-        extern int _XiGetDevicePresenceNotifyEvent(Display *);  \
22
 
         type = _XiGetDevicePresenceNotifyEvent(dpy);            \
23
 
         _class =  (0x10000 | _devicePresence);                  \
24
 
     }