summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2006-01-01 13:48:45 +0000
committerxtraeme <xtraeme>2006-01-01 13:48:45 +0000
commit5fbff46ddaa86502882b19bb0ccdfe741b05518f (patch)
tree300a2bd6b63409bf5ba094a712959dff9b4703df /emulators
parentaf190ae5fd2452b1869d4a2421b9b5a4e76603bf (diff)
downloadpkgsrc-5fbff46ddaa86502882b19bb0ccdfe741b05518f.tar.gz
Update to 0.8.0 (update provided by Hubert Feyrer, thanks :-)
* Support for ARM Integrator/CP board system emulation. * Support for MIPS R4K system emulation. * Initial SMP support on x86 (up to 255 CPUs !). * Many new audio emulation features. * Initial USB support. * New networking options for VLAN support between several QEMU instances.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/Makefile7
-rw-r--r--emulators/qemu/PLIST3
-rw-r--r--emulators/qemu/distinfo16
-rw-r--r--emulators/qemu/files/Makefile.multinode-NetBSD10
-rw-r--r--emulators/qemu/patches/patch-am14
-rw-r--r--emulators/qemu/patches/patch-an83
-rw-r--r--emulators/qemu/patches/patch-ao192
-rw-r--r--emulators/qemu/patches/patch-ax166
-rw-r--r--emulators/qemu/patches/patch-ay24
9 files changed, 159 insertions, 356 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index 55fd57b8f47..65edc815865 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -1,13 +1,12 @@
-# $NetBSD: Makefile,v 1.23 2005/12/13 08:39:48 xtraeme Exp $
+# $NetBSD: Makefile,v 1.24 2006/01/01 13:48:45 xtraeme Exp $
#
-DISTNAME= qemu-0.7.2
-PKGREVISION= 4
+DISTNAME= qemu-0.8.0
CATEGORIES= emulators
MASTER_SITES= http://fabrice.bellard.free.fr/qemu/
MAINTAINER= xtraeme@NetBSD.org
-HOMEPAGE= http://fabrice.bellard.free.fr/qemu/
+HOMEPAGE= http://www.qemu.org/
COMMENT= CPU emulator using dynamic translation
CONFLICTS+= qemu-bin-*
diff --git a/emulators/qemu/PLIST b/emulators/qemu/PLIST
index 59d9d1a0534..6443e650719 100644
--- a/emulators/qemu/PLIST
+++ b/emulators/qemu/PLIST
@@ -1,6 +1,7 @@
-@comment $NetBSD: PLIST,v 1.6 2005/10/23 19:56:42 rillig Exp $
+@comment $NetBSD: PLIST,v 1.7 2006/01/01 13:48:45 xtraeme Exp $
bin/qemu
bin/qemu-img
+bin/qemu-system-arm
bin/qemu-system-mips
bin/qemu-system-ppc
bin/qemu-system-sparc
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index f0e98d116e3..a52a9495205 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.15 2005/12/11 09:40:39 wiz Exp $
+$NetBSD: distinfo,v 1.16 2006/01/01 13:48:45 xtraeme Exp $
-SHA1 (qemu-0.7.2.tar.gz) = 4daeccb57448eacc444152f30b5d84dfcca89dfe
-RMD160 (qemu-0.7.2.tar.gz) = 1d2dcc8f43ff4b4b9aa045c64e38c9a10140b13e
-Size (qemu-0.7.2.tar.gz) = 1341993 bytes
+SHA1 (qemu-0.8.0.tar.gz) = f7bcf2f0eee9e5207cba265f3c47ae781244628e
+RMD160 (qemu-0.8.0.tar.gz) = 3fc6da938f75364d0805ca0ecf8cb84a4b546dc7
+Size (qemu-0.8.0.tar.gz) = 1497965 bytes
SHA1 (patch-aa) = 455575215bad8864da285e1979da9ff7d8476a24
+SHA1 (patch-ab) = e12c98cf7e92b965b6fd46aa9140c7adfcf6a9d5
SHA1 (patch-ac) = fa190b38658ad487a6ddf6d78cc3cbb262c67702
SHA1 (patch-af) = 221d6d85aa898cb27462806faab58ee2a9871a1c
SHA1 (patch-ag) = 86df0bb94e71d87cf61d19404b53e3572384874e
@@ -12,13 +13,10 @@ SHA1 (patch-ai) = 480cc80a451488a1376f99ed152a917116759cbf
SHA1 (patch-aj) = d050b84489e74036994c19e982a363d74df797ab
SHA1 (patch-ak) = 0153a85109baa2314dc53d6cbbacb98b0c517099
SHA1 (patch-al) = d87d8c4bd0a422b0e1c2b52d049e9ac807cf1375
-SHA1 (patch-am) = b12f4ed6bbeb4d89c43ca06b3b3ff25c14386c47
-SHA1 (patch-an) = 10e1c5edae487be4ae43648649ad419a3b6d7508
-SHA1 (patch-ao) = 1899c03e37b2409df13c6f69bb21c3debf0aa4e8
+SHA1 (patch-am) = a22a3b23284c377afa8113768d68c8ef40c514f9
+SHA1 (patch-ao) = e92d56f991cf29f83e39464f9e695caa86fe5fe0
SHA1 (patch-ap) = b45baf052fbf8319596c37a2690c343f14b33a11
SHA1 (patch-as) = 0df64b325b758a88fe61590e129bab2b3f99ce63
SHA1 (patch-au) = aa2712c382a67beef9225e710e7735ba15995a41
SHA1 (patch-av) = bd88088f41b6b3c256eec933e5f267fc432e58fa
SHA1 (patch-aw) = 6299964fb3a747e8f5dfe4354e66722030ee9a75
-SHA1 (patch-ax) = b6eb66859e3ab318ec388d9f33201c27f34677ca
-SHA1 (patch-ay) = 2f2393dbc706b490e3faf05a243a9aa21e634af6
diff --git a/emulators/qemu/files/Makefile.multinode-NetBSD b/emulators/qemu/files/Makefile.multinode-NetBSD
index 54dafd9d315..60a45a0bdaf 100644
--- a/emulators/qemu/files/Makefile.multinode-NetBSD
+++ b/emulators/qemu/files/Makefile.multinode-NetBSD
@@ -1,4 +1,4 @@
-# $Id: Makefile.multinode-NetBSD,v 1.1 2005/10/01 04:12:32 hubertf Exp $
+# $Id: Makefile.multinode-NetBSD,v 1.2 2006/01/01 13:48:45 xtraeme Exp $
# Source: http://mail-index.netbsd.org/netbsd-help/2005/03/25/0005.html
#
# Starts up two qemu instances and networks bridges them to the local
@@ -32,8 +32,8 @@ netbsd1: bridge
-m ${QEMU_RAM} \
${NETBSD_NOGFX} \
-boot c \
- -tun-fd 3 3<>/dev/tap1 \
- -macaddr de:ad:be:ef:00:01 \
+ -net tap,fd=3,ifname=tap1 3<>/dev/tap1 \
+ -net nic,macaddr=de:ad:be:ef:00:01 \
${DISK1}
brconfig bridge0 delete tap1
ifconfig tap1 destroy
@@ -47,8 +47,8 @@ netbsd2: bridge
-m ${QEMU_RAM} \
${NETBSD_NOGFX} \
-boot c \
- -tun-fd 3 3<>/dev/tap2 \
- -macaddr de:ad:be:ef:00:02 \
+ -net tap,fd=3,ifname=tap2 3<>/dev/tap2 \
+ -net nic,macaddr=de:ad:be:ef:00:02 \
${DISK2}
brconfig bridge0 delete tap2
ifconfig tap2 destroy
diff --git a/emulators/qemu/patches/patch-am b/emulators/qemu/patches/patch-am
index 9a9b7e861a4..af730b64475 100644
--- a/emulators/qemu/patches/patch-am
+++ b/emulators/qemu/patches/patch-am
@@ -1,13 +1,13 @@
-$NetBSD: patch-am,v 1.1 2004/11/15 11:35:30 xtraeme Exp $
+$NetBSD: patch-am,v 1.2 2006/01/01 13:48:45 xtraeme Exp $
---- audio/ossaudio.c.orig 2004-11-15 12:07:01.000000000 +0100
-+++ audio/ossaudio.c 2004-11-15 12:07:55.000000000 +0100
-@@ -164,7 +164,7 @@
+--- audio/ossaudio.c.orig 2005-12-19 17:51:53.000000000 -0500
++++ audio/ossaudio.c
+@@ -229,7 +229,7 @@ static int oss_open (int in, struct oss_
goto err;
}
- if (ioctl (fd, SNDCTL_DSP_NONBLOCK)) {
+ if (ioctl (fd, SNDCTL_DSP_NONBLOCK, NULL)) {
- dolog ("Could not initialize audio hardware\n"
- "Failed to set non-blocking mode\n"
- "Reason: %s\n",
+ oss_logerr2 (errno, typ, "Failed to set non-blocking mode\n");
+ goto err;
+ }
diff --git a/emulators/qemu/patches/patch-an b/emulators/qemu/patches/patch-an
deleted file mode 100644
index 5840cc26361..00000000000
--- a/emulators/qemu/patches/patch-an
+++ /dev/null
@@ -1,83 +0,0 @@
-$NetBSD: patch-an,v 1.1 2004/11/15 11:35:30 xtraeme Exp $
-
---- audio/mixeng_template.h 7 Nov 2004 18:04:02 -0000 1.1
-+++ audio/mixeng_template.h 15 Nov 2004 09:09:27 -0000
-@@ -35,7 +35,7 @@
- #define HALF HALFT
- #endif
-
--static int64_t inline glue(conv_,IN_T) (IN_T v)
-+static int64_t inline CONV_IN_T (IN_T v)
- {
- #ifdef SIGNED
- return (INT_MAX*(int64_t)v)/HALF;
-@@ -44,7 +44,7 @@
- #endif
- }
-
--static IN_T inline glue(clip_,IN_T) (int64_t v)
-+static IN_T inline CLIP_IN_T (int64_t v)
- {
- if (v >= INT_MAX)
- return IN_MAX;
-@@ -58,50 +58,50 @@
- #endif
- }
-
--static void glue(glue(conv_,IN_T),_to_stereo) (void *dst, const void *src,
-+static void glue(CONV_IN_T,_to_stereo) (void *dst, const void *src,
- int samples)
- {
- st_sample_t *out = (st_sample_t *) dst;
- IN_T *in = (IN_T *) src;
- while (samples--) {
-- out->l = glue(conv_,IN_T) (*in++);
-- out->r = glue(conv_,IN_T) (*in++);
-+ out->l = CONV_IN_T (*in++);
-+ out->r = CONV_IN_T (*in++);
- out += 1;
- }
- }
-
--static void glue(glue(conv_,IN_T),_to_mono) (void *dst, const void *src,
-+static void glue(CONV_IN_T,_to_mono) (void *dst, const void *src,
- int samples)
- {
- st_sample_t *out = (st_sample_t *) dst;
- IN_T *in = (IN_T *) src;
- while (samples--) {
-- out->l = glue(conv_,IN_T) (in[0]);
-+ out->l = CONV_IN_T (in[0]);
- out->r = out->l;
- out += 1;
- in += 1;
- }
- }
-
--static void glue(glue(clip_,IN_T),_from_stereo) (void *dst, const void *src,
-+static void glue(CLIP_IN_T,_from_stereo) (void *dst, const void *src,
- int samples)
- {
- st_sample_t *in = (st_sample_t *) src;
- IN_T *out = (IN_T *) dst;
- while (samples--) {
-- *out++ = glue(clip_,IN_T) (in->l);
-- *out++ = glue(clip_,IN_T) (in->r);
-+ *out++ = CLIP_IN_T (in->l);
-+ *out++ = CLIP_IN_T (in->r);
- in += 1;
- }
- }
-
--static void glue(glue(clip_,IN_T),_from_mono) (void *dst, const void *src,
-+static void glue(CLIP_IN_T,_from_mono) (void *dst, const void *src,
- int samples)
- {
- st_sample_t *in = (st_sample_t *) src;
- IN_T *out = (IN_T *) dst;
- while (samples--) {
-- *out++ = glue(clip_,IN_T) (in->l + in->r);
-+ *out++ = CLIP_IN_T (in->l + in->r);
- in += 1;
- }
- }
diff --git a/emulators/qemu/patches/patch-ao b/emulators/qemu/patches/patch-ao
index e2a0610f3b6..84f12298f17 100644
--- a/emulators/qemu/patches/patch-ao
+++ b/emulators/qemu/patches/patch-ao
@@ -1,60 +1,138 @@
-$NetBSD: patch-ao,v 1.1 2004/11/15 11:35:30 xtraeme Exp $
+$NetBSD: patch-ao,v 1.2 2006/01/01 13:48:45 xtraeme Exp $
---- audio/mixeng.c 7 Nov 2004 18:04:02 -0000 1.1
-+++ audio/mixeng.c 15 Nov 2004 09:09:27 -0000
-@@ -27,6 +27,8 @@
- #include "audio/mixeng.h"
-
- #define IN_T int8_t
-+#define CONV_IN_T conv_int8_t
-+#define CLIP_IN_T clip_int8_t
- #define IN_MIN CHAR_MIN
- #define IN_MAX CHAR_MAX
- #define SIGNED
-@@ -34,17 +36,25 @@
- #undef SIGNED
- #undef IN_MAX
- #undef IN_MIN
-+#undef CLIP_IN_T
-+#undef CONV_IN_T
- #undef IN_T
-
- #define IN_T uint8_t
-+#define CONV_IN_T conv_uint8_t
-+#define CLIP_IN_T clip_uint8_t
- #define IN_MIN 0
- #define IN_MAX UCHAR_MAX
- #include "mixeng_template.h"
- #undef IN_MAX
- #undef IN_MIN
-+#undef CLIP_IN_T
-+#undef CONV_IN_T
- #undef IN_T
-
- #define IN_T int16_t
-+#define CONV_IN_T conv_int16_t
-+#define CLIP_IN_T clip_int16_t
- #define IN_MIN SHRT_MIN
- #define IN_MAX SHRT_MAX
- #define SIGNED
-@@ -52,14 +62,20 @@
- #undef SIGNED
- #undef IN_MAX
- #undef IN_MIN
-+#undef CLIP_IN_T
-+#undef CONV_IN_T
- #undef IN_T
-
- #define IN_T uint16_t
-+#define CONV_IN_T conv_uint16_t
-+#define CLIP_IN_T clip_uint16_t
- #define IN_MIN 0
- #define IN_MAX USHRT_MAX
- #include "mixeng_template.h"
- #undef IN_MAX
- #undef IN_MIN
-+#undef CLIP_IN_T
-+#undef CONV_IN_T
+--- audio/mixeng.c.orig 2005-12-19 17:51:53.000000000 -0500
++++ audio/mixeng.c
+@@ -101,48 +101,56 @@
#undef IN_T
+ #undef SHIFT
- t_sample *mixeng_conv[2][2][2] = {
++/*
++ * Work around ugly XX_t #defines in NetBSD 2.x,
++ * fixed as typedefs in NetBSD 3.x. Two macros needed to
++ * get CPP defines expanded properly. - HF
++ */
++#define _NBglue(x,y,z) x ## y ## z
++#define NBglue(x,y,z) _NBglue(x,y,z)
++
+ t_sample *mixeng_conv[2][2][2][2] = {
+ {
+ {
+ {
+- conv_natural_uint8_t_to_mono,
+- conv_natural_uint16_t_to_mono
++ NBglue(conv_natural_, uint8_t, _to_mono),
++ NBglue(conv_natural_, uint16_t, _to_mono)
+ },
+ {
+- conv_natural_uint8_t_to_mono,
+- conv_swap_uint16_t_to_mono
++ NBglue(conv_natural_, uint8_t, _to_mono),
++ NBglue(conv_swap_, uint16_t, _to_mono)
+ }
+ },
+ {
+ {
+- conv_natural_int8_t_to_mono,
+- conv_natural_int16_t_to_mono
++ NBglue(conv_natural_, int8_t, _to_mono),
++ NBglue(conv_natural_, int16_t, _to_mono)
+ },
+ {
+- conv_natural_int8_t_to_mono,
+- conv_swap_int16_t_to_mono
++ NBglue(conv_natural_, int8_t, _to_mono),
++ NBglue(conv_swap_, int16_t, _to_mono)
+ }
+ }
+ },
+ {
+ {
+ {
+- conv_natural_uint8_t_to_stereo,
+- conv_natural_uint16_t_to_stereo
++ NBglue(conv_natural_, uint8_t, _to_stereo),
++ NBglue(conv_natural_, uint16_t, _to_stereo)
+ },
+ {
+- conv_natural_uint8_t_to_stereo,
+- conv_swap_uint16_t_to_stereo
++ NBglue(conv_natural_, uint8_t, _to_stereo),
++ NBglue(conv_swap_, uint16_t, _to_stereo)
+ }
+ },
+ {
+ {
+- conv_natural_int8_t_to_stereo,
+- conv_natural_int16_t_to_stereo
++ NBglue(conv_natural_, int8_t, _to_stereo),
++ NBglue(conv_natural_, int16_t, _to_stereo)
+ },
+ {
+- conv_natural_int8_t_to_stereo,
+- conv_swap_int16_t_to_stereo
++ NBglue(conv_natural_, int8_t, _to_stereo),
++ NBglue(conv_swap_, int16_t, _to_stereo)
+ }
+ }
+ }
+@@ -152,44 +160,44 @@ f_sample *mixeng_clip[2][2][2][2] = {
+ {
+ {
+ {
+- clip_natural_uint8_t_from_mono,
+- clip_natural_uint16_t_from_mono
++ NBglue(clip_natural_, uint8_t, _from_mono),
++ NBglue(clip_natural_, uint16_t, _from_mono)
+ },
+ {
+- clip_natural_uint8_t_from_mono,
+- clip_swap_uint16_t_from_mono
++ NBglue(clip_natural_, uint8_t, _from_mono),
++ NBglue(clip_swap_, uint16_t, _from_mono)
+ }
+ },
+ {
+ {
+- clip_natural_int8_t_from_mono,
+- clip_natural_int16_t_from_mono
++ NBglue(clip_natural_, int8_t, _from_mono),
++ NBglue(clip_natural_, int16_t, _from_mono)
+ },
+ {
+- clip_natural_int8_t_from_mono,
+- clip_swap_int16_t_from_mono
++ NBglue(clip_natural_, int8_t, _from_mono),
++ NBglue(clip_swap_, int16_t, _from_mono)
+ }
+ }
+ },
+ {
+ {
+ {
+- clip_natural_uint8_t_from_stereo,
+- clip_natural_uint16_t_from_stereo
++ NBglue(clip_natural_, uint8_t, _from_stereo),
++ NBglue(clip_natural_, uint16_t, _from_stereo)
+ },
+ {
+- clip_natural_uint8_t_from_stereo,
+- clip_swap_uint16_t_from_stereo
++ NBglue(clip_natural_, uint8_t, _from_stereo),
++ NBglue(clip_swap_, uint16_t, _from_stereo)
+ }
+ },
+ {
+ {
+- clip_natural_int8_t_from_stereo,
+- clip_natural_int16_t_from_stereo
++ NBglue(clip_natural_, int8_t, _from_stereo),
++ NBglue(clip_natural_, int16_t, _from_stereo)
+ },
+ {
+- clip_natural_int8_t_from_stereo,
+- clip_swap_int16_t_from_stereo
++ NBglue(clip_natural_, int8_t, _from_stereo),
++ NBglue(clip_swap_, int16_t, _from_stereo)
+ }
+ }
+ }
diff --git a/emulators/qemu/patches/patch-ax b/emulators/qemu/patches/patch-ax
deleted file mode 100644
index 6e7c80c257f..00000000000
--- a/emulators/qemu/patches/patch-ax
+++ /dev/null
@@ -1,166 +0,0 @@
-$NetBSD: patch-ax,v 1.1 2005/11/04 21:09:15 dbj Exp $
-
---- /dev/null 2005-10-13 14:41:11.000000000 -0400
-+++ fakepoll.h
-@@ -0,0 +1,161 @@
-+// fakepoll.h
-+// poll using select
-+// Warning: a call to this poll() takes about 4K of stack space.
-+
-+// Greg Parker gparker-web@sealiesoftware.com December 2000
-+// This code is in the public domain and may be copied or modified without
-+// permission.
-+
-+// Updated May 2002:
-+// * fix crash when an fd is less than 0
-+// * set errno=EINVAL if an fd is greater or equal to FD_SETSIZE
-+// * don't set POLLIN or POLLOUT in revents if it wasn't requested
-+// in events (only happens when an fd is in the poll set twice)
-+
-+#ifndef _FAKE_POLL_H
-+#define _FAKE_POLL_H
-+
-+#include <limits.h>
-+#define FD_SETSIZE OPEN_MAX
-+#include <sys/types.h>
-+#include <sys/time.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+
-+typedef struct pollfd {
-+ int fd; /* file desc to poll */
-+ short events; /* events of interest on fd */
-+ short revents; /* events that occurred on fd */
-+} pollfd_t;
-+
-+
-+// poll flags
-+#define POLLIN 0x0001
-+#define POLLOUT 0x0004
-+#define POLLERR 0x0008
-+
-+// synonyms
-+#define POLLNORM POLLIN
-+#define POLLPRI POLLIN
-+#define POLLRDNORM POLLIN
-+#define POLLRDBAND POLLIN
-+#define POLLWRNORM POLLOUT
-+#define POLLWRBAND POLLOUT
-+
-+// ignored
-+#define POLLHUP 0x0010
-+#define POLLNVAL 0x0020
-+
-+inline int poll(struct pollfd *pollSet, int pollCount, int pollTimeout)
-+{
-+ struct timeval tv;
-+ struct timeval *tvp;
-+ fd_set readFDs, writeFDs, exceptFDs;
-+ fd_set *readp, *writep, *exceptp;
-+ struct pollfd *pollEnd, *p;
-+ int selected;
-+ int result;
-+ int maxFD;
-+
-+ if (!pollSet) {
-+ pollEnd = NULL;
-+ readp = NULL;
-+ writep = NULL;
-+ exceptp = NULL;
-+ maxFD = 0;
-+ }
-+ else {
-+ pollEnd = pollSet + pollCount;
-+ readp = &readFDs;
-+ writep = &writeFDs;
-+ exceptp = &exceptFDs;
-+
-+ FD_ZERO(readp);
-+ FD_ZERO(writep);
-+ FD_ZERO(exceptp);
-+
-+ // Find the biggest fd in the poll set
-+ maxFD = 0;
-+ for (p = pollSet; p < pollEnd; p++) {
-+ if (p->fd > maxFD) maxFD = p->fd;
-+ }
-+
-+ if (maxFD >= FD_SETSIZE) {
-+ // At least one fd is too big
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ // Transcribe flags from the poll set to the fd sets
-+ for (p = pollSet; p < pollEnd; p++) {
-+ if (p->fd < 0) {
-+ // Negative fd checks nothing and always reports zero
-+ } else {
-+ if (p->events & POLLIN) FD_SET(p->fd, readp);
-+ if (p->events & POLLOUT) FD_SET(p->fd, writep);
-+ if (p->events != 0) FD_SET(p->fd, exceptp);
-+ // POLLERR is never set coming in; poll() always reports errors
-+ // But don't report if we're not listening to anything at all.
-+ }
-+ }
-+ }
-+
-+ // poll timeout is in milliseconds. Convert to struct timeval.
-+ // poll timeout == -1 : wait forever : select timeout of NULL
-+ // poll timeout == 0 : return immediately : select timeout of zero
-+ if (pollTimeout >= 0) {
-+ tv.tv_sec = pollTimeout / 1000;
-+ tv.tv_usec = (pollTimeout % 1000) * 1000;
-+ tvp = &tv;
-+ } else {
-+ tvp = NULL;
-+ }
-+
-+
-+ selected = select(maxFD+1, readp, writep, exceptp, tvp);
-+
-+
-+ if (selected < 0) {
-+ // Error during select
-+ result = -1;
-+ }
-+ else if (selected > 0) {
-+ // Select found something
-+ // Transcribe result from fd sets to poll set.
-+ // Also count the number of selected fds. poll returns the
-+ // number of ready fds; select returns the number of bits set.
-+ int polled = 0;
-+ for (p = pollSet; p < pollEnd; p++) {
-+ p->revents = 0;
-+ if (p->fd < 0) {
-+ // Negative fd always reports zero
-+ } else {
-+ if ((p->events & POLLIN) && FD_ISSET(p->fd, readp)) {
-+ p->revents |= POLLIN;
-+ }
-+ if ((p->events & POLLOUT) && FD_ISSET(p->fd, writep)) {
-+ p->revents |= POLLOUT;
-+ }
-+ if ((p->events != 0) && FD_ISSET(p->fd, exceptp)) {
-+ p->revents |= POLLERR;
-+ }
-+
-+ if (p->revents) polled++;
-+ }
-+ }
-+ result = polled;
-+ }
-+ else {
-+ // selected == 0, select timed out before anything happened
-+ // Clear all result bits and return zero.
-+ for (p = pollSet; p < pollEnd; p++) {
-+ p->revents = 0;
-+ }
-+ result = 0;
-+ }
-+
-+ return result;
-+}
-+
-+
-+#endif
diff --git a/emulators/qemu/patches/patch-ay b/emulators/qemu/patches/patch-ay
deleted file mode 100644
index d50ab3d4136..00000000000
--- a/emulators/qemu/patches/patch-ay
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ay,v 1.1 2005/11/04 21:10:42 dbj Exp $
-
---- target-i386/helper.c.orig 2005-09-04 13:11:31.000000000 -0400
-+++ target-i386/helper.c
-@@ -3261,7 +3261,7 @@ static void imul64(uint64_t *plow, uint6
- static int div64(uint64_t *plow, uint64_t *phigh, uint64_t b)
- {
- uint64_t q, r, a1, a0;
-- int i, qb;
-+ int i, qb, ab;
-
- a0 = *plow;
- a1 = *phigh;
-@@ -3275,8 +3275,9 @@ static int div64(uint64_t *plow, uint64_
- return 1;
- /* XXX: use a better algorithm */
- for(i = 0; i < 64; i++) {
-+ ab = a1 >> 63;
- a1 = (a1 << 1) | (a0 >> 63);
-- if (a1 >= b) {
-+ if (ab || a1 >= b) {
- a1 -= b;
- qb = 1;
- } else {