summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-04-25 13:01:47 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-04-25 13:01:47 +0000
commit2797512f6efb345defee167bf9b40f4dfacb329a (patch)
tree639863be2587cafbc5584902e0d8e2474863443c /driver
parent8b914d077cf37047233fa9d6545255e96df59b18 (diff)
Handle obsolete X{alloc,free,realloc} functions.
Diffstat (limited to 'driver')
-rw-r--r--driver/xf86-input-usbtablet/src/usbtablet.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/driver/xf86-input-usbtablet/src/usbtablet.c b/driver/xf86-input-usbtablet/src/usbtablet.c
index 667de38c5..e94b5ed92 100644
--- a/driver/xf86-input-usbtablet/src/usbtablet.c
+++ b/driver/xf86-input-usbtablet/src/usbtablet.c
@@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
-/* $OpenBSD: usbtablet.c,v 1.12 2011/04/25 12:50:28 matthieu Exp $ */
+/* $OpenBSD: usbtablet.c,v 1.13 2011/04/25 13:01:46 matthieu Exp $ */
/*
* Driver for USB HID tablet devices.
@@ -42,6 +42,7 @@
#include <dev/usb/usb.h>
#include <dev/usb/usbhid.h>
+#include <xorg-server.h>
#include <misc.h>
#include <xf86.h>
#include <xf86_OSproc.h>
@@ -55,6 +56,18 @@
#include <usbhid.h>
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 10
+#undef xalloc
+#undef xcalloc
+
+#define xcalloc calloc
+#define xalloc malloc
+#define Xcalloc calloc
+#define Xalloc malloc
+#define Xfree free
+#define Xrealloc realloc
+#endif
+
#define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
#define ABS(x) ((x) > 0 ? (x) : -(x))
#define mils(res) (res * 1000 / 2.54) /* resolution */