[arch-commits] Commit in libxt/repos (6 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Mon Mar 12 16:17:01 EDT 2012


    Date: Monday, March 12, 2012 @ 16:17:00
  Author: andyrtr
Revision: 153273

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  libxt/repos/extra-i686/PKGBUILD
    (from rev 153272, libxt/trunk/PKGBUILD)
  libxt/repos/extra-i686/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff
    (from rev 153272, libxt/trunk/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff)
  libxt/repos/extra-x86_64/PKGBUILD
    (from rev 153272, libxt/trunk/PKGBUILD)
  libxt/repos/extra-x86_64/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff
    (from rev 153272, libxt/trunk/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff)
Deleted:
  libxt/repos/extra-i686/PKGBUILD
  libxt/repos/extra-x86_64/PKGBUILD

-------------------------------------------------------------------------------+
 extra-i686/PKGBUILD                                                           |   62 +++++-----
 extra-i686/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff   |   40 ++++++
 extra-x86_64/PKGBUILD                                                         |   62 +++++-----
 extra-x86_64/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff |   40 ++++++
 4 files changed, 146 insertions(+), 58 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2012-03-12 20:16:21 UTC (rev 153272)
+++ extra-i686/PKGBUILD	2012-03-12 20:17:00 UTC (rev 153273)
@@ -1,29 +0,0 @@
-# $Id$
-#Maintainer: Jan de Groot <jgc at archlinux.org>
-
-pkgname=libxt
-pkgver=1.1.2
-pkgrel=1
-pkgdesc="X11 toolkit intrinsics library"
-arch=('i686' 'x86_64')
-url="http://xorg.freedesktop.org/"
-license=('custom')
-depends=('libsm' 'libx11')
-makedepends=('xorg-util-macros')
-options=('!libtool')
-source=("${url}/releases/individual/lib/libXt-${pkgver}.tar.bz2")
-sha1sums=('9e84b807419d78bda4acbd7aea05aed2ab0556cf')
-
-build() {
-  cd "${srcdir}/libXt-${pkgver}"
-  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
-  make
-}
-
-package() {
-  cd "${srcdir}/libXt-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-
-  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
-}

Copied: libxt/repos/extra-i686/PKGBUILD (from rev 153272, libxt/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2012-03-12 20:17:00 UTC (rev 153273)
@@ -0,0 +1,33 @@
+# $Id$
+#Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=libxt
+pkgver=1.1.2
+pkgrel=2
+pkgdesc="X11 toolkit intrinsics library"
+arch=('i686' 'x86_64')
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('libsm' 'libx11')
+makedepends=('xorg-util-macros')
+options=('!libtool')
+source=("${url}/releases/individual/lib/libXt-${pkgver}.tar.bz2"
+        Revert_treat_unexpected_returned_events_from_poll_as_errors.diff)
+sha1sums=('9e84b807419d78bda4acbd7aea05aed2ab0556cf'
+          'bebadf4b90f6a49530b5600a12a9385253e0daa6')
+
+build() {
+  cd "${srcdir}/libXt-${pkgver}"
+  # revert broken commit, see https://bugs.archlinux.org/task/28844 + https://bugs.archlinux.org/task/28875 + https://bugs.freedesktop.org/show_bug.cgi?id=47203
+  patch -Np1 -R -i ${srcdir}/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff
+  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
+  make
+}
+
+package() {
+  cd "${srcdir}/libXt-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}

Copied: libxt/repos/extra-i686/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff (from rev 153272, libxt/trunk/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff)
===================================================================
--- extra-i686/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff	                        (rev 0)
+++ extra-i686/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff	2012-03-12 20:17:00 UTC (rev 153273)
@@ -0,0 +1,40 @@
+From 70bb9e28d37fff4ead4d0a2c672af77059765fa4 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Wed, 04 Jan 2012 18:33:29 +0000
+Subject: Treat unexpected returned events from poll as errors
+
+Inspired by libxcb's f0565e8f06aadf760a9065a97b8cf5ab9cbd18de
+
+Resolves https://bugs.freedesktop.org/show_bug.cgi?id=20048
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+diff --git a/src/NextEvent.c b/src/NextEvent.c
+index b1f7bc7..c8c9dd5 100644
+--- a/src/NextEvent.c
++++ b/src/NextEvent.c
+@@ -356,7 +356,21 @@ static int IoWait (
+     return Select (wf->nfds, &wf->rmask, &wf->wmask, &wf->emask,
+ 		   wt->wait_time_ptr);
+ #else
+-    return poll (wf->fdlist, wf->fdlistlen, wt->poll_wait);
++    int ret = poll (wf->fdlist, wf->fdlistlen, wt->poll_wait);
++    /* If poll() returns an event we didn't expect, such as POLLNVAL, treat
++     * it as if it failed. */
++    if(ret >= 0) {
++        nfds_t i;
++        for (i=0; i < wf->fdlistlen; i++) {
++            struct pollfd *fd = &wf->fdlist[i];
++            if (fd->revents & ~fd->events) {
++                ret = -1;
++                errno = EIO;
++                break;
++            }
++        }
++    }
++    return ret;
+ #endif
+ }
+ 
+--
+cgit v0.9.0.2-2-gbebe

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2012-03-12 20:16:21 UTC (rev 153272)
+++ extra-x86_64/PKGBUILD	2012-03-12 20:17:00 UTC (rev 153273)
@@ -1,29 +0,0 @@
-# $Id$
-#Maintainer: Jan de Groot <jgc at archlinux.org>
-
-pkgname=libxt
-pkgver=1.1.2
-pkgrel=1
-pkgdesc="X11 toolkit intrinsics library"
-arch=('i686' 'x86_64')
-url="http://xorg.freedesktop.org/"
-license=('custom')
-depends=('libsm' 'libx11')
-makedepends=('xorg-util-macros')
-options=('!libtool')
-source=("${url}/releases/individual/lib/libXt-${pkgver}.tar.bz2")
-sha1sums=('9e84b807419d78bda4acbd7aea05aed2ab0556cf')
-
-build() {
-  cd "${srcdir}/libXt-${pkgver}"
-  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
-  make
-}
-
-package() {
-  cd "${srcdir}/libXt-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-
-  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
-}

Copied: libxt/repos/extra-x86_64/PKGBUILD (from rev 153272, libxt/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2012-03-12 20:17:00 UTC (rev 153273)
@@ -0,0 +1,33 @@
+# $Id$
+#Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=libxt
+pkgver=1.1.2
+pkgrel=2
+pkgdesc="X11 toolkit intrinsics library"
+arch=('i686' 'x86_64')
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('libsm' 'libx11')
+makedepends=('xorg-util-macros')
+options=('!libtool')
+source=("${url}/releases/individual/lib/libXt-${pkgver}.tar.bz2"
+        Revert_treat_unexpected_returned_events_from_poll_as_errors.diff)
+sha1sums=('9e84b807419d78bda4acbd7aea05aed2ab0556cf'
+          'bebadf4b90f6a49530b5600a12a9385253e0daa6')
+
+build() {
+  cd "${srcdir}/libXt-${pkgver}"
+  # revert broken commit, see https://bugs.archlinux.org/task/28844 + https://bugs.archlinux.org/task/28875 + https://bugs.freedesktop.org/show_bug.cgi?id=47203
+  patch -Np1 -R -i ${srcdir}/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff
+  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
+  make
+}
+
+package() {
+  cd "${srcdir}/libXt-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}

Copied: libxt/repos/extra-x86_64/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff (from rev 153272, libxt/trunk/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff)
===================================================================
--- extra-x86_64/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff	                        (rev 0)
+++ extra-x86_64/Revert_treat_unexpected_returned_events_from_poll_as_errors.diff	2012-03-12 20:17:00 UTC (rev 153273)
@@ -0,0 +1,40 @@
+From 70bb9e28d37fff4ead4d0a2c672af77059765fa4 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Wed, 04 Jan 2012 18:33:29 +0000
+Subject: Treat unexpected returned events from poll as errors
+
+Inspired by libxcb's f0565e8f06aadf760a9065a97b8cf5ab9cbd18de
+
+Resolves https://bugs.freedesktop.org/show_bug.cgi?id=20048
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+diff --git a/src/NextEvent.c b/src/NextEvent.c
+index b1f7bc7..c8c9dd5 100644
+--- a/src/NextEvent.c
++++ b/src/NextEvent.c
+@@ -356,7 +356,21 @@ static int IoWait (
+     return Select (wf->nfds, &wf->rmask, &wf->wmask, &wf->emask,
+ 		   wt->wait_time_ptr);
+ #else
+-    return poll (wf->fdlist, wf->fdlistlen, wt->poll_wait);
++    int ret = poll (wf->fdlist, wf->fdlistlen, wt->poll_wait);
++    /* If poll() returns an event we didn't expect, such as POLLNVAL, treat
++     * it as if it failed. */
++    if(ret >= 0) {
++        nfds_t i;
++        for (i=0; i < wf->fdlistlen; i++) {
++            struct pollfd *fd = &wf->fdlist[i];
++            if (fd->revents & ~fd->events) {
++                ret = -1;
++                errno = EIO;
++                break;
++            }
++        }
++    }
++    return ret;
+ #endif
+ }
+ 
+--
+cgit v0.9.0.2-2-gbebe



More information about the arch-commits mailing list