On 2007/03/21 10:14, Todd T. Fries wrote:
> Here is a diff that will permit you to try out qemu 0.9.0; I'm testing
> this, and if you have any issues or successes please let me know.

This version is hopefully simpler to apply (though that may just be my
lack of experience in bending patch(1) to my will), and more importantly
it unbreaks building on amd64 (I successfully built and installed,
and booted an existing OpenBSD/i386 image created in an earlier qemu).

Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.20
diff -u -p -u -r1.20 Makefile
--- Makefile    19 Feb 2007 22:59:33 -0000      1.20
+++ Makefile    22 Mar 2007 23:20:12 -0000
@@ -5,8 +5,7 @@ ONLY_FOR_ARCHS=         amd64 arm i386 powerpc
 
 COMMENT=               "multi system emulator"
 
-DISTNAME=              qemu-0.8.2
-PKGNAME=               ${DISTNAME}p4
+DISTNAME=              qemu-0.9.0
 CATEGORIES=            emulators
 
 HOMEPAGE=              http://fabrice.bellard.free.fr/qemu/
@@ -21,17 +20,28 @@ PERMIT_DISTFILES_FTP=       Yes
 MASTER_SITES=          ${HOMEPAGE}
 
 BUILD_DEPENDS=         ::textproc/texi2html
-LIB_DEPENDS=           SDL::devel/sdl
 USE_GMAKE=             Yes
-USE_X11=               Yes
-WANTLIB=               m z ossaudio X11 Xext usbhid pthread c
+WANTLIB=               m z ossaudio c
 CONFIGURE_STYLE=       gnu
 
 # Currently, the regression tests are utterly broken.
 REGRESS_TARGET=                test test2
 
 .if ${MACHINE_ARCH} == "amd64"
-PATCH_LIST=     patch-* misc-*
+PATCH_LIST=            patch-* misc-*
+.endif
+
+FLAVORS=               no_x11
+FLAVOR?=
+
+.if ${FLAVOR:L:Mno_x11}
+CONFIGURE_ARGS+=       --disable-gfx-check \
+                       --disable-sdl
+.else
+LIB_DEPENDS=           SDL::devel/sdl \
+                       aa::graphics/aalib
+
+USE_X11=               Yes
 .endif
 
 post-install:
Index: distinfo
===================================================================
RCS file: /cvs/ports/emulators/qemu/distinfo,v
retrieving revision 1.6
diff -u -p -u -r1.6 distinfo
--- distinfo    22 Dec 2006 17:31:45 -0000      1.6
+++ distinfo    22 Mar 2007 23:20:12 -0000
@@ -1,4 +1,5 @@
-MD5 (qemu-0.8.2.tar.gz) = 5b3a89eb2f256a8a6f3bb07f7b3f1b07
-RMD160 (qemu-0.8.2.tar.gz) = 715c24997330352aa675cd7279731cec251f833a
-SHA1 (qemu-0.8.2.tar.gz) = d775239a545e7d0c5b677660a2122df590afde6d
-SIZE (qemu-0.8.2.tar.gz) = 1810909
+MD5 (qemu-0.9.0.tar.gz) = ab11a03ba30cf4a70641f0f170473d69
+RMD160 (qemu-0.9.0.tar.gz) = 4296542b6da18a6ac93d20787330d3c1c2ac0a19
+SHA1 (qemu-0.9.0.tar.gz) = 1e57e48a06eb8729913d92601000466eecef06cb
+SHA256 (qemu-0.9.0.tar.gz) = 
491facf9335654967ee53d8fb3540a274bfcbdcc225506bd38c4ee8e9ab405c1
+SIZE (qemu-0.9.0.tar.gz) = 1901741
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-Makefile,v
retrieving revision 1.5
diff -u -p -u -r1.5 patch-Makefile
--- patches/patch-Makefile      22 Dec 2006 17:31:45 -0000      1.5
+++ patches/patch-Makefile      22 Mar 2007 23:20:12 -0000
@@ -1,7 +1,16 @@
-$OpenBSD: patch-Makefile,v 1.5 2006/12/22 17:31:45 todd Exp $
---- Makefile.orig      Sat Jul 22 13:23:34 2006
-+++ Makefile   Sun Nov 12 17:10:10 2006
-@@ -44,7 +44,7 @@ clean:
+$OpenBSD$
+--- Makefile.orig      Mon Feb  5 17:01:54 2007
++++ Makefile   Tue Mar 20 19:21:54 2007
+@@ -27,7 +27,7 @@ endif
+ ifndef CONFIG_DARWIN
+ ifndef CONFIG_WIN32
+ ifndef CONFIG_SOLARIS
+-LIBS+=-lrt
++#LIBS+=-lrt
+ endif
+ endif
+ endif
+@@ -51,7 +51,7 @@ clean:
        rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
        $(MAKE) -C tests clean
        for d in $(TARGET_DIRS); do \
@@ -10,7 +19,7 @@ $OpenBSD: patch-Makefile,v 1.5 2006/12/2
          done
  
  distclean: clean
-@@ -98,7 +98,7 @@ cscope:
+@@ -106,7 +106,7 @@ cscope:
  
  # documentation
  %.html: %.texi
Index: patches/patch-Makefile_target
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-Makefile_target,v
retrieving revision 1.10
diff -u -p -u -r1.10 patch-Makefile_target
--- patches/patch-Makefile_target       22 Dec 2006 17:31:45 -0000      1.10
+++ patches/patch-Makefile_target       22 Mar 2007 23:20:12 -0000
@@ -1,28 +1,17 @@
-$OpenBSD: patch-Makefile_target,v 1.10 2006/12/22 17:31:45 todd Exp $
---- Makefile.target.orig       Sat Jul 22 13:23:34 2006
-+++ Makefile.target    Mon Dec 18 17:16:21 2006
-@@ -17,8 +17,9 @@ ifdef CONFIG_USER_ONLY
- VPATH+=:$(SRC_PATH)/linux-user
- DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
- endif
--CFLAGS=-Wall -O2 -g -fno-strict-aliasing
-+#CFLAGS=-Wall -O2 -g -fno-strict-aliasing
- #CFLAGS+=-Werror
-+CFLAGS+= -ggdb
- LDFLAGS=-g
- LIBS=
- HELPER_CFLAGS=$(CFLAGS)
-@@ -144,7 +145,7 @@ LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64
+$OpenBSD$
+--- Makefile.target.orig       Mon Feb  5 17:01:54 2007
++++ Makefile.target    Tue Mar 20 20:37:14 2007
+@@ -150,7 +150,7 @@ BASE_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)
  endif
  
  ifeq ($(ARCH),arm)
--OP_CFLAGS=$(CFLAGS) -mno-sched-prolog -fno-omit-frame-pointer
-+OP_CFLAGS=$(CFLAGS) -mno-sched-prolog -fno-omit-frame-pointer -mapcs-frame
- LDFLAGS+=-Wl,-T,$(SRC_PATH)/arm.ld
+-OP_CFLAGS+=-mno-sched-prolog -fno-omit-frame-pointer
++OP_CFLAGS+=-mno-sched-prolog -fno-omit-frame-pointer -mapcs-frame
+ BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
  endif
  
-@@ -153,6 +154,12 @@ OP_CFLAGS=$(CFLAGS) -fomit-frame-pointer
- LDFLAGS+=-Wl,-T,m68k.ld
+@@ -163,6 +163,12 @@ ifeq ($(ARCH),mips)
+ BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
  endif
  
 +# Very important for this 'ifeq' block to be after other
@@ -34,15 +23,15 @@ $OpenBSD: patch-Makefile_target,v 1.10 2
  ifeq ($(HAVE_GCC3_OPTIONS),yes)
  # very important to generate a return at the end of every operation
  OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
-@@ -166,6 +173,7 @@ endif
+@@ -182,6 +188,7 @@ OP_CFLAGS+=$(OS_CFLAGS)
  #########################################################
  
- DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-+DEFINES+= #-DDEBUG_GDB -DDEBUG -DDEBUG_KBD -DDEBUG_MOUSE
+ CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
++#CPPFLAGS+= -DDEBUG_GDB -DDEBUG -DDEBUG_KBD -DDEBUG_MOUSE
  LIBS+=-lm
  ifndef CONFIG_USER_ONLY
  LIBS+=-lz
-@@ -297,6 +305,9 @@ endif
+@@ -329,6 +336,9 @@ endif
  
  SOUND_HW = sb16.o es1370.o
  AUDIODRV = audio.o noaudio.o wavaudio.o
@@ -52,7 +41,7 @@ $OpenBSD: patch-Makefile_target,v 1.10 2
  ifdef CONFIG_SDL
  AUDIODRV += sdlaudio.o
  endif
-@@ -403,7 +414,7 @@ endif
+@@ -440,7 +450,7 @@ endif
  ifndef CONFIG_DARWIN
  ifndef CONFIG_WIN32
  ifndef CONFIG_SOLARIS
Index: patches/patch-audio_ossaudio_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-audio_ossaudio_c,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-audio_ossaudio_c
--- patches/patch-audio_ossaudio_c      27 Dec 2005 07:56:15 -0000      1.2
+++ patches/patch-audio_ossaudio_c      22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-audio_ossaudio_c,v 1.2 2005/12/27 07:56:15 todd Exp $
---- audio/ossaudio.c.orig      Mon Dec 19 16:51:53 2005
-+++ audio/ossaudio.c   Tue Dec 20 11:00:04 2005
+$OpenBSD$
+--- audio/ossaudio.c.orig      Mon Feb  5 17:01:54 2007
++++ audio/ossaudio.c   Sat Mar 10 16:39:38 2007
 @@ -21,10 +21,15 @@
   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   * THE SOFTWARE.
Index: patches/patch-block-raw_c
===================================================================
RCS file: patches/patch-block-raw_c
diff -N patches/patch-block-raw_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-block-raw_c   22 Mar 2007 23:20:12 -0000
@@ -0,0 +1,141 @@
+$OpenBSD$
+--- block-raw.c.orig   Mon Mar 12 16:16:47 2007
++++ block-raw.c        Tue Mar 20 19:16:43 2007
+@@ -25,7 +25,9 @@
+ #include "block_int.h"
+ #include <assert.h>
+ #ifndef _WIN32
++#ifndef CONFIG_NO_AIO
+ #include <aio.h>
++#endif
+ 
+ #ifndef QEMU_TOOL
+ #include "exec-all.h"
+@@ -53,10 +55,16 @@
+ #include <linux/cdrom.h>
+ #include <linux/fd.h>
+ #endif
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__)
+ #include <sys/disk.h>
+ #endif
+ 
++#ifdef __OpenBSD__
++#include <sys/ioctl.h>
++#include <sys/disklabel.h>
++#include <sys/dkio.h>
++#endif
++
+ //#define DEBUG_FLOPPY
+ 
+ #define FTYPE_FILE   0
+@@ -158,6 +166,7 @@ static int raw_pwrite(BlockDriverState *
+ }
+ 
+ /***********************************************************/
++#ifndef CONFIG_NO_AIO
+ /* Unix AIO using POSIX AIO */
+ 
+ typedef struct RawAIOCB {
+@@ -380,6 +389,37 @@ static void raw_aio_cancel(BlockDriverAI
+     }
+ }
+ 
++# else /* !CONFIG_NO_AIO */
++
++void qemu_aio_init(void)
++{
++}
++
++void qemu_aio_poll(void)
++{
++}
++
++void qemu_aio_flush(void)
++{
++}
++
++void qemu_aio_wait_start(void)
++{
++}
++
++void qemu_aio_wait(void)
++{
++#ifndef QEMU_TOOL
++      qemu_bh_poll();
++#endif
++}
++
++void qemu_aio_wait_end(void)
++{
++}
++
++#endif /* !CONFIG_NO_AIO */
++
+ static void raw_close(BlockDriverState *bs)
+ {
+     BDRVRawState *s = bs->opaque;
+@@ -399,8 +439,25 @@ static int raw_truncate(BlockDriverState
+     return 0;
+ }
+ 
++#ifdef __OpenBSD__
+ static int64_t  raw_getlength(BlockDriverState *bs)
+ {
++      int fd = ((BDRVRawState*)bs->opaque)->fd;
++      struct stat st;
++      if(fstat(fd, &st))
++        return -1;
++      if(S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)){
++        struct disklabel dl;
++        if(ioctl(fd, DIOCGDINFO, &dl))
++          return -1;
++        return (uint64_t)dl.d_secsize *
++              dl.d_partitions[DISKPART(st.st_rdev)].p_size;
++      }else
++        return st.st_size;
++}
++#else /* !__OpenBSD__ */
++static int64_t  raw_getlength(BlockDriverState *bs)
++{
+     BDRVRawState *s = bs->opaque;
+     int fd = s->fd;
+     int64_t size;
+@@ -445,6 +502,7 @@ static int64_t  raw_getlength(BlockDrive
+     }
+     return size;
+ }
++#endif
+ 
+ static int raw_create(const char *filename, int64_t total_size,
+                       const char *backing_file, int flags)
+@@ -479,11 +537,13 @@ BlockDriver bdrv_raw = {
+     raw_close,
+     raw_create,
+     raw_flush,
+-    
++
++#ifndef CONFIG_NO_AIO
+     .bdrv_aio_read = raw_aio_read,
+     .bdrv_aio_write = raw_aio_write,
+     .bdrv_aio_cancel = raw_aio_cancel,
+     .aiocb_size = sizeof(RawAIOCB),
++#endif /* !CONFIG_NO_AIO */
+     .protocol_name = "file",
+     .bdrv_pread = raw_pread,
+     .bdrv_pwrite = raw_pwrite,
+@@ -815,11 +875,13 @@ BlockDriver bdrv_host_device = {
+     raw_close,
+     NULL,
+     raw_flush,
+-    
++
++#ifndef CONFIG_NO_AIO
+     .bdrv_aio_read = raw_aio_read,
+     .bdrv_aio_write = raw_aio_write,
+     .bdrv_aio_cancel = raw_aio_cancel,
+     .aiocb_size = sizeof(RawAIOCB),
++#endif /* !CONFIG_NO_AIO */
+     .bdrv_pread = raw_pread,
+     .bdrv_pwrite = raw_pwrite,
+     .bdrv_getlength = raw_getlength,
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-configure,v
retrieving revision 1.7
diff -u -p -u -r1.7 patch-configure
--- patches/patch-configure     19 Feb 2007 12:43:38 -0000      1.7
+++ patches/patch-configure     22 Mar 2007 23:20:12 -0000
@@ -1,18 +1,20 @@
-$OpenBSD: patch-configure,v 1.7 2007/02/19 12:43:38 robert Exp $
---- configure.orig     Sat Jul 22 19:23:34 2006
-+++ configure  Tue Feb 13 09:22:48 2007
-@@ -21,8 +21,8 @@ prefix=""
+$OpenBSD$
+--- configure.orig     Mon Feb  5 17:01:54 2007
++++ configure  Tue Mar 20 19:07:30 2007
+@@ -21,10 +21,10 @@ prefix=""
  interp_prefix="/usr/gnemul/qemu-%M"
  static="no"
  cross_prefix=""
 -cc="gcc"
--host_cc="gcc"
 +cc="${CC:-cc}"
+ gcc3_search="yes"
+ gcc3_list="gcc-3.4 gcc34 gcc-3.3 gcc33 gcc-3.2 gcc32"
+-host_cc="gcc"
 +host_cc="${CC:-cc}"
  ar="ar"
  make="make"
  install="install"
-@@ -42,7 +42,7 @@ case "$cpu" in
+@@ -44,7 +44,7 @@ case "$cpu" in
    alpha)
      cpu="alpha"
    ;;
@@ -21,7 +23,7 @@ $OpenBSD: patch-configure,v 1.7 2007/02/
      cpu="powerpc"
    ;;
    mips)
-@@ -66,6 +66,9 @@ case "$cpu" in
+@@ -68,6 +68,9 @@ case "$cpu" in
    x86_64|amd64)
      cpu="x86_64"
    ;;
@@ -31,7 +33,7 @@ $OpenBSD: patch-configure,v 1.7 2007/02/
    *)
      cpu="unknown"
    ;;
-@@ -121,6 +124,7 @@ oss="yes"
+@@ -122,6 +125,7 @@ oss="yes"
  ;;
  OpenBSD)
  bsd="yes"
@@ -39,7 +41,7 @@ $OpenBSD: patch-configure,v 1.7 2007/02/
  oss="yes"
  ;;
  Darwin)
-@@ -509,7 +513,7 @@ else
+@@ -573,7 +577,7 @@ else
  if test -z "$prefix" ; then
      prefix="/usr/local"
  fi
@@ -48,7 +50,7 @@ $OpenBSD: patch-configure,v 1.7 2007/02/
  datadir="$prefix/share/qemu"
  docdir="$prefix/share/doc/qemu"
  bindir="$prefix/bin"
-@@ -537,9 +541,7 @@ if test "$darwin" = "yes" ; then
+@@ -601,9 +605,7 @@ if test "$darwin" = "yes" ; then
      echo "Cocoa support     $cocoa"
  fi
  echo "SDL support       $sdl"
@@ -59,7 +61,15 @@ $OpenBSD: patch-configure,v 1.7 2007/02/
  echo "mingw32 support   $mingw32"
  echo "Adlib support     $adlib"
  echo "CoreAudio support $coreaudio"
-@@ -602,6 +604,9 @@ if test "$cpu" = "i386" ; then
+@@ -648,6 +650,7 @@ echo "mandir=$mandir" >> $config_mak
+ echo "datadir=$datadir" >> $config_mak
+ echo "docdir=$docdir" >> $config_mak
+ echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h
++echo "#define CONFIG_NO_AIO 1" >> $config_h
+ echo "MAKE=$make" >> $config_mak
+ echo "INSTALL=$install" >> $config_mak
+ echo "CC=$cc" >> $config_mak
+@@ -667,6 +670,9 @@ if test "$cpu" = "i386" ; then
  elif test "$cpu" = "x86_64" ; then
    echo "ARCH=x86_64" >> $config_mak
    echo "#define HOST_X86_64 1" >> $config_h
@@ -69,7 +79,7 @@ $OpenBSD: patch-configure,v 1.7 2007/02/
  elif test "$cpu" = "armv4b" ; then
    echo "ARCH=arm" >> $config_mak
    echo "#define HOST_ARM 1" >> $config_h
-@@ -681,6 +686,9 @@ fi
+@@ -746,6 +752,9 @@ fi
  if test "$oss" = "yes" ; then
    echo "CONFIG_OSS=yes" >> $config_mak
    echo "#define CONFIG_OSS 1" >> $config_h
@@ -79,9 +89,9 @@ $OpenBSD: patch-configure,v 1.7 2007/02/
  fi
  if test "$coreaudio" = "yes" ; then
    echo "CONFIG_COREAUDIO=yes" >> $config_mak
-@@ -715,6 +723,13 @@ fi
- if [ "$build_acpi_tables" = "yes" ] ; then
-   echo "BUILD_ACPI_TABLES=yes" >> $config_mak
+@@ -777,6 +786,13 @@ echo "TARGET_DIRS=$target_list" >> $conf
+ if [ "$build_docs" = "yes" ] ; then
+   echo "BUILD_DOCS=yes" >> $config_mak
  fi
 +
 +if [ "$openbsd" = "yes" ] ; then
Index: patches/patch-cpu-all_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-cpu-all_h,v
retrieving revision 1.1
diff -u -p -u -r1.1 patch-cpu-all_h
--- patches/patch-cpu-all_h     19 Feb 2007 12:43:38 -0000      1.1
+++ patches/patch-cpu-all_h     22 Mar 2007 23:20:12 -0000
@@ -1,17 +1,21 @@
-$OpenBSD: patch-cpu-all_h,v 1.1 2007/02/19 12:43:38 robert Exp $
---- cpu-all.h.orig     Mon Feb 19 10:54:26 2007
-+++ cpu-all.h  Mon Feb 19 10:56:42 2007
-@@ -992,6 +992,24 @@ static inline int64_t cpu_get_real_ticks
-         return rval.i64;
+$OpenBSD$
+--- cpu-all.h.orig     Mon Feb  5 17:01:54 2007
++++ cpu-all.h  Tue Mar 20 20:27:21 2007
+@@ -1002,13 +1002,22 @@ static inline int64_t cpu_get_real_ticks
  #endif
  }
-+#else
+ #else
+-/* The host CPU doesn't have an easily accessible cycle counter.
+-   Just return a monotonically increasing vlue.  This will be totally wrong,
+-   but hopefully better than nothing.  */
 +# warning non-optimized CPU
 +#include <sys/time.h>
 +#include <time.h>
 +
-+static inline int64_t cpu_get_real_ticks (void)
-+{
+ static inline int64_t cpu_get_real_ticks (void)
+ {
+-    static int64_t ticks = 0;
+-    return ticks++;
 +      struct timeval tv;
 +      static int64_t i = 0;
 +      int64_t j;
@@ -22,7 +26,6 @@ $OpenBSD: patch-cpu-all_h,v 1.1 2007/02/
 +      } while (i == j);
 +      i = j;
 +      return j;
-+}
+ }
  #endif
  
- /* profiling */
Index: patches/patch-cutils_c
===================================================================
RCS file: patches/patch-cutils_c
diff -N patches/patch-cutils_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-cutils_c      22 Mar 2007 23:20:12 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- cutils.c.orig      Sun Mar 11 16:33:27 2007
++++ cutils.c   Sun Mar 11 16:34:17 2007
+@@ -23,7 +23,7 @@
+  */
+ #include "vl.h"
+ 
+-void pstrcpy(char *buf, int buf_size, const char *str)
++void pstrcpy(char *buf, size_t buf_size, const char *str)
+ {
+     int c;
+     char *q = buf;
+@@ -41,7 +41,7 @@ void pstrcpy(char *buf, int buf_size, co
+ }
+ 
+ /* strcat and truncate. */
+-char *pstrcat(char *buf, int buf_size, const char *s)
++char *pstrcat(char *buf, size_t buf_size, const char *s)
+ {
+     int len;
+     len = strlen(buf);
Index: patches/patch-dis-asm_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-dis-asm_h,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 patch-dis-asm_h
--- patches/patch-dis-asm_h     7 Mar 2005 16:41:28 -0000       1.1.1.1
+++ patches/patch-dis-asm_h     22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-dis-asm_h,v 1.1.1.1 2005/03/07 16:41:28 todd Exp $
---- dis-asm.h.orig     Mon Jan  3 17:35:10 2005
-+++ dis-asm.h  Sun Feb 27 15:47:13 2005
+$OpenBSD$
+--- dis-asm.h.orig     Mon Feb  5 17:01:54 2007
++++ dis-asm.h  Sat Mar 10 16:39:39 2007
 @@ -13,6 +13,7 @@
  #include <stdio.h>
  #include <string.h>
Index: patches/patch-disas_c
===================================================================
RCS file: patches/patch-disas_c
diff -N patches/patch-disas_c
--- patches/patch-disas_c       8 Jun 2006 14:33:38 -0000       1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-disas_c,v 1.2 2006/06/08 14:33:38 todd Exp $
---- disas.c.orig       Wed May  3 15:32:58 2006
-+++ disas.c    Fri May  5 22:07:38 2006
-@@ -273,7 +273,7 @@ void disas(FILE *out, void *code, unsign
- #ifdef __arm__
-         /* since data are included in the code, it is better to
-            display code data too */
--        if (is_host) {
-+        if (1 /* is_host */) {
-             fprintf(out, "%08x  ", (int)bfd_getl32((const bfd_byte *)pc));
-         }
- #endif
Index: patches/patch-dyngen-exec_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-dyngen-exec_h,v
retrieving revision 1.4
diff -u -p -u -r1.4 patch-dyngen-exec_h
--- patches/patch-dyngen-exec_h 22 Dec 2006 17:31:45 -0000      1.4
+++ patches/patch-dyngen-exec_h 22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-dyngen-exec_h,v 1.4 2006/12/22 17:31:45 todd Exp $
---- dyngen-exec.h.orig Sat Jul 22 13:23:34 2006
-+++ dyngen-exec.h      Sun Nov 12 17:10:10 2006
+$OpenBSD$
+--- dyngen-exec.h.orig Mon Feb  5 17:01:54 2007
++++ dyngen-exec.h      Sat Mar 10 16:39:39 2007
 @@ -27,11 +27,15 @@
  #define _FILEDEFED
  #endif
@@ -24,9 +24,9 @@ $OpenBSD: patch-dyngen-exec_h,v 1.4 2006
  #endif
 +#endif
  
- #define INT8_MIN              (-128)
- #define INT16_MIN             (-32767-1)
-@@ -75,11 +80,15 @@ typedef signed long long int64_t;
+ /* XXX: This may be wrong for 64-bit ILP32 hosts.  */
+ typedef void * host_reg_t;
+@@ -78,11 +83,15 @@ typedef void * host_reg_t;
  #define UINT32_MAX            (4294967295U)
  #define UINT64_MAX            ((uint64_t)(18446744073709551615))
  
Index: patches/patch-exec_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-exec_c,v
retrieving revision 1.5
diff -u -p -u -r1.5 patch-exec_c
--- patches/patch-exec_c        22 Dec 2006 17:31:45 -0000      1.5
+++ patches/patch-exec_c        22 Mar 2007 23:20:12 -0000
@@ -1,7 +1,7 @@
-$OpenBSD: patch-exec_c,v 1.5 2006/12/22 17:31:45 todd Exp $
---- exec.c.orig        Sat Jul 22 13:23:34 2006
-+++ exec.c     Sun Nov 12 17:10:10 2006
-@@ -2010,7 +2010,7 @@ void cpu_physical_memory_rw(target_phys_
+$OpenBSD$
+--- exec.c.orig        Mon Feb  5 17:01:54 2007
++++ exec.c     Sat Mar 10 16:39:39 2007
+@@ -2027,7 +2027,7 @@ void cpu_physical_memory_rw(target_phys_
      target_phys_addr_t page;
      unsigned long pd;
      PhysPageDesc *p;
Index: patches/patch-fpu_softfloat-native_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-fpu_softfloat-native_c,v
retrieving revision 1.1
diff -u -p -u -r1.1 patch-fpu_softfloat-native_c
--- patches/patch-fpu_softfloat-native_c        11 Aug 2005 01:15:17 -0000      
1.1
+++ patches/patch-fpu_softfloat-native_c        22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-fpu_softfloat-native_c,v 1.1 2005/08/11 01:15:17 todd Exp $
---- fpu/softfloat-native.c.orig        Wed Apr 27 13:53:34 2005
-+++ fpu/softfloat-native.c     Wed Apr 27 14:26:20 2005
+$OpenBSD$
+--- fpu/softfloat-native.c.orig        Mon Feb  5 17:01:54 2007
++++ fpu/softfloat-native.c     Sat Mar 10 16:39:39 2007
 @@ -1,6 +1,7 @@
  /* Native implementation of soft float functions. Only a single status
     context is supported */
Index: patches/patch-fpu_softfloat-native_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-fpu_softfloat-native_h,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-fpu_softfloat-native_h
--- patches/patch-fpu_softfloat-native_h        8 Jun 2006 14:33:38 -0000       
1.2
+++ patches/patch-fpu_softfloat-native_h        22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-fpu_softfloat-native_h,v 1.2 2006/06/08 14:33:38 todd Exp $
---- fpu/softfloat-native.h.orig        Wed May  3 15:32:58 2006
-+++ fpu/softfloat-native.h     Fri May  5 22:11:59 2006
+$OpenBSD$
+--- fpu/softfloat-native.h.orig        Mon Feb  5 17:01:54 2007
++++ fpu/softfloat-native.h     Sat Mar 10 16:39:40 2007
 @@ -1,4 +1,5 @@
  /* Native implementation of soft float functions */
 +#include "gnu-c99-math.h"
Index: patches/patch-gnu-c99-math_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-gnu-c99-math_h,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-gnu-c99-math_h
--- patches/patch-gnu-c99-math_h        8 Jun 2006 14:33:38 -0000       1.3
+++ patches/patch-gnu-c99-math_h        22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-gnu-c99-math_h,v 1.3 2006/06/08 14:33:38 todd Exp $
---- gnu-c99-math.h.orig        Fri May  5 22:23:24 2006
-+++ gnu-c99-math.h     Thu May 11 20:24:00 2006
+$OpenBSD$
+--- gnu-c99-math.h.orig        Sat Mar 10 16:39:40 2007
++++ gnu-c99-math.h     Sat Mar 10 16:39:40 2007
 @@ -0,0 +1,23 @@
 +#if (defined(__sun__) || defined(__OpenBSD__)) && defined(__GNUC__)
 +
Index: patches/patch-hw_pc_c
===================================================================
RCS file: patches/patch-hw_pc_c
diff -N patches/patch-hw_pc_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-hw_pc_c       22 Mar 2007 23:20:12 -0000
@@ -0,0 +1,43 @@
+$OpenBSD$
+--- hw/pc.c.orig       Wed Mar 21 09:39:11 2007
++++ hw/pc.c    Wed Mar 21 09:43:52 2007
+@@ -711,7 +711,7 @@ static void pc_init1(int ram_size, int v
+     if (i440fx_state) {
+         i440fx_init_memory_mappings(i440fx_state);
+     }
+-#if 0
++#if 1
+     /* ??? Need to figure out some way for the user to
+        specify SCSI devices.  */
+     if (pci_enabled) {
+@@ -719,11 +719,26 @@ static void pc_init1(int ram_size, int v
+         BlockDriverState *bdrv;
+ 
+         scsi = lsi_scsi_init(pci_bus, -1);
+-        bdrv = bdrv_new("scsidisk");
+-        bdrv_open(bdrv, "scsi_disk.img", 0);
++        bdrv = bdrv_new("scsidisk0");
++        bdrv_open(bdrv, "scsi_disk0.img", 0);
+         lsi_scsi_attach(scsi, bdrv, -1);
+-        bdrv = bdrv_new("scsicd");
+-        bdrv_open(bdrv, "scsi_cd.iso", 0);
++        bdrv = bdrv_new("scsidisk1");
++        bdrv_open(bdrv, "scsi_disk1.img", 0);
++        lsi_scsi_attach(scsi, bdrv, -1);
++        bdrv = bdrv_new("scsidisk2");
++        bdrv_open(bdrv, "scsi_disk2.img", 0);
++        lsi_scsi_attach(scsi, bdrv, -1);
++        bdrv = bdrv_new("scsidisk3");
++        bdrv_open(bdrv, "scsi_disk3.img", 0);
++        lsi_scsi_attach(scsi, bdrv, -1);
++        bdrv = bdrv_new("scsidisk4");
++        bdrv_open(bdrv, "scsi_disk4.img", 0);
++        lsi_scsi_attach(scsi, bdrv, -1);
++        bdrv = bdrv_new("scsidisk5");
++        bdrv_open(bdrv, "scsi_disk5.img", 0);
++        lsi_scsi_attach(scsi, bdrv, -1);
++        bdrv = bdrv_new("scsicd0");
++        bdrv_open(bdrv, "scsi_cd0.iso", 0);
+         bdrv_set_type_hint(bdrv, BDRV_TYPE_CDROM);
+         lsi_scsi_attach(scsi, bdrv, -1);
+     }
Index: patches/patch-osdep_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-osdep_h,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-osdep_h
--- patches/patch-osdep_h       22 Dec 2006 17:31:45 -0000      1.2
+++ patches/patch-osdep_h       22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-osdep_h,v 1.2 2006/12/22 17:31:45 todd Exp $
---- osdep.h.orig       Sat Jul 22 13:23:34 2006
-+++ osdep.h    Sun Nov 12 17:10:10 2006
+$OpenBSD$
+--- osdep.h.orig       Mon Feb  5 17:01:54 2007
++++ osdep.h    Sat Mar 10 16:39:40 2007
 @@ -2,6 +2,10 @@
  #define QEMU_OSDEP_H
  
@@ -10,14 +10,5 @@ $OpenBSD: patch-osdep_h,v 1.2 2006/12/22
 +#include <sys/signal.h>
 +#endif
  
- int qemu_vsnprintf(char *buf, int buflen, const char *fmt, va_list args);
- void qemu_vprintf(const char *fmt, va_list ap);
-@@ -33,7 +37,7 @@ struct siginfo;
- struct qemu_sigaction {
-     union {
-         void (*_sa_handler)(int);
--        void (*_sa_sigaction)(int, struct siginfo *, void *);
-+        void (*_sa_sigaction)(int, qemu_siginfo *, void *);
-     } _u;
-     unsigned long sa_flags;
-     void (*sa_restorer)(void);
+ #define qemu_printf printf
+ 
Index: patches/patch-qemu-img_c
===================================================================
RCS file: patches/patch-qemu-img_c
diff -N patches/patch-qemu-img_c
--- patches/patch-qemu-img_c    22 Dec 2006 17:31:45 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-qemu-img_c,v 1.2 2006/12/22 17:31:45 todd Exp $
---- qemu-img.c.orig    Sat Jul 22 13:23:34 2006
-+++ qemu-img.c Sun Nov 12 17:10:10 2006
-@@ -62,7 +62,7 @@ char *qemu_strdup(const char *str)
-     return ptr;
- }
- 
--void pstrcpy(char *buf, int buf_size, const char *str)
-+void pstrcpy(char *buf, size_t buf_size, const char *str)
- {
-     int c;
-     char *q = buf;
-@@ -80,7 +80,7 @@ void pstrcpy(char *buf, int buf_size, co
- }
- 
- /* strcat and truncate. */
--char *pstrcat(char *buf, int buf_size, const char *s)
-+char *pstrcat(char *buf, size_t buf_size, const char *s)
- {
-     int len;
-     len = strlen(buf);
Index: patches/patch-slirp_slirp_config_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-slirp_slirp_config_h,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-slirp_slirp_config_h
--- patches/patch-slirp_slirp_config_h  8 Jun 2006 14:33:38 -0000       1.3
+++ patches/patch-slirp_slirp_config_h  22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-slirp_slirp_config_h,v 1.3 2006/06/08 14:33:38 todd Exp $
---- slirp/slirp_config.h.orig  Wed May  3 15:32:58 2006
-+++ slirp/slirp_config.h       Fri May  5 22:07:41 2006
+$OpenBSD$
+--- slirp/slirp_config.h.orig  Mon Feb  5 17:01:54 2007
++++ slirp/slirp_config.h       Sat Mar 10 16:39:40 2007
 @@ -92,7 +92,7 @@
  #undef BAD_SPRINTF
  
Index: patches/patch-target-arm_cpu_h
===================================================================
RCS file: patches/patch-target-arm_cpu_h
diff -N patches/patch-target-arm_cpu_h
--- patches/patch-target-arm_cpu_h      8 Jun 2006 14:33:38 -0000       1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-target-arm_cpu_h,v 1.4 2006/06/08 14:33:38 todd Exp $
---- target-arm/cpu.h.orig      Wed May  3 15:32:58 2006
-+++ target-arm/cpu.h   Fri May  5 22:07:41 2006
-@@ -132,7 +132,7 @@ void switch_mode(CPUARMState *, int);
-    signal handlers to inform the virtual CPU of exceptions. non zero
-    is returned if the signal was handled by the virtual CPU.  */
- struct siginfo;
--int cpu_arm_signal_handler(int host_signum, struct siginfo *info, 
-+int cpu_arm_signal_handler(int host_signum, qemu_siginfo *info, 
-                            void *puc);
- 
- #define CPSR_M (0x1f)
Index: patches/patch-target-i386_cpu_h
===================================================================
RCS file: patches/patch-target-i386_cpu_h
diff -N patches/patch-target-i386_cpu_h
--- patches/patch-target-i386_cpu_h     8 Jun 2006 14:33:38 -0000       1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-target-i386_cpu_h,v 1.4 2006/06/08 14:33:38 todd Exp $
---- target-i386/cpu.h.orig     Wed May  3 15:32:58 2006
-+++ target-i386/cpu.h  Fri May  5 22:07:41 2006
-@@ -617,8 +617,7 @@ void cpu_x86_frstor(CPUX86State *s, uint
- /* you can call this signal handler from your SIGBUS and SIGSEGV
-    signal handlers to inform the virtual CPU of exceptions. non zero
-    is returned if the signal was handled by the virtual CPU.  */
--struct siginfo;
--int cpu_x86_signal_handler(int host_signum, struct siginfo *info, 
-+int cpu_x86_signal_handler(int host_signum, qemu_siginfo *info, 
-                            void *puc);
- void cpu_x86_set_a20(CPUX86State *env, int a20_state);
- 
Index: patches/patch-target-i386_helper2_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-target-i386_helper2_c,v
retrieving revision 1.4
diff -u -p -u -r1.4 patch-target-i386_helper2_c
--- patches/patch-target-i386_helper2_c 22 Dec 2006 17:31:45 -0000      1.4
+++ patches/patch-target-i386_helper2_c 22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-target-i386_helper2_c,v 1.4 2006/12/22 17:31:45 todd Exp $
---- target-i386/helper2.c.orig Sat Jul 22 13:23:34 2006
-+++ target-i386/helper2.c      Sun Nov 12 17:10:10 2006
+$OpenBSD$
+--- target-i386/helper2.c.orig Mon Feb  5 17:01:54 2007
++++ target-i386/helper2.c      Mon Mar 12 15:48:39 2007
 @@ -127,7 +127,7 @@ CPUX86State *cpu_x86_init(void)
                  env->cpuid_model[i >> 2] |= c << (8 * (i & 3));
              }
@@ -10,12 +10,12 @@ $OpenBSD: patch-target-i386_helper2_c,v 
          /* currently not enabled for std i386 because not fully tested */
          env->cpuid_ext2_features = (env->cpuid_features & 0x0183F3FF);
          env->cpuid_ext2_features |= CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | 
CPUID_EXT2_NX;
-@@ -135,7 +135,7 @@ CPUX86State *cpu_x86_init(void)
- 
-         /* these features are needed for Win64 and aren't fully implemented */
+@@ -137,7 +137,7 @@ CPUX86State *cpu_x86_init(void)
          env->cpuid_features |= CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA;
+         /* this feature is needed for Solaris and isn't fully implemented */
+         env->cpuid_features |= CPUID_PSE36;
 -#endif
-+/* #endif -- To run Mac OS X x86  */
++/* #endif -- To run Mac OS X x86 */
      }
      cpu_reset(env);
  #ifdef USE_KQEMU
Index: patches/patch-target-ppc_cpu_h
===================================================================
RCS file: patches/patch-target-ppc_cpu_h
diff -N patches/patch-target-ppc_cpu_h
--- patches/patch-target-ppc_cpu_h      27 Dec 2005 07:56:15 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-target-ppc_cpu_h,v 1.3 2005/12/27 07:56:15 todd Exp $
---- target-ppc/cpu.h.orig      Mon Dec 19 16:51:53 2005
-+++ target-ppc/cpu.h   Tue Dec 20 08:06:20 2005
-@@ -573,8 +573,7 @@ void cpu_ppc_close(CPUPPCState *s);
- /* you can call this signal handler from your SIGBUS and SIGSEGV
-    signal handlers to inform the virtual CPU of exceptions. non zero
-    is returned if the signal was handled by the virtual CPU.  */
--struct siginfo;
--int cpu_ppc_signal_handler(int host_signum, struct siginfo *info, 
-+int cpu_ppc_signal_handler(int host_signum, qemu_siginfo *info, 
-                            void *puc);
- 
- void do_interrupt (CPUPPCState *env);
Index: patches/patch-target-ppc_op_helper_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-target-ppc_op_helper_c,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-target-ppc_op_helper_c
--- patches/patch-target-ppc_op_helper_c        8 Jun 2006 14:33:38 -0000       
1.3
+++ patches/patch-target-ppc_op_helper_c        22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-target-ppc_op_helper_c,v 1.3 2006/06/08 14:33:38 todd Exp $
---- target-ppc/op_helper.c.orig        Fri May  5 22:29:25 2006
-+++ target-ppc/op_helper.c     Fri May  5 22:29:34 2006
+$OpenBSD$
+--- target-ppc/op_helper.c.orig        Mon Feb  5 17:01:54 2007
++++ target-ppc/op_helper.c     Sat Mar 10 16:39:41 2007
 @@ -17,6 +17,7 @@
   * License along with this library; if not, write to the Free Software
   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Index: patches/patch-target-sparc_cpu_h
===================================================================
RCS file: patches/patch-target-sparc_cpu_h
diff -N patches/patch-target-sparc_cpu_h
--- patches/patch-target-sparc_cpu_h    27 Dec 2005 07:56:15 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-target-sparc_cpu_h,v 1.3 2005/12/27 07:56:15 todd Exp $
---- target-sparc/cpu.h.orig    Mon Dec 19 16:51:53 2005
-+++ target-sparc/cpu.h Tue Dec 20 08:06:20 2005
-@@ -269,8 +269,12 @@ void cpu_set_cwp(CPUSPARCState *env1, in
-     } while (0)
- #endif
- 
-+#ifdef _BSD
-+int cpu_sparc_signal_handler(int hostsignum, qemu_siginfo *info, void *puc);
-+#else
- struct siginfo;
- int cpu_sparc_signal_handler(int hostsignum, struct siginfo *info, void *puc);
-+#endif
- 
- #include "cpu-all.h"
- 
Index: patches/patch-target-sparc_op_helper_c
===================================================================
RCS file: patches/patch-target-sparc_op_helper_c
diff -N patches/patch-target-sparc_op_helper_c
--- patches/patch-target-sparc_op_helper_c      19 Feb 2007 22:59:33 -0000      
1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-target-sparc_op_helper_c,v 1.3 2007/02/19 22:59:33 kili Exp $
---- target-sparc/op_helper.c.orig      Fri Jan  5 18:29:09 2007
-+++ target-sparc/op_helper.c   Fri Jan  5 18:29:28 2007
-@@ -12,12 +12,12 @@ void raise_exception(int tt)
- #ifdef USE_INT_TO_FLOAT_HELPERS
- void do_fitos(void)
- {
--    FT0 = int32_to_float32(*((int32_t *)&FT1));
-+    FT0 = int32_to_float32(*((int32_t *)&FT1), &env->fp_status);
- }
- 
- void do_fitod(void)
- {
--    DT0 = int32_to_float64(*((int32_t *)&FT1));
-+    DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
- }
- #endif
- 
Index: patches/patch-vl_c
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-vl_c,v
retrieving revision 1.13
diff -u -p -u -r1.13 patch-vl_c
--- patches/patch-vl_c  19 Feb 2007 12:43:38 -0000      1.13
+++ patches/patch-vl_c  22 Mar 2007 23:20:12 -0000
@@ -1,6 +1,7 @@
---- vl.c.orig  Sat Jul 22 19:23:34 2006
-+++ vl.c       Mon Feb 19 11:30:23 2007
-@@ -43,7 +43,8 @@
+$OpenBSD$
+--- vl.c.orig  Mon Feb  5 17:01:54 2007
++++ vl.c       Mon Mar 12 15:45:22 2007
+@@ -44,7 +44,8 @@
  #include <netdb.h>
  #ifdef _BSD
  #include <sys/stat.h>
@@ -10,37 +11,7 @@
  #include <libutil.h>
  #endif
  #else
-@@ -291,7 +292,7 @@ void isa_unassign_ioport(int start, int 
- 
- /***********************************************************/
- 
--void pstrcpy(char *buf, int buf_size, const char *str)
-+void pstrcpy(char *buf, size_t buf_size, const char *str)
- {
-     int c;
-     char *q = buf;
-@@ -309,7 +310,7 @@ void pstrcpy(char *buf, int buf_size, co
- }
- 
- /* strcat and truncate. */
--char *pstrcat(char *buf, int buf_size, const char *s)
-+char *pstrcat(char *buf, size_t buf_size, const char *s)
- {
-     int len;
-     len = strlen(buf);
-@@ -1408,6 +1409,11 @@ static void stdio_read(void *opaque)
-     uint8_t buf[1];
-     
-     size = read(0, buf, 1);
-+    if (size == 0) {
-+        /* stdin has been closed. Remove it from the active list.  */
-+        qemu_set_fd_handler2(0, NULL, NULL, NULL, NULL);
-+        return;
-+    }
-     if (size > 0)
-         stdio_received_byte(buf[0]);
- }
-@@ -2631,7 +2637,7 @@ static int parse_macaddr(uint8_t *macadd
+@@ -2808,7 +2809,7 @@ static int parse_macaddr(uint8_t *macadd
      return 0;
  }
  
@@ -49,7 +20,7 @@
  {
      const char *p, *p1;
      int len;
-@@ -3029,11 +3035,85 @@ static int tap_open(char *ifname, int if
+@@ -3226,11 +3227,85 @@ static int tap_open(char *ifname, int if
      char *dev;
      struct stat s;
  
@@ -135,7 +106,15 @@
  
      fstat(fd, &s);
      dev = devname(s.st_rdev, S_IFCHR);
-@@ -3279,7 +3359,7 @@ static int net_socket_mcast_create(struc
+@@ -3282,6 +3357,7 @@ static int net_tap_init(VLANState *vlan,
+     char *args[3];
+     char **parg;
+     char ifname[128];
++    bzero(&ifname,sizeof(ifname));
+ 
+     if (ifname1 != NULL)
+         pstrcpy(ifname, sizeof(ifname), ifname1);
+@@ -3476,7 +3552,7 @@ static int net_socket_mcast_create(struc
      /* Force mcast msgs to loopback (eg. several QEMUs in same host */
      val = 1;
      ret=setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, 
@@ -144,7 +123,7 @@
      if (ret < 0) {
        perror("setsockopt(SOL_IP, IP_MULTICAST_LOOP)");
        goto fail;
-@@ -3535,7 +3615,8 @@ static int net_socket_mcast_init(VLANSta
+@@ -3732,7 +3808,8 @@ static int net_socket_mcast_init(VLANSta
  
  }
  
@@ -154,31 +133,34 @@
                             const char *tag, const char *str)
  {
      const char *p;
-@@ -3660,17 +3741,21 @@ int net_client_init(const char *str)
+@@ -3856,6 +3933,8 @@ static int net_client_init(const char *s
+     if (!strcmp(device, "tap")) {
          char ifname[64];
          char setup_script[1024];
++      bzero(&ifname,sizeof(ifname));
++      bzero(&setup_script,sizeof(setup_script));
          int fd;
-+        bzero(&ifname,sizeof(ifname));
-+        bzero(&setup_script,sizeof(setup_script));
          if (get_param_value(buf, sizeof(buf), "fd", p) > 0) {
              fd = strtol(buf, NULL, 0);
-             ret = -1;
+@@ -3863,13 +3942,13 @@ static int net_client_init(const char *s
              if (net_tap_fd_init(vlan, fd))
                  ret = 0;
          } else {
--            get_param_value(ifname, sizeof(ifname), "ifname", p);
+-            if (get_param_value(ifname, sizeof(ifname), "ifname", p) <= 0) {
+-                ifname[0] = '\0';
+-            }
              if (get_param_value(setup_script, sizeof(setup_script), "script", 
p) == 0) {
                  pstrcpy(setup_script, sizeof(setup_script), 
DEFAULT_NETWORK_SCRIPT);
              }
 -            ret = net_tap_init(vlan, ifname, setup_script);
 +            if (get_param_value(ifname, sizeof(ifname), "ifname", p) == 0)
-+               ret = net_tap_init(vlan, NULL, setup_script);
-+            else
-+               ret = net_tap_init(vlan, ifname, setup_script);
++              ret = net_tap_init(vlan, NULL, setup_script);
++          else
++              ret = net_tap_init(vlan, NULL, setup_script);
          }
      } else
  #endif
-@@ -5671,7 +5756,7 @@ int main(int argc, char **argv)
+@@ -6587,7 +6666,7 @@ int main(int argc, char **argv)
          serial_devices[i][0] = '\0';
      serial_device_index = 0;
      
Index: patches/patch-vl_h
===================================================================
RCS file: /cvs/ports/emulators/qemu/patches/patch-vl_h,v
retrieving revision 1.6
diff -u -p -u -r1.6 patch-vl_h
--- patches/patch-vl_h  22 Dec 2006 17:31:45 -0000      1.6
+++ patches/patch-vl_h  22 Mar 2007 23:20:12 -0000
@@ -1,14 +1,14 @@
-$OpenBSD: patch-vl_h,v 1.6 2006/12/22 17:31:45 todd Exp $
---- vl.h.orig  Sat Jul 22 13:23:34 2006
-+++ vl.h       Sun Nov 12 17:10:10 2006
-@@ -104,8 +104,8 @@ void hw_error(const char *fmt, ...);
- 
- extern const char *bios_dir;
+$OpenBSD$
+--- vl.h.orig  Mon Feb  5 17:01:54 2007
++++ vl.h       Mon Mar 12 15:55:25 2007
+@@ -101,8 +101,8 @@ static inline char *realpath(const char 
+ #endif
  
+ /* cutils.c */
 -void pstrcpy(char *buf, int buf_size, const char *str);
 -char *pstrcat(char *buf, int buf_size, const char *s);
 +void pstrcpy(char *buf, size_t buf_size, const char *str);
 +char *pstrcat(char *buf, size_t buf_size, const char *s);
  int strstart(const char *str, const char *val, const char **ptr);
+ int stristart(const char *str, const char *val, const char **ptr);
  
- extern int vm_running;
Index: patches/patch-x_keymap_c
===================================================================
RCS file: patches/patch-x_keymap_c
diff -N patches/patch-x_keymap_c
--- patches/patch-x_keymap_c    11 Aug 2005 01:15:17 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,101 +0,0 @@
-$OpenBSD: patch-x_keymap_c,v 1.1 2005/08/11 01:15:17 todd Exp $
---- x_keymap.c.orig    Mon Apr 25 08:36:00 2005
-+++ x_keymap.c Mon Apr 25 08:36:00 2005
-@@ -0,0 +1,97 @@
-+/*
-+ * QEMU SDL display driver
-+ * 
-+ * Copyright (c) 2003 Fabrice Bellard
-+ * 
-+ * Permission is hereby granted, free of charge, to any person obtaining a 
copy
-+ * of this software and associated documentation files (the "Software"), to 
deal
-+ * in the Software without restriction, including without limitation the 
rights
-+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+ * copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
-+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-+ * THE SOFTWARE.
-+ */
-+
-+static const uint8_t x_keycode_to_pc_keycode[61] = {
-+   0xc7,      /*  97  Home   */
-+   0xc8,      /*  98  Up     */
-+   0xc9,      /*  99  PgUp   */
-+   0xcb,      /* 100  Left   */
-+   0x4c,        /* 101  KP-5   */
-+   0xcd,      /* 102  Right  */
-+   0xcf,      /* 103  End    */
-+   0xd0,      /* 104  Down   */
-+   0xd1,      /* 105  PgDn   */
-+   0xd2,      /* 106  Ins    */
-+   0xd3,      /* 107  Del    */
-+   0x9c,      /* 108  Enter  */
-+   0x9d,      /* 109  Ctrl-R */
-+   0x0,       /* 110  Pause  */
-+   0xb7,      /* 111  Print  */
-+   0xb5,      /* 112  Divide */
-+   0xb8,      /* 113  Alt-R  */
-+   0xc6,      /* 114  Break  */
-+   0x0,         /* 115 */
-+   0x0,         /* 116 */
-+   0x0,         /* 117 */
-+   0x0,         /* 118 */
-+   0x0,         /* 119 */
-+   0x70,         /* 120 Hiragana_Katakana */
-+   0x0,         /* 121 */
-+   0x0,         /* 122 */
-+   0x73,         /* 123 backslash */
-+   0x0,         /* 124 */
-+   0x0,         /* 125 */
-+   0x0,         /* 126 */
-+   0x0,         /* 127 */
-+   0x0,         /* 128 */
-+   0x79,         /* 129 Henkan */
-+   0x0,         /* 130 */
-+   0x7b,         /* 131 Muhenkan */
-+   0x0,         /* 132 */
-+   0x7d,         /* 133 Yen */
-+   0x0,         /* 134 */
-+   0x0,         /* 135 */
-+   0x47,         /* 136 KP_7 */
-+   0x48,         /* 137 KP_8 */
-+   0x49,         /* 138 KP_9 */
-+   0x4b,         /* 139 KP_4 */
-+   0x4c,         /* 140 KP_5 */
-+   0x4d,         /* 141 KP_6 */
-+   0x4f,         /* 142 KP_1 */
-+   0x50,         /* 143 KP_2 */
-+   0x51,         /* 144 KP_3 */
-+   0x52,         /* 145 KP_0 */
-+   0x53,         /* 146 KP_. */
-+   0x47,         /* 147 KP_HOME */
-+   0x48,         /* 148 KP_UP */
-+   0x49,         /* 149 KP_PgUp */
-+   0x4b,         /* 150 KP_Left */
-+   0x4c,         /* 151 KP_ */
-+   0x4d,         /* 152 KP_Right */
-+   0x4f,         /* 153 KP_End */
-+   0x50,         /* 154 KP_Down */
-+   0x51,         /* 155 KP_PgDn */
-+   0x52,         /* 156 KP_Ins */
-+   0x53,         /* 157 KP_Del */
-+};
-+
-+static uint8_t _native_scancode(const int key)
-+{
-+#if defined(_WIN32) && 0
-+      return key;
-+#else
-+      return x_keycode_to_pc_keycode[key];
-+#endif
-+}
-+
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/emulators/qemu/pkg/PLIST,v
retrieving revision 1.7
diff -u -p -u -r1.7 PLIST
--- pkg/PLIST   22 Dec 2006 17:31:45 -0000      1.7
+++ pkg/PLIST   22 Mar 2007 23:20:12 -0000
@@ -58,6 +58,9 @@ share/qemu/keymaps/tr
 share/qemu/linux_boot.bin
 share/qemu/openbios-sparc32
 share/qemu/ppc_rom.bin
+share/qemu/pxe-ne2k_pci.bin
+share/qemu/pxe-pcnet.bin
+share/qemu/pxe-rtl8139.bin
 share/qemu/vgabios-cirrus.bin
 share/qemu/vgabios.bin
 share/qemu/video.x

Reply via email to