diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-06 16:14:33 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-06 16:14:33 +0000 |
commit | a9923133bcabf62806552e5661d63f0347e205b6 (patch) | |
tree | ea4b735eea6764ac0ca663d79ea617ab530a23c0 /main/libxtst/0001-Use-_XEatDataWords-to-eat-data-in-error-cases.patch | |
parent | 292a8a8c7ac4aa1d7ef36c99880b46318b408aa5 (diff) | |
download | aports-a9923133bcabf62806552e5661d63f0347e205b6.tar.bz2 aports-a9923133bcabf62806552e5661d63f0347e205b6.tar.xz |
main/libxtst: upgrade to 1.2.2
Diffstat (limited to 'main/libxtst/0001-Use-_XEatDataWords-to-eat-data-in-error-cases.patch')
-rw-r--r-- | main/libxtst/0001-Use-_XEatDataWords-to-eat-data-in-error-cases.patch | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/main/libxtst/0001-Use-_XEatDataWords-to-eat-data-in-error-cases.patch b/main/libxtst/0001-Use-_XEatDataWords-to-eat-data-in-error-cases.patch deleted file mode 100644 index 43fa1e0d76..0000000000 --- a/main/libxtst/0001-Use-_XEatDataWords-to-eat-data-in-error-cases.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 46ed6283034b5b7d14584009453f5d974cfacf1e Mon Sep 17 00:00:00 2001 -From: Alan Coopersmith <alan.coopersmith@oracle.com> -Date: Sat, 13 Apr 2013 11:05:27 -0700 -Subject: [PATCH 1/2] Use _XEatDataWords to eat data in error cases - -Avoids having to do calculcations based on response contents - -Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> ---- - configure.ac | 6 ++++++ - src/XRecord.c | 23 +++++++++++++++++------ - 2 files changed, 23 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7ef0153..d83d4d8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -47,6 +47,12 @@ XORG_CHECK_SGML_DOCTOOLS(1.8) - # Obtain compiler/linker options for depedencies - PKG_CHECK_MODULES(XTST, x11 [xext >= 1.0.99.4] xi [recordproto >= 1.13.99.1] [xextproto >= 7.0.99.3] inputproto) - -+# Check for _XEatDataWords function that may be patched into older Xlib release -+SAVE_LIBS="$LIBS" -+LIBS="$XTST_LIBS" -+AC_CHECK_FUNCS([_XEatDataWords]) -+LIBS="$SAVE_LIBS" -+ - # Determine if the source for man pages is available - # It may already be present (tarball) or can be generated using xmlto - AM_CONDITIONAL([INSTALL_MANPAGES], -diff --git a/src/XRecord.c b/src/XRecord.c -index b65451c..ba628b6 100644 ---- a/src/XRecord.c -+++ b/src/XRecord.c -@@ -49,6 +49,9 @@ from The Open Group. - * By Stephen Gildea, X Consortium, and Martha Zimet, NCD. - */ - -+#ifdef HAVE_CONFIG_H -+#include <config.h> -+#endif - #include <stdio.h> - #include <assert.h> - #include <X11/Xlibint.h> -@@ -56,6 +59,18 @@ from The Open Group. - #include <X11/extensions/extutil.h> - #include <X11/extensions/recordproto.h> - #include <X11/extensions/record.h> -+#include <limits.h> -+ -+#ifndef HAVE__XEATDATAWORDS -+static inline void _XEatDataWords(Display *dpy, unsigned long n) -+{ -+# ifndef LONG64 -+ if (n >= (ULONG_MAX >> 2)) -+ _XIOError(dpy); -+# endif -+ _XEatData (dpy, n << 2); -+} -+#endif - - static XExtensionInfo _xrecord_info_data; - static XExtensionInfo *xrecord_info = &_xrecord_info_data; -@@ -427,7 +442,7 @@ XRecordGetContext(Display *dpy, XRecordContext context, - - ret = (XRecordState*)Xmalloc(sizeof(XRecordState)); - if (!ret) { -- /* XXX - eat data */ -+ _XEatDataWords (dpy, rep.length); - UnlockDisplay(dpy); - SyncHandle(); - return 0; -@@ -446,11 +461,7 @@ XRecordGetContext(Display *dpy, XRecordContext context, - } - if (!client_inf || !client_inf_str) - { -- for(i = 0; i < count; i++) -- { -- _XEatData (dpy, sizeof(xRecordClientInfo)); -- _XEatData (dpy, SIZEOF(xRecordRange)); /* XXX - don't know how many */ -- } -+ _XEatDataWords (dpy, rep.length); - UnlockDisplay(dpy); - XRecordFreeState(ret); - SyncHandle(); --- -1.8.2.3 - |