Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2014 18:39:29 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r363222 - in head/emulators: aftp/files bsvc bsvc/files cpmemu/files darcnes/files gbe/files gxemul/files klh10/files qemu-devel/files qemu/files sim6811/files snes9x/files vice/files
Message-ID:  <201407281839.s6SIdTP0019720@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Mon Jul 28 18:39:29 2014
New Revision: 363222
URL: http://svnweb.freebsd.org/changeset/ports/363222
QAT: https://qat.redports.org/buildarchive/r363222/

Log:
  Rename emulators/ patch-xy patches to reflect the files they modify.

Added:
  head/emulators/aftp/files/patch-Makefile
     - copied unchanged from r363209, head/emulators/aftp/files/patch-aa
  head/emulators/aftp/files/patch-aftp.c
     - copied unchanged from r363209, head/emulators/aftp/files/patch-ab
  head/emulators/bsvc/files/patch-Tools__xtermpipe__xtermpipe.cxx_2
     - copied unchanged from r363209, head/emulators/bsvc/files/patch-ai
  head/emulators/bsvc/files/patch-UI__Makefile
     - copied unchanged from r363209, head/emulators/bsvc/files/patch-af
  head/emulators/bsvc/files/patch-sim68300__cpu__Makefile
     - copied unchanged from r363209, head/emulators/bsvc/files/patch-ag
  head/emulators/bsvc/files/patch-sim68360__cpu__Makefile
     - copied unchanged from r363209, head/emulators/bsvc/files/patch-ah
  head/emulators/cpmemu/files/patch-Makefile
     - copied unchanged from r363209, head/emulators/cpmemu/files/patch-ab
  head/emulators/cpmemu/files/patch-bios.c
     - copied unchanged from r363209, head/emulators/cpmemu/files/patch-ac
  head/emulators/cpmemu/files/patch-io.c
     - copied unchanged from r363209, head/emulators/cpmemu/files/patch-ad
  head/emulators/cpmemu/files/patch-low.c
     - copied unchanged from r363209, head/emulators/cpmemu/files/patch-ae
  head/emulators/darcnes/files/patch-Makefile
     - copied unchanged from r363209, head/emulators/darcnes/files/patch-ab
  head/emulators/darcnes/files/patch-snd_unix.c
     - copied unchanged from r363209, head/emulators/darcnes/files/patch-aa
  head/emulators/gbe/files/patch-Makefile
     - copied unchanged from r363209, head/emulators/gbe/files/patch-aa
  head/emulators/gbe/files/patch-vram.c
     - copied unchanged from r363209, head/emulators/gbe/files/patch-ab
  head/emulators/gxemul/files/patch-src_devices_dev_wdc.cc
     - copied unchanged from r363209, head/emulators/gxemul/files/patch-aa
  head/emulators/gxemul/files/patch-src_include_refcount_ptr.h
     - copied unchanged from r363209, head/emulators/gxemul/files/patch-ab
  head/emulators/klh10/files/patch-src_Mk-fbx86.mk
     - copied unchanged from r363209, head/emulators/klh10/files/patch-aa
  head/emulators/klh10/files/patch-src_vmtape.c
     - copied unchanged from r363209, head/emulators/klh10/files/patch-ab
  head/emulators/qemu-devel/files/patch-qemu-include-net-net.h
     - copied unchanged from r363209, head/emulators/qemu-devel/files/patch-bg
  head/emulators/qemu-devel/files/patch-qemu-slirp-slirp_config.h
     - copied unchanged from r363209, head/emulators/qemu-devel/files/patch-bf
  head/emulators/qemu/files/patch-qemu_Makefiles
     - copied unchanged from r363209, head/emulators/qemu/files/patch-bg
  head/emulators/qemu/files/patch-qemu_configure_1
     - copied unchanged from r363209, head/emulators/qemu/files/patch-ac
  head/emulators/qemu/files/patch-qemu_configure_2
     - copied unchanged from r363209, head/emulators/qemu/files/patch-bd
  head/emulators/qemu/files/patch-qemu_net.c
     - copied unchanged from r363209, head/emulators/qemu/files/patch-bt
  head/emulators/qemu/files/patch-qemu_slirp_slirp_config.h
     - copied unchanged from r363209, head/emulators/qemu/files/patch-bf
  head/emulators/sim6811/files/patch-main.c
     - copied unchanged from r363209, head/emulators/sim6811/files/patch-ac
  head/emulators/sim6811/files/patch-sim6811.1
     - copied unchanged from r363209, head/emulators/sim6811/files/patch-ab
  head/emulators/snes9x/files/patch-memmap.cpp
     - copied unchanged from r363209, head/emulators/snes9x/files/patch-ad
  head/emulators/snes9x/files/patch-port.h
     - copied unchanged from r363209, head/emulators/snes9x/files/patch-ae
  head/emulators/snes9x/files/patch-unix_unix.cpp
     - copied unchanged from r363209, head/emulators/snes9x/files/patch-af
  head/emulators/snes9x/files/patch-unix_xf86.cpp
     - copied unchanged from r363209, head/emulators/snes9x/files/patch-ag
  head/emulators/snes9x/files/patch-unzip_unzip.h
     - copied unchanged from r363209, head/emulators/snes9x/files/patch-ah
  head/emulators/vice/files/patch-man_c1541.1
     - copied unchanged from r363209, head/emulators/vice/files/patch-ab
  head/emulators/vice/files/patch-man_vice.1
     - copied unchanged from r363209, head/emulators/vice/files/patch-ac
Deleted:
  head/emulators/aftp/files/patch-aa
  head/emulators/aftp/files/patch-ab
  head/emulators/bsvc/files/patch-af
  head/emulators/bsvc/files/patch-ag
  head/emulators/bsvc/files/patch-ah
  head/emulators/bsvc/files/patch-ai
  head/emulators/cpmemu/files/patch-ab
  head/emulators/cpmemu/files/patch-ac
  head/emulators/cpmemu/files/patch-ad
  head/emulators/cpmemu/files/patch-ae
  head/emulators/darcnes/files/patch-aa
  head/emulators/darcnes/files/patch-ab
  head/emulators/gbe/files/patch-aa
  head/emulators/gbe/files/patch-ab
  head/emulators/gxemul/files/patch-aa
  head/emulators/gxemul/files/patch-ab
  head/emulators/klh10/files/patch-aa
  head/emulators/klh10/files/patch-ab
  head/emulators/qemu-devel/files/patch-bf
  head/emulators/qemu-devel/files/patch-bg
  head/emulators/qemu/files/patch-ac
  head/emulators/qemu/files/patch-bd
  head/emulators/qemu/files/patch-bf
  head/emulators/qemu/files/patch-bg
  head/emulators/qemu/files/patch-bt
  head/emulators/sim6811/files/patch-ab
  head/emulators/sim6811/files/patch-ac
  head/emulators/snes9x/files/patch-ad
  head/emulators/snes9x/files/patch-ae
  head/emulators/snes9x/files/patch-af
  head/emulators/snes9x/files/patch-ag
  head/emulators/snes9x/files/patch-ah
  head/emulators/vice/files/patch-ab
  head/emulators/vice/files/patch-ac
Modified:
  head/emulators/bsvc/Makefile

Copied: head/emulators/aftp/files/patch-Makefile (from r363209, head/emulators/aftp/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/aftp/files/patch-Makefile	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/aftp/files/patch-aa)
@@ -0,0 +1,37 @@
+*** Makefile.orig	Tue Jan  7 04:58:59 1997
+--- Makefile	Sun May 18 01:48:32 1997
+***************
+*** 1,11 ****
+  
+! OBJS=aftp.o pro.o dos.o
+  
+  aftp: $(OBJS)
+! 	gcc -o aftp $(OBJS)
+  
+  .c.o:
+! 	gcc -c $<
+  
+  clean:
+  	rm -f $(OBJS) aftp
+--- 1,23 ----
++ # AFTP Version 1.0
++ # Makefile updated 20th Jan, 1996
+  
+! OBJS=		aftp.o pro.o dos.o
+! #CC_OPTS=	-DDIRECTORY_COMMANDS
+! CC=		gcc ${CC_OPTS}
+! PREFIX?=		/usr/local
+! 
+! all:	aftp
+  
+  aftp: $(OBJS)
+! 	${CC} -o aftp $(OBJS)
+  
+  .c.o:
+! 	${CC} -c ${CFLAGS} $<
+! 
+! install: all
+! 	${BSD_INSTALL_PROGRAM} aftp ${DESTDIR}${PREFIX}/bin
+  
+  clean:
+  	rm -f $(OBJS) aftp

Copied: head/emulators/aftp/files/patch-aftp.c (from r363209, head/emulators/aftp/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/aftp/files/patch-aftp.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/aftp/files/patch-ab)
@@ -0,0 +1,108 @@
+diff -rc aftp/aftp.c aftp-1.01a/aftp.c
+*** aftp.c	Mon Jan  6 22:19:13 1997
+--- aftp.c	Tue Jan 21 00:49:56 1997
+***************
+*** 283,299 ****
+  
+  static	void	print_help(void)
+  {
+! 	printf("Command:\n");
+! 	printf("  aftp [options] {input_disk_files}\n");
+  	printf("Options:\n");
+  	printf("  -p  use a (P)rodos filesystem.\n");
+  	printf("  -o  use a prodos (O)rdered image.\n");
+  	printf("  -i  use an xgs image file.\n");
+! 	printf("  -d  Load images as read-only.\n");
+  	printf("  -?  Display aftp help.\n");
+- 	printf("Summary:\n");
+- 	printf("  Ftp like interface to dsk, do, po, and img files.\n");
+- 	printf("  Defaults to Dos 3.3 filesystem on a dsk disk.\n");
+  	exit(1);
+  }
+  
+--- 283,296 ----
+  
+  static	void	print_help(void)
+  {
+! 	printf("useage:\n");
+! 	printf("  aftp [options] <input_disk_files>\n");
+  	printf("Options:\n");
+  	printf("  -p  use a (P)rodos filesystem.\n");
+  	printf("  -o  use a prodos (O)rdered image.\n");
+  	printf("  -i  use an xgs image file.\n");
+! 	printf("  -r  Load images as read-only.\n");
+  	printf("  -?  Display aftp help.\n");
+  	exit(1);
+  }
+  
+***************
+*** 327,332 ****
+--- 324,330 ----
+  				read_only = !read_only;
+  				break;
+  			case '?':
++ 			case 'h':
+  				print_help();
+  				break;
+  			default:
+***************
+*** 373,378 ****
+--- 371,377 ----
+  					;
+  				*p = '\0';
+  				system(cmd + 1);
++ 				printf("\n") ;
+  				continue;
+  			}
+  			for (; *p && !isspace(*p); p++)
+***************
+*** 386,392 ****
+  			*p = '\0';
+  			if (!*cmd)
+  				continue;
+! 			if (!strcmp(cmd, "dir"))
+  			{
+  				strcpy(remot, arg);
+  				(*d->os->name)(remot, sizeof(remot));
+--- 385,391 ----
+  			*p = '\0';
+  			if (!*cmd)
+  				continue;
+! 			if (!strcmp(cmd, "dir") || !strcmp(cmd, "ls"))
+  			{
+  				strcpy(remot, arg);
+  				(*d->os->name)(remot, sizeof(remot));
+***************
+*** 503,508 ****
+--- 502,508 ----
+  			else if (!strcmp(cmd, "help") || !strcmp(cmd, "?"))
+  			{
+  				printf("dir           Display disk image directory.\n");
++ 				printf("ls            Alias for the dir command.\n");
+  				printf("get [file]    Get a file from disk image.\n");
+  				printf("put [file]    Put a file on disk image.\n");
+  				printf("del [file]    Delete a file from disk image.\n");
+***************
+*** 511,520 ****
+  				printf("mkdir [dir]   Create a disk image directory.\n");
+  				printf("rmdir [dir]   Remove a disk image directory.\n");
+  			#endif
+  				printf("text          Set text mode.\n");
+  				printf("binary        Set binary mode.\n");
+  				printf("help          Display help.\n");
+! 				printf("!dos command  Execute a dos command.\n");
+  				printf("quit          Quit Program.\n");
+  			}
+  			else
+--- 511,521 ----
+  				printf("mkdir [dir]   Create a disk image directory.\n");
+  				printf("rmdir [dir]   Remove a disk image directory.\n");
+  			#endif
++ 				printf("dump          Display a hex dump of the disk image.\n") ;
+  				printf("text          Set text mode.\n");
+  				printf("binary        Set binary mode.\n");
+  				printf("help          Display help.\n");
+! 				printf("!command      Shell escape.\n");
+  				printf("quit          Quit Program.\n");
+  			}
+  			else

Modified: head/emulators/bsvc/Makefile
==============================================================================
--- head/emulators/bsvc/Makefile	Mon Jul 28 18:38:13 2014	(r363221)
+++ head/emulators/bsvc/Makefile	Mon Jul 28 18:39:29 2014	(r363222)
@@ -15,7 +15,7 @@ COMMENT=	Extensible hardware simulation 
 WRKSRC=		${WRKDIR}/${DISTNAME}/src
 MAKE_ENV=	PROJECT_BASE=${STAGEDIR}${PREFIX} WRKSRC=${WRKSRC} WISH=${WISH}
 
-USES+=		tk
+USES=		tk
 MAKE_JOBS_UNSAFE=	yes
 
 pre-patch:

Copied: head/emulators/bsvc/files/patch-Tools__xtermpipe__xtermpipe.cxx_2 (from r363209, head/emulators/bsvc/files/patch-ai)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/bsvc/files/patch-Tools__xtermpipe__xtermpipe.cxx_2	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/bsvc/files/patch-ai)
@@ -0,0 +1,11 @@
+--- Tools/xtermpipe/xtermpipe.cxx.orig	Mon Nov  9 12:39:28 1998
++++ Tools/xtermpipe/xtermpipe.cxx	Sat Feb 12 11:02:02 2000
+@@ -31,7 +31,7 @@
+     select(pipe_id + 1, (int*)&readfds, (int*)&writefds, (int*)&exceptfds,
+            (void*)0);
+ # else
+-    select(pipe_id + 1, &readfds, &writefds, &exceptfds, (void*)0);
++    select(pipe_id + 1, &readfds, &writefds, &exceptfds, (struct timeval*)0);
+ # endif
+ 
+   if(FD_ISSET(0, &readfds))

Copied: head/emulators/bsvc/files/patch-UI__Makefile (from r363209, head/emulators/bsvc/files/patch-af)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/bsvc/files/patch-UI__Makefile	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/bsvc/files/patch-af)
@@ -0,0 +1,48 @@
+--- UI/Makefile.orig	1998-11-09 04:39:29.000000000 +0100
++++ UI/Makefile	2013-11-05 17:30:19.000000000 +0100
+@@ -20,31 +20,31 @@
+ 	echo '# export TCL_LIBRARY TK_LIBRARY' >> bsvc
+ 	echo 'ARGS=$$*' >> bsvc
+ 	echo 'export ARGS' >> bsvc
+-	echo 'exec $(WISH) -f $(INSTALL_DIR)/UI/bsvc.tk' >> bsvc
++	echo 'exec $(WISH) -f $(PREFIX)/lib/bsvc/bsvc.tk' >> bsvc
+ 	chmod +x bsvc
+ 
+ bsvc.tk: Makefile
+ 	echo '#!$(WISH) -f' > bsvc.tk
+-	echo 'set Program(InstallDir) $(INSTALL_DIR)' >> bsvc.tk
+-	echo 'set Program(BitmapDir) $$Program(InstallDir)/UI/bitmaps' >> bsvc.tk
+-	echo 'set Program(HelpDir) $$Program(InstallDir)/UI/help' >> bsvc.tk
+-	echo 'set Program(LibDir) $$Program(InstallDir)/UI' >> bsvc.tk
++	echo 'set Program(InstallDir) $(PREFIX)' >> bsvc.tk
++	echo 'set Program(BitmapDir) $(PREFIX)/lib/bsvc/bitmaps' >> bsvc.tk
++	echo 'set Program(HelpDir) $(PREFIX)/lib/bsvc/help' >> bsvc.tk
++	echo 'set Program(LibDir) $(PREFIX)/lib/bsvc' >> bsvc.tk
+ 	echo 'set Program(WWWBrowser) "$(WWW_BROWSER)"' >> bsvc.tk
+ 	echo 'set Program(WWWHomePage) "$(WWW_HOME_PAGE)"' >> bsvc.tk
+ 	echo 'set Program(StopIndicator) C:\\BSVC\\bin\\STOP' >> bsvc.tk
+ 	echo 'if {$$tcl_version >= 7.5 && $$tcl_platform(platform) == "windows"} {' >> bsvc.tk
+-	echo '  option readfile $$Program(InstallDir)/UI/bsvc.win 40' >> bsvc.tk
++	echo '  option readfile $(PREFIX)/lib/bsvc/bsvc.win 40' >> bsvc.tk
+ 	echo '} else {' >> bsvc.tk
+-	echo '  option readfile $$Program(InstallDir)/UI/bsvc.ad 40' >> bsvc.tk
++	echo '  option readfile $(PREFIX)/lib/bsvc/bsvc.ad 40' >> bsvc.tk
+ 	echo '}' >> bsvc.tk
+-	echo 'source $$Program(InstallDir)/UI/main.tk' >> bsvc.tk
++	echo 'source $(PREFIX)/lib/bsvc/main.tk' >> bsvc.tk
+ 
+ install: bsvc bsvc.tk
+-	$(MKDIR) $(INSTALL_DIR)/UI
+-	$(MKDIR) $(INSTALL_DIR)/UI/bitmaps
+-	$(MKDIR) $(INSTALL_DIR)/UI/help
+-	$(INSTALL) *.tk *.ad $(INSTALL_DIR)/UI
+-	$(INSTALL) bitmaps/* $(INSTALL_DIR)/UI/bitmaps
+-	$(INSTALL) help/* $(INSTALL_DIR)/UI/help
++	$(MKDIR) $(PROJECT_BASE)/lib/bsvc
++	$(MKDIR) $(PROJECT_BASE)/lib/bsvc/bitmaps
++	$(MKDIR) $(PROJECT_BASE)/lib/bsvc/help
++	$(INSTALL) *.tk *.ad $(PROJECT_BASE)/lib/bsvc
++	$(INSTALL) bitmaps/* $(PROJECT_BASE)/lib/bsvc/bitmaps
++	$(INSTALL) help/* $(PROJECT_BASE)/lib/bsvc/help
+ 	$(INSTALL) bsvc $(INSTALL_DIR)
+ 

Copied: head/emulators/bsvc/files/patch-sim68300__cpu__Makefile (from r363209, head/emulators/bsvc/files/patch-ag)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/bsvc/files/patch-sim68300__cpu__Makefile	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/bsvc/files/patch-ag)
@@ -0,0 +1,11 @@
+--- sim68000/cpu/Makefile.orig	Mon Sep  6 21:46:13 1999
++++ sim68000/cpu/Makefile	Mon Sep  6 21:46:36 1999
+@@ -28,7 +28,7 @@
+ 	$(CC) $(INCLUDES) -o instruction instruction.c
+ 
+ m68000DecodeTable.hxx: instruction instruction.list
+-	$(PROJECT_BASE)/src/sim68000/cpu/instruction  
++	$(WRKSRC)/sim68000/cpu/instruction  
+ 
+ clean:
+ 	rm -f *.o $(LIBRARY) instruction

Copied: head/emulators/bsvc/files/patch-sim68360__cpu__Makefile (from r363209, head/emulators/bsvc/files/patch-ah)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/bsvc/files/patch-sim68360__cpu__Makefile	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/bsvc/files/patch-ah)
@@ -0,0 +1,11 @@
+--- sim68360/cpu/Makefile.orig	Mon Sep  6 21:47:20 1999
++++ sim68360/cpu/Makefile	Mon Sep  6 21:47:39 1999
+@@ -31,7 +31,7 @@
+ 	$(CC) $(INCLUDES) -o instruction instruction.c
+ 
+ cpu32DecodeTable.hxx: instruction instruction.list
+-	$(PROJECT_BASE)/src/sim68360/cpu/instruction  
++	$(WRKSRC)/sim68360/cpu/instruction  
+ 
+ clean:
+ 	rm -f *.o $(LIBRARY) instruction

Copied: head/emulators/cpmemu/files/patch-Makefile (from r363209, head/emulators/cpmemu/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/cpmemu/files/patch-Makefile	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/cpmemu/files/patch-ab)
@@ -0,0 +1,53 @@
+--- Makefile.orig	Mon Nov 15 06:49:52 1999
++++ Makefile	Mon Nov 15 06:54:21 1999
+@@ -2,26 +2,26 @@
+ 
+ 
+ # basic prefix for installation
+-PREFIX = /usr/local
++PREFIX ?= /usr/local
+ 
+ # where to install `cpm' executable.
+ BINDIR = $(PREFIX)/bin
+ 
+ # where `cpm' looks for its files (cpm.sys and .com files).
+-CPMLIBDIR = $(PREFIX)/lib/cpm
++CPMLIBDIR = $(PREFIX)/share/cpm
+ 
+ 
+ # You shouldn't need to edit below this line.
+ 
+-CC = gcc
++CC ?= gcc
+ 
+-CFLAGS = -O2 -pipe -ansi -Wall \
++CFLAGS += $(CPPFLAGS) -ansi -Wall \
+ 	-Wshadow -Wpointer-arith -Wcast-qual -Wcast-align \
+ 	-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \
+ 	-Wnested-externs -Wwrite-strings \
+ 	-DCPMLIBDIR=\"$(CPMLIBDIR)\"
+ 
+-LDFLAGS = -s
++#LDFLAGS = -s
+ 
+ OBJS = single.o z80emu.o em.o io.o bios.o \
+ 	commands.o running.o main.o disneu.o disz80.o low.o
+@@ -42,11 +42,14 @@
+ cpm: $(OBJS)
+ 	$(CC) $(LDFLAGS) -o cpm $(OBJS)
+ 
++format: format.o
++	$(CC) $(LDFLAGS) -o format format.o
++
+ clean:
+ 	rm -f *~ loads.s makeloads *.o $(TARGETS)
+ 
+ install: all
+-	install -m 511 cpm $(BINDIR)
+-	-mkdir $(CPMLIBDIR)
+-	chmod 755 $(CPMLIBDIR)
+-	install -m 444 z80-binaries/* $(CPMLIBDIR)
++	${BSD_INSTALL_PROGRAM} cpm $(DESTDIR)$(BINDIR)/cpmemu
++	${BSD_INSTALL_PROGRAM} format $(DESTDIR)$(BINDIR)/cpmformat
++	-mkdir $(DESTDIR)$(CPMLIBDIR)
++	${BSD_INSTALL_DATA} z80-binaries/* $(DESTDIR)$(CPMLIBDIR)

Copied: head/emulators/cpmemu/files/patch-bios.c (from r363209, head/emulators/cpmemu/files/patch-ac)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/cpmemu/files/patch-bios.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/cpmemu/files/patch-ac)
@@ -0,0 +1,11 @@
+--- bios.c.orig	Mon Nov 15 06:33:54 1999
++++ bios.c	Mon Nov 15 06:39:55 1999
+@@ -227,7 +227,7 @@
+ 	case BIOS:      /* System Reset (coldboot) */
+ 	case DIRBUF-20:
+ 	    if (!silent_exit)
+-		printf("\nCp/M BIOS COLDBOOT takes you back to Linux\n");
++		printf("\nCp/M BIOS COLDBOOT takes you back to FreeBSD\n");
+ 	    exit(0);
+ 	case BIOS+3:    /* System Reset (warmboot) */
+ 	case DIRBUF-19:

Copied: head/emulators/cpmemu/files/patch-io.c (from r363209, head/emulators/cpmemu/files/patch-ad)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/cpmemu/files/patch-io.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/cpmemu/files/patch-ad)
@@ -0,0 +1,11 @@
+--- io.c.orig	Wed Jun 22 03:25:46 1994
++++ io.c	Mon Nov 15 06:31:36 1999
+@@ -13,7 +13,7 @@
+ /*****************************************************************************/
+ #include "cpmemu.h"
+ 
+-#define HAVE_RAW_IO
++#undef HAVE_RAW_IO
+ 
+ /* magic for character I/O */
+ #include <unistd.h>

Copied: head/emulators/cpmemu/files/patch-low.c (from r363209, head/emulators/cpmemu/files/patch-ae)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/cpmemu/files/patch-low.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/cpmemu/files/patch-ae)
@@ -0,0 +1,26 @@
+--- low.c.orig	Wed Dec 11 22:44:43 2002
++++ low.c	Wed Dec 11 22:44:56 2002
+@@ -18,11 +18,10 @@
+  * space-invaders-type game working, I think it was. :-)	-rjm
+  */
+ 
++#include <sys/types.h>
+ #include "cpmemu.h"
+ #include <ctype.h>
+ #include <unistd.h>
+-#include <sys/perm.h>		/* needed for ioperm() -rjm */
+-#include <sys/types.h>
+ #include <sys/time.h>
+ #include <signal.h>
+ #include <sys/mman.h>
+@@ -88,10 +87,8 @@
+ 
+     /* get access to sound port */
+     cptr = NULL;
+-    if (ioperm(0x61, 1, 1)) {
+ 	hardware_access = 0;	/* no access to speaker port */
+ 	return;
+-    }
+ 
+     /* install signal handler */
+     sa.sa_handler = tickerint;

Copied: head/emulators/darcnes/files/patch-Makefile (from r363209, head/emulators/darcnes/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/darcnes/files/patch-Makefile	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/darcnes/files/patch-ab)
@@ -0,0 +1,51 @@
+--- Makefile.orig	2001-03-28 02:51:41.000000000 +0200
++++ Makefile	2008-04-01 16:53:11.000000000 +0200
+@@ -11,16 +11,16 @@
+ 
+ #C_ONLY=-DC_ONLY
+ 
+-MACH_TYPES=-DMACH_TYPES=\"types-i386.h\"
++#MACH_TYPES=-DMACH_TYPES=\"types-i386.h\"
+ 
+ #BYTE_ORDER=-DMSB_FIRST
+-BYTE_ORDER=-DLSB_FIRST
++#BYTE_ORDER=-DLSB_FIRST
+ 
+-DEBUG=-g
++#DEBUG=-g
+ 
+-OPTFLAGS=-O2 -fomit-frame-pointer
++#OPTFLAGS=-O2 -fomit-frame-pointer
+ 
+-BASE_CFLAGS=-Wall $(DEBUG) $(OPTFLAGS) $(C_ONLY) $(BYTE_ORDER) $(MACH_TYPES)
++BASE_CFLAGS=-Wall $(DEBUG) $(OPTFLAGS) $(C_ONLY) $(MACH_TYPES)
+ BASE_SFLAGS=-Wall $(DEBUG) $(OPTFLAGS)
+ BASE_LDFLAGS=
+ 
+@@ -33,8 +33,12 @@
+ #
+ ifeq ($(TARGET),Linux_svgalib)
+ CONFFLAGS=-DPCE_CD_SUPPORT -DSOUND
++LOCALBASE?=/usr/local
++LDFLAGS+=-L${LOCALBASE}/lib
++CFLAGS+=-I${LOCALBASE}/include
++SFLAGS+=-I${LOCALBASE}/include
+ SYSTEMSRCS=video_svga.c ui_svga.c snd_unix.c cd_unix.c
+-BINFILE=sdarcnes
++BINFILE=darcnes
+ LIBS=-lvgagl -lvga
+ endif
+ 
+@@ -43,9 +47,9 @@
+ #
+ ifeq ($(TARGET),Linux_X)
+ CONFFLAGS=-DPCE_CD_SUPPORT -DSOUND
+-LDFLAGS+=-L/usr/X11R6/lib
+-CFLAGS+=-I/usr/X11R6/include
+-SFLAGS+=-I/usr/X11R6/include
++LDFLAGS+=-L${LOCALBASE}/lib
++CFLAGS+=-I${LOCALBASE}/include
++SFLAGS+=-I${LOCALBASE}/include
+ SYSTEMSRCS=video_x.c ui_x.c snd_unix.c keyboard_x.c cd_unix.c
+ BINFILE=darcnes
+ LIBS=-lXext -lXaw -lXmu -lXt -lX11

Copied: head/emulators/darcnes/files/patch-snd_unix.c (from r363209, head/emulators/darcnes/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/darcnes/files/patch-snd_unix.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/darcnes/files/patch-aa)
@@ -0,0 +1,11 @@
+--- snd_unix.c.orig	Wed Oct 23 20:11:53 2002
++++ snd_unix.c	Wed Oct 23 20:12:07 2002
+@@ -23,7 +23,7 @@
+ #endif
+ 
+ #ifdef SYSTEM_FREEBSD
+-#include <machine/soundcard.h>
++#include <sys/soundcard.h>
+ #define SOUND_DEVICE "/dev/dsp"
+ #endif
+ 

Copied: head/emulators/gbe/files/patch-Makefile (from r363209, head/emulators/gbe/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gbe/files/patch-Makefile	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/gbe/files/patch-aa)
@@ -0,0 +1,58 @@
+--- Makefile.orig	Mon Sep 27 00:29:10 1999
++++ Makefile	Sun Jul  6 19:34:42 2003
+@@ -1,42 +1,42 @@
+-LFLAGS = -L/usr/X11R6/lib -lX11 -g3 -lreadline -lncurses -lvga 
+-CFLAGS = -O6 -DBUILD_SVGA -DBUILD_X11 -DBUILD_JLIB -DCPU_DEBUG  -g3 -ffast-math -fomit-frame-pointer -finline-functions #-DNOT_LINEBASED #-DCPU_DEBUG_EXTENDED 
++LFLAGS = -lX11 -g3 $(LDFLAGS)
++CFLAGS += ${CPPFLAGS} -DBUILD_X11 -g3 #-DNOT_LINEBASED #-DCPU_DEBUG_EXTENDED
+ OBJS = main.o rom.o mem.o cpu.o vram.o debug.o joypad.o jlib.o x11.o svga.o
+ BIN = gbe
+ 
+ all: $(BIN)
+ 
+ $(BIN): $(OBJS)
+-	gcc $(CFLAGS) -o $(BIN) $(OBJS) $(LFLAGS)
++	$(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LFLAGS)
+ 
+ main.o: main.c rom.h mem.h data.h vram.h 
+-	gcc $(CFLAGS) -o main.o -c main.c
++	$(CC) $(CFLAGS) -o main.o -c main.c
+ 
+ rom.o: rom.c rom.h mem.h
+-	gcc $(CFLAGS) -o rom.o -c rom.c
++	$(CC) $(CFLAGS) -o rom.o -c rom.c
+ 
+ mem.o: mem.c mem.h regs.h
+-	gcc $(CFLAGS) -o mem.o -c mem.c
++	$(CC) $(CFLAGS) -o mem.o -c mem.c
+ 
+ cpu.o: cpu.c cpu.h mem.h data.h
+-	gcc $(CFLAGS) -o cpu.o -c cpu.c
++	$(CC) $(CFLAGS) -o cpu.o -c cpu.c
+ 
+ vram.o: vram.c vram.h x11.h mem.h regs.h
+-	gcc $(CFLAGS) -o vram.o -c vram.c
++	$(CC) $(CFLAGS) -o vram.o -c vram.c
+ 
+ debug.o: debug.c debug.h
+-	gcc $(CFLAGS) -o debug.o -c debug.c
++	$(CC) $(CFLAGS) -o debug.o -c debug.c
+ 
+ joypad.o: joypad.c joypad.c jlib.h
+-	gcc $(CFLAGS) -o joypad.o -c joypad.c
++	$(CC) $(CFLAGS) -o joypad.o -c joypad.c
+ 
+ jlib.o: jlib.c jlib.h
+-	gcc $(CFLAGS) -o jlib.o -c jlib.c
++	$(CC) $(CFLAGS) -o jlib.o -c jlib.c
+ 
+ x11.o: x11.c x11.h
+-	gcc $(CFLAGS) -o x11.o -c x11.c
++	$(CC) $(CFLAGS) -o x11.o -c x11.c
+ 
+ svga.o: svga.c svga.h
+-	gcc $(CFLAGS) -o svga.o -c svga.c
++	$(CC) $(CFLAGS) -o svga.o -c svga.c
+ 
+ clean:
+ 	rm -f $(BIN) $(OBJS) *~ core vram.dump

Copied: head/emulators/gbe/files/patch-vram.c (from r363209, head/emulators/gbe/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gbe/files/patch-vram.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/gbe/files/patch-ab)
@@ -0,0 +1,10 @@
+--- vram.c.orig	Mon Apr 16 22:12:03 2001
++++ vram.c	Mon Apr 16 22:12:08 2001
+@@ -31,7 +31,6 @@
+ #include "cpu.h"
+ #include "data.h"
+ #include "x11.h"
+-#include "svga.h"
+ #include "win32.h"
+ #include "joypad.h"
+ 

Copied: head/emulators/gxemul/files/patch-src_devices_dev_wdc.cc (from r363209, head/emulators/gxemul/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gxemul/files/patch-src_devices_dev_wdc.cc	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/gxemul/files/patch-aa)
@@ -0,0 +1,32 @@
+--- src/devices/dev_wdc.cc.orig	2013-06-27 18:10:50.000000000 -0700
++++ src/devices/dev_wdc.cc	2013-06-27 18:11:13.000000000 -0700
+@@ -274,12 +274,12 @@
+ 	    + (int64_t)d->head * d->sectors_per_track[d->drive] +
+ 	    (int64_t)d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);
+ 
+-#if 0
++#if 1
+ 	/*  LBA:  */
+ 	if (d->lba)
+ 		offset = 512 * (((d->head & 0xf) << 24) + (cyl << 8)
+ 		    + d->sector);
+-	printf("WDC read from offset %lli\n", (long long)offset);
++	debug("WDC read from offset %lli\n", (long long)offset);
+ #endif
+ 
+ 	while (count > 0) {
+@@ -320,12 +320,12 @@
+ 	uint64_t offset = 512 * (d->sector - 1
+ 	    + (int64_t)d->head * d->sectors_per_track[d->drive] +
+ 	    (int64_t)d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);
+-#if 0
++#if 1
+ 	/*  LBA:  */
+ 	if (d->lba)
+ 		offset = 512 * (((d->head & 0xf) << 24) +
+ 		    (cyl << 8) + d->sector);
+-	printf("WDC write to offset %lli\n", (long long)offset);
++	debug("WDC write to offset %lli\n", (long long)offset);
+ #endif
+ 
+ 	d->write_in_progress = d->cur_command;

Copied: head/emulators/gxemul/files/patch-src_include_refcount_ptr.h (from r363209, head/emulators/gxemul/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gxemul/files/patch-src_include_refcount_ptr.h	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/gxemul/files/patch-ab)
@@ -0,0 +1,11 @@
+--- src/include/refcount_ptr.h	2010-02-14 02:33:54.000000000 -0700
++++ src/include/refcount_ptr.h	2014-02-24 03:48:14.000000000 -0700
+@@ -28,6 +28,8 @@
+  *  SUCH DAMAGE.
+  */
+ 
++#include <stddef.h>
++
+ /**
+  * \brief Base class for reference countable objects.
+  *

Copied: head/emulators/klh10/files/patch-src_Mk-fbx86.mk (from r363209, head/emulators/klh10/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/klh10/files/patch-src_Mk-fbx86.mk	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/klh10/files/patch-aa)
@@ -0,0 +1,12 @@
+--- src/Mk-fbx86.mk.DIST  Sat Jan 12 15:40:10 2002
++++ src/Mk-fbx86.mk       Sat Jan 12 15:40:55 2002
+@@ -21,7 +21,7 @@
+ 
+ # Build definitions
+ SRC = ../../src
+-CFLAGS = -c -g3 -O -I. -I$(SRC)
++CFLAGS += -c -I. -I$(SRC)
+ CFLAGS_LINT = -ansi -pedantic -Wall -Wshadow \
+                -Wstrict-prototypes -Wmissing-prototypes \
+                -Wmissing-declarations -Wredundant-decls
+

Copied: head/emulators/klh10/files/patch-src_vmtape.c (from r363209, head/emulators/klh10/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/klh10/files/patch-src_vmtape.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/klh10/files/patch-ab)
@@ -0,0 +1,25 @@
+--- src/vmtape.c	2002/01/12 16:47:42	1.1
++++ src/vmtape.c	2002/01/12 16:48:35
+@@ -696,13 +696,11 @@
+ 
+     /* Now verify filenames don't already exist */
+     if (cfn && (cf = fopen(cfn, "r"))) {
+-	fclose(cf);
+ 	vmterror(t, "Tape control file \"%.256s\" already exists", cfn);
+ 	goto badret;
+     }
+ 
+     if (df = fopen(dfn, "rb")) {
+-	fclose(df);
+ 	vmterror(t, "Tape data file \"%.256s\" already exists", dfn);
+ 	goto badret;
+     }
+@@ -714,8 +712,6 @@
+ 	goto badret;
+     }
+     if (!(df = fopen(dfn, "w+b"))) {
+-	fclose(df);
+-	if (cfn) fclose(cf);
+ 	vmterror(t, "Cannot create tape data file \"%.256s\": %.80s",
+ 		 dfn, os_strerror(errno));
+ 	goto badret;

Copied: head/emulators/qemu-devel/files/patch-qemu-include-net-net.h (from r363209, head/emulators/qemu-devel/files/patch-bg)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu-devel/files/patch-qemu-include-net-net.h	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/qemu-devel/files/patch-bg)
@@ -0,0 +1,24 @@
+Index: qemu/include/net/net.h
+@@ -174,8 +174,8 @@ void net_host_device_remove(Monitor *mon
+ int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
+ int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
+ 
+-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
+-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
++#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup"
++#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown"
+ #define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
+ #define DEFAULT_BRIDGE_INTERFACE "br0"
+ 
+Index: qemu/net/tap_int.h
+@@ -29,8 +29,8 @@
+ #include "qemu-common.h"
+ #include "qemu-option.h"
+ 
+-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
+-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
++#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup"
++#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown"
+ 
+ int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan);
+ 

Copied: head/emulators/qemu-devel/files/patch-qemu-slirp-slirp_config.h (from r363209, head/emulators/qemu-devel/files/patch-bf)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu-devel/files/patch-qemu-slirp-slirp_config.h	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/qemu-devel/files/patch-bf)
@@ -0,0 +1,37 @@
+Index: qemu/slirp/slirp_config.h
+@@ -86,7 +86,7 @@
+ #undef BAD_SPRINTF
+ 
+ /* Define if you have readv */
+-#undef HAVE_READV
++#define HAVE_READV
+ 
+ /* Define if iovec needs to be declared */
+ #undef DECLARE_IOVEC
+@@ -95,7 +95,7 @@
+ #undef DECLARE_SPRINTF
+ 
+ /* Define if you have a POSIX.1 sys/wait.h */
+-#undef HAVE_SYS_WAIT_H
++#define HAVE_SYS_WAIT_H
+ 
+ /* Define if you have sys/select.h */
+ #define HAVE_SYS_SELECT_H
+@@ -107,7 +107,7 @@
+ #define HAVE_ARPA_INET_H
+ 
+ /* Define if you have sys/signal.h */
+-#undef HAVE_SYS_SIGNAL_H
++#define HAVE_SYS_SIGNAL_H
+ 
+ /* Define if you have sys/stropts.h */
+ #undef HAVE_SYS_STROPTS_H
+@@ -180,7 +180,7 @@
+ #undef HAVE_GRANTPT
+ 
+ /* Define if you have fchmod */
+-#undef HAVE_FCHMOD
++#define HAVE_FCHMOD
+ 
+ /* Define if you have <sys/type32.h> */
+ #undef HAVE_SYS_TYPES32_H

Copied: head/emulators/qemu/files/patch-qemu_Makefiles (from r363209, head/emulators/qemu/files/patch-bg)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu/files/patch-qemu_Makefiles	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/qemu/files/patch-bg)
@@ -0,0 +1,36 @@
+Index: qemu/Makefile
+@@ -19,6 +19,7 @@
+ CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
+ CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ CPPFLAGS += -U_FORTIFY_SOURCE
++CPPFLAGS += -DSMBD_COMMAND=\"${LOCALBASE}/sbin/smbd\" -I${LOCALBASE}/include -DPREFIX=\"${PREFIX}\"
+ LIBS=
+ ifdef CONFIG_STATIC
+ LDFLAGS += -static
+Index: qemu/Makefile.target
+@@ -54,6 +54,7 @@
+ 
+ CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ CPPFLAGS+=-U_FORTIFY_SOURCE
++CPPFLAGS+=-DSMBD_COMMAND=\"${LOCALBASE}/sbin/smbd\" -I${LOCALBASE}/include -DPREFIX=\"${PREFIX}\"
+ LIBS+=-lm
+ ifdef CONFIG_WIN32
+ LIBS+=-lwinmm -lws2_32 -liphlpapi
+Index: qemu/net.h
+@@ -99,12 +99,14 @@
+ int slirp_is_inited(void);
+ void net_client_check(void);
+ 
+-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
+-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
++#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup"
++#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown"
++#ifndef SMBD_COMMAND 
+ #ifdef __sun__
+ #define SMBD_COMMAND "/usr/sfw/sbin/smbd"
+ #else
+ #define SMBD_COMMAND "/usr/sbin/smbd"
+ #endif
++#endif
+ 
+ #endif

Copied: head/emulators/qemu/files/patch-qemu_configure_1 (from r363209, head/emulators/qemu/files/patch-ac)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu/files/patch-qemu_configure_1	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/qemu/files/patch-ac)
@@ -0,0 +1,10 @@
+Index: qemu/configure
+@@ -868,7 +868,7 @@
+ sdl_too_old=no
+ 
+ if test "$sdl" = "yes" ; then
+-    sdl_config="sdl-config"
++    sdl_config="${SDL_CONFIG}"
+     sdl=no
+     sdl_static=no
+ 

Copied: head/emulators/qemu/files/patch-qemu_configure_2 (from r363209, head/emulators/qemu/files/patch-bd)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu/files/patch-qemu_configure_2	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/qemu/files/patch-bd)
@@ -0,0 +1,10 @@
+Index: qemu/configure
+@@ -570,7 +570,7 @@
+   if test -z "$prefix" ; then
+       prefix="/usr/local"
+   fi
+-  mansuffix="/share/man"
++  mansuffix="/man"
+   datasuffix="/share/qemu"
+   docsuffix="/share/doc/qemu"
+   binsuffix="/bin"

Copied: head/emulators/qemu/files/patch-qemu_net.c (from r363209, head/emulators/qemu/files/patch-bt)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu/files/patch-qemu_net.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/qemu/files/patch-bt)
@@ -0,0 +1,109 @@
+Index: qemu/net.c
+@@ -76,6 +76,11 @@
+ #endif
+ #endif
+ #endif
++#ifdef __FreeBSD__
++#include <sys/param.h>
++#include <sys/module.h>
++#include <sys/linker.h>
++#endif
+ 
+ #if defined(CONFIG_SLIRP)
+ #include "libslirp.h"
+@@ -3407,6 +3410,34 @@
+ 
+ #endif /* CONFIG_SLIRP */
+ 
++#ifdef __FreeBSD__
++#define LOAD_QUIETLY	1
++#define LOAD_VERBOSLY	2
++
++static int
++loadmodules(int how, const char *module, ...)
++{
++  int loaded = 0;
++  va_list ap;
++
++  va_start(ap, module);
++#ifndef NO_MODULES
++  while (module != NULL) {
++    if (modfind(module) == -1) {
++      if (kldload(module) == -1) {
++        if (how == LOAD_VERBOSLY)
++          fprintf(stderr, "%s: Cannot load module\n", module);
++      } else
++        loaded++;
++    }
++    module = va_arg(ap, const char *);
++  }
++  va_end(ap);
++#endif
++  return loaded;
++}
++#endif
++
+ #if !defined(_WIN32)
+ 
+ typedef struct TAPState {
+@@ -3470,11 +3501,59 @@
+     char *dev;
+     struct stat s;
+ 
++#ifdef __FreeBSD__
++    int i, kldtried = 0, enoentcount = 0, err = 0;
++    char dname[100];
++#ifdef USE_DEVTAP
++    /*
++     * 5.x has /dev/tap, but that seems to just blindly increase its
++     * couter on every open() for some people(??), i.e. on every qemu run.
++     */
++    i = -1;
++#else
++    i = 0;
++#endif
++    for (; i < 10; i++) {
++        if (*ifname)
++            snprintf(dname, sizeof dname, "/dev/%s", ifname);
++        else if (i == -1)
++            strcpy(dname, "/dev/tap");
++        else
++            snprintf(dname, sizeof dname, "%s%d",
++        	     "/dev/tap", i);
++        TFR(fd = open(dname, O_RDWR));
++        if (fd >= 0)
++            break;
++        else if (errno == ENXIO || errno == ENOENT) {
++            if (i == 0 && !kldtried++) {
++                /*
++                 * Attempt to load the tunnel interface KLD if it isn't loaded
++                 * already.
++                 */
++                if (loadmodules(LOAD_VERBOSLY, "if_tap", NULL))
++                    i = -1;
++                continue;
++            }
++            if (errno != ENOENT || ++enoentcount > 3) {
++                err = errno;
++                break;
++            }
++        } else
++            err = errno;
++        if (*ifname)
++            break;
++    }
++    if (fd < 0) {
++        fprintf(stderr, "warning: could not open %s (%s): no virtual network emulation\n", dname, strerror(err));
++        return -1;
++    }
++#else
+     TFR(fd = open("/dev/tap", O_RDWR));
+     if (fd < 0) {
+-        fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation\n");
++        fprintf(stderr, "warning: could not open /dev/tap (%s): no virtual network emulation\n", strerror(errno));
+         return -1;
+     }
++#endif
+ 
+     fstat(fd, &s);
+     dev = devname(s.st_rdev, S_IFCHR);

Copied: head/emulators/qemu/files/patch-qemu_slirp_slirp_config.h (from r363209, head/emulators/qemu/files/patch-bf)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/qemu/files/patch-qemu_slirp_slirp_config.h	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/qemu/files/patch-bf)
@@ -0,0 +1,37 @@
+Index: qemu/slirp/slirp_config.h
+@@ -86,7 +86,7 @@
+ #undef BAD_SPRINTF
+ 
+ /* Define if you have readv */
+-#undef HAVE_READV
++#define HAVE_READV
+ 
+ /* Define if iovec needs to be declared */
+ #undef DECLARE_IOVEC
+@@ -95,7 +95,7 @@
+ #undef DECLARE_SPRINTF
+ 
+ /* Define if you have a POSIX.1 sys/wait.h */
+-#undef HAVE_SYS_WAIT_H
++#define HAVE_SYS_WAIT_H
+ 
+ /* Define if you have sys/select.h */
+ #define HAVE_SYS_SELECT_H
+@@ -107,7 +107,7 @@
+ #define HAVE_ARPA_INET_H
+ 
+ /* Define if you have sys/signal.h */
+-#undef HAVE_SYS_SIGNAL_H
++#define HAVE_SYS_SIGNAL_H
+ 
+ /* Define if you have sys/stropts.h */
+ #undef HAVE_SYS_STROPTS_H
+@@ -180,7 +180,7 @@
+ #undef HAVE_GRANTPT
+ 
+ /* Define if you have fchmod */
+-#undef HAVE_FCHMOD
++#define HAVE_FCHMOD
+ 
+ /* Define if you have <sys/type32.h> */
+ #undef HAVE_SYS_TYPES32_H

Copied: head/emulators/sim6811/files/patch-main.c (from r363209, head/emulators/sim6811/files/patch-ac)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/sim6811/files/patch-main.c	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/sim6811/files/patch-ac)
@@ -0,0 +1,37 @@
+--- main.c.orig	Tue Mar 22 17:16:59 1994
++++ main.c	Tue Aug 10 21:28:07 2004
+@@ -70,13 +70,6 @@
+ #include <ctype.h>
+ #include "sim.h"
+ 
+-extern int printf();
+-extern int fprintf();
+-extern int fclose();
+-extern int fscanf();
+-extern int sscanf();
+-extern int fflush();
+-
+ /* how to handle all other op codes */
+ void bad_op(m6811 state)
+ {
+@@ -323,19 +316,7 @@
+ 
+     case '?':			/* help */
+ 	(void) fgets(line, sizeof(line), stdin);
+-	printf(
+-	       "
+-
+- (empty line)     step once
+-s [n]		  step n times
+-b [add [n]]	  set break at add which will survive n hits
+-g [add [n]]	  set pc to add, step n times
+-l [add [n]]	  list n lines of disassembly starting from pc
+-m add n		  set specified memory location to n
+-R		  Reset memory, regs and reload code
+-t [add [n]]	  set temporary break at add which will survive n hits
+-q or EOF	  exit simulator
+-?		  print this list\n\n");
++	printf("\n\n (empty line)     step once\ns [n]		  step n times\nb [add [n]]	  set break at add which will survive n hits\ng [add [n]]	  set pc to add, step n times\nl [add [n]]	  list n lines of disassembly starting from pc\nm add n		  set specified memory location to n\nR		  Reset memory, regs and reload code\nt [add [n]]	  set temporary break at add which will survive n hits\nq or EOF	  exit simulator\n?		  print this list\n\n");
+ 	printf("hit return to continue");
+ 	fflush(stdout);
+ 	fgets(line, sizeof(line), stdin);

Copied: head/emulators/sim6811/files/patch-sim6811.1 (from r363209, head/emulators/sim6811/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/sim6811/files/patch-sim6811.1	Mon Jul 28 18:39:29 2014	(r363222, copy of r363209, head/emulators/sim6811/files/patch-ab)
@@ -0,0 +1,76 @@
+*** sim6811.1~	Wed Sep  6 10:58:03 1995
+--- sim6811.1	Wed Sep  6 10:59:11 1995
+***************
+*** 0 ****
+--- 1,71 ----
++ .Dd June 5, 1993
++ .Dt sim6811 1
++ .Os BSD 4
++ .Sh NAME
++ .Nm sim6811
++ .Nd very simple and crude simulator for the 6811
++ .Sh SYNOPSIS
++ .Nm sim6811
++ .Ar s19-file
++ .Sh DESCRIPTION
++ .Ar s19-file
++ is a Motorola s19 assembler output file
++ 
++ some instructions aren't there yet (notably converning multiplication
++ and interrupts) and the interface only allows stepping.  this should
++ be easily rectifiable, however, and the simple structure should make
++ grafting on a graphical interface quite simple.
++ 
++ to run the simulator, just provide the name of an object file on the
++ command line.  the object file must be in s19 format, and must include
++ a reset vector in order to tell the simulator where to start
++ execution.  simulation proceeds one instruction at a time, with a
++ register and page zero memory dump being performed at each step.
++ 
++ several simple commands are supported, but additional commands to
++ modify memory, cause interrupts and simulate the special registers
++ would all be nice, and relatively easy to add.
++ 
++ .Sh COMMANDS
++ 
++ The current
++ .Nm sim6811
++ command set includes
++ 
++ .Bl -tag -width Ds
++ 
++ .Nm l [address [n]]
++ .br
++ .ti 8
++ disassemble n instructions starting at address
++ 
++ .Nm g [address [n]]
++ .br
++ .ti 8
++ go starting at address for n steps.  
++ 
++ .Nm s [n]
++ .br
++ .ti 8
++ step n times (n=1 default)
++ 
++ .Nm b [address[cnt]]
++ .br
++ .ti 8
++ set a breakpoint, which will stop cnt times
++ 
++ .Nm t [address[cnt]]
++ .br
++ .ti 8
++ set a temporary breakpoint.
++ 
++ .Nm <empty-line>
++ .br
++ .ti 8
++ step once
++ 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407281839.s6SIdTP0019720>