summaryrefslogtreecommitdiff
path: root/emulators/doscmd
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/doscmd')
-rw-r--r--emulators/doscmd/DESCR7
-rw-r--r--emulators/doscmd/Makefile27
-rw-r--r--emulators/doscmd/PLIST6
-rw-r--r--emulators/doscmd/distinfo14
-rw-r--r--emulators/doscmd/patches/patch-aa24
-rw-r--r--emulators/doscmd/patches/patch-ab59
-rw-r--r--emulators/doscmd/patches/patch-ac20
-rw-r--r--emulators/doscmd/patches/patch-ae13
-rw-r--r--emulators/doscmd/patches/patch-af40
-rw-r--r--emulators/doscmd/patches/patch-ag20
-rw-r--r--emulators/doscmd/patches/patch-ah74
-rw-r--r--emulators/doscmd/patches/patch-ai27
-rw-r--r--emulators/doscmd/patches/patch-aj33
13 files changed, 0 insertions, 364 deletions
diff --git a/emulators/doscmd/DESCR b/emulators/doscmd/DESCR
deleted file mode 100644
index 191d0f038aa..00000000000
--- a/emulators/doscmd/DESCR
+++ /dev/null
@@ -1,7 +0,0 @@
-doscmd, an MS-DOS emulator (NetBSD/i386 only)
-
-Doscmd simulates an MS-DOS environment for running DOS software. Rather
-than provide a software emulation of the 8086 CPU, it uses the
-NetBSD/i386 system call i386_vm86() call to access the VM86 mode of i386
-and later CPUs. It therefore runs much more quickly, at the cost of not
-running on other architectures.
diff --git a/emulators/doscmd/Makefile b/emulators/doscmd/Makefile
deleted file mode 100644
index b5183eb710a..00000000000
--- a/emulators/doscmd/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# $NetBSD: Makefile,v 1.13 2004/01/20 12:14:40 agc Exp $
-#
-
-DISTNAME= doscmd-19960502-2
-PKGNAME= doscmd-19960502.2
-CATEGORIES= emulators
-MASTER_SITES= ftp://ftp.NetBSD.org/pub/NetBSD/arch/i386/doscmd/
-
-MAINTAINER= tech-pkg@NetBSD.org
-COMMENT= MS-DOS emulator (NetBSD/i386 only)
-
-# mmap() portability (no MAP_FIXED), and objcopy problems on NetBSD-1.6-i386 and later
-ONLY_FOR_PLATFORM= NetBSD-1.[345]*-i386
-
-WRKSRC= ${WRKDIR}/doscmd
-MAKE_ENV= X11BASE=${X11BASE}
-
-MANCOMPRESSED_IF_MANZ= yes
-
-do-configure:
- @cd ${WRKSRC} && \
- ${SED} "s=%PREFIX%=${PREFIX}=" < doscmd.1 >doscmd.1.new && \
- ${MV} doscmd.1.new doscmd.1 && \
- ${SED} "s=%PREFIX%=${PREFIX}=" < doscmd_loader.c >dl.new && \
- ${MV} dl.new doscmd_loader.c
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/doscmd/PLIST b/emulators/doscmd/PLIST
deleted file mode 100644
index f46155d7e4a..00000000000
--- a/emulators/doscmd/PLIST
+++ /dev/null
@@ -1,6 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 23:52:33 zuntum Exp $
-bin/doscmd
-man/man1/doscmd.1
-man/cat1/doscmd.0
-libexec/doscmd.kernel
-libexec/instbsdi.exe
diff --git a/emulators/doscmd/distinfo b/emulators/doscmd/distinfo
deleted file mode 100644
index 18e487b474e..00000000000
--- a/emulators/doscmd/distinfo
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: distinfo,v 1.4 2005/02/23 18:49:18 agc Exp $
-
-SHA1 (doscmd-19960502-2.tar.gz) = 85ec8e478d32d0f2861084d6d19186b5e1f0fc95
-RMD160 (doscmd-19960502-2.tar.gz) = e4eb842d7d765f6f608bdc0d08c7e2f1b4edb469
-Size (doscmd-19960502-2.tar.gz) = 109791 bytes
-SHA1 (patch-aa) = 56e3f9951ac3dcb6e07cd1f76c665286a694d67b
-SHA1 (patch-ab) = c83d7e5b8b514ca7f88b0bd3a0be963b7f77d3a4
-SHA1 (patch-ac) = 09757f9522e52b7491c3052dbb856a9b3828ce45
-SHA1 (patch-ae) = 6a33c0eff738caab4e30513dbe9b9f57d7b21d09
-SHA1 (patch-af) = b0091e54d0ffe8a2ebcae28a924fad24888ed20e
-SHA1 (patch-ag) = bbbca5339d66cb52b93019b712d21301d910d32b
-SHA1 (patch-ah) = 65e9a252e27b8ea339048d20df2d5f23977b5f66
-SHA1 (patch-ai) = e72e42897f221929aa269800a11e37ea2dd4419c
-SHA1 (patch-aj) = c400eb5ec1f46def1105ddb6e6a2a1397f8ec54e
diff --git a/emulators/doscmd/patches/patch-aa b/emulators/doscmd/patches/patch-aa
deleted file mode 100644
index 53a01de6491..00000000000
--- a/emulators/doscmd/patches/patch-aa
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-aa,v 1.4 1998/11/29 23:39:30 sommerfe Exp $
-
---- signal.c.orig Thu May 2 16:03:39 1996
-+++ signal.c Sun Nov 29 18:27:37 1998
-@@ -98,11 +98,18 @@
- if (s >= 0 && s < NSIG) {
- handler[s] = h;
-
-- sa.sa_handler = generichandler;
-+ sa.sa_handler = (void (*)())generichandler;
-+#if defined(__LIBC12_SOURCE__)
- sa.sa_mask = sigmask(SIGIO) | sigmask(SIGALRM);
-+#else
-+ sigemptyset(&sa.sa_mask);
-+ sigaddset(&sa.sa_mask, SIGIO);
-+ sigaddset(&sa.sa_mask, SIGALRM);
-+#endif
- sa.sa_flags = SA_ONSTACK;
- sigaction(s, &sa, NULL);
-
-+ sigemptyset(&set);
- sigaddset(&set, s);
- sigprocmask(SIG_UNBLOCK, &set, 0);
- }
diff --git a/emulators/doscmd/patches/patch-ab b/emulators/doscmd/patches/patch-ab
deleted file mode 100644
index 2bc70622146..00000000000
--- a/emulators/doscmd/patches/patch-ab
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD: patch-ab,v 1.6 1999/12/18 22:10:02 christos Exp $
-
---- Makefile.orig Thu May 2 13:55:19 1996
-+++ Makefile Sat Dec 18 17:02:32 1999
-@@ -8,30 +8,45 @@
- int1a.c int2f.c intff.c \
- mem.c mouse.c net.c null.c port.c setver.c signal.c timer.c trace.c trap.c tty.c xms.c
-
-+BINDIR= ${PREFIX}/bin
-+MANDIR= ${PREFIX}/man
-+
- BINGRP= kmem
- EXEGRP= bin
- BINMODE=2555
- EXEMODE=444
--CFLAGS+=-I/usr/X11/include -DDISASSEMBLER -g
--LDFLAGS+=-L/usr/X11/lib
-+START_ADDRESS=0x110000
-+CFLAGS+=-I${X11BASE}/include -DDISASSEMBLER -g -DSTART_ADDRESS=${START_ADDRESS}
-+LDFLAGS+=-L${X11BASE}/lib -R${X11BASE}/lib
- LDADD+= -lX11 -li386 -lgcc -lc -lgcc
--DPADD+= /usr/X11/lib/libX11.a ${LIBC} ${LIBGCC}
-+DPADD+= ${X11BASE}/lib/libX11.a ${LIBC} ${LIBGCC}
-+
-+.include <bsd.prog.mk>
-+.if ${OBJECT_FMT} == "ELF"
-+TEXT=-e start -Ttext ${START_ADDRESS}
-+CRTBEGIN=/usr/lib/crtbegin.o
-+.else
-+TEXT=-e _start -T ${START_ADDRESS}
-+CRTBEGIN=
-+.endif
-+
-
- afterinstall:
- install ${COPY} -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
-- doscmd.kernel ${DESTDIR}/usr/libexec/doscmd.kernel
-+ doscmd.kernel ${PREFIX}/libexec/doscmd.kernel
- install -c -o ${BINOWN} -g ${EXEGRP} -m ${EXEMODE} \
-- ${.CURDIR}/instbsdi.exe ${DESTDIR}/usr/dos/
-+ ${.CURDIR}/instbsdi.exe ${PREFIX}/libexec/
-
--doscmd: doscmd.kernel ${LIBCRT0} doscmd_loader.o
-- ld -N -Bstatic -o doscmd ${LDFLAGS} ${LIBCRT0} doscmd_loader.o ${LDADD}
-+doscmd: doscmd.kernel ${LIBCRT0} ${CRTBEGIN} doscmd_loader.o
-+ ld -N -Bstatic -o doscmd ${LDFLAGS:S/^-Wl,//g} ${LIBCRT0} ${CRTBEGIN} doscmd_loader.o ${LDADD}
-
--.include <bsd.prog.mk>
-
- .depend: doscmd_loader.c
-
- doscmd.kernel: crt0.o ${OBJS}
-- ld -N -Bstatic -T 110000 -o doscmd.kernel ${LDFLAGS} crt0.o ${OBJS} ${LDADD}
-+ ld -N -Bstatic ${TEXT} -o doscmd.bin ${LDFLAGS:S/^-Wl,//g} crt0.o ${OBJS} ${LDADD}
-+ objcopy -O binary doscmd.bin $@
-+ @rm -f doscmd.bin
-
- doscmd.0: doscmd.1
- tbl ${.IMPSRC} | nroff -mandoc > ${.TARGET}
diff --git a/emulators/doscmd/patches/patch-ac b/emulators/doscmd/patches/patch-ac
deleted file mode 100644
index 3571c88e6ca..00000000000
--- a/emulators/doscmd/patches/patch-ac
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ac,v 1.3 2001/02/27 17:20:10 wiz Exp $
-
---- doscmd.1.orig Wed Apr 10 09:38:59 1996
-+++ doscmd.1 Tue Feb 27 18:17:16 2001
-@@ -305,13 +305,13 @@
- .Fl ro
- flag is specified, it is a read only file system.
- These assignments will not take place when booting DOS until the
--.Pa /usr/dos/instbsdi.exe
-+.Pa %PREFIX%/libexec/instbsdi.exe
- binary is run.
- .\"
- .\"
- .\"
- .It Cm assign Xo
--.Cm lpt Ns Op Cm 0-4 :
-+.Cm lpt Ns Op Cm 1-4 :
- .Op Cm direct
- .Ar path
- .Op Ar timeout
diff --git a/emulators/doscmd/patches/patch-ae b/emulators/doscmd/patches/patch-ae
deleted file mode 100644
index 5727c6b5bd3..00000000000
--- a/emulators/doscmd/patches/patch-ae
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ae,v 1.1 1998/10/28 01:29:16 hubertf Exp $
-
---- doscmd.h.BAK Wed Oct 28 01:48:56 1998
-+++ doscmd.h Wed Oct 28 01:49:02 1998
-@@ -58,7 +58,7 @@
-
- #define MAX_AVAIL_SEG 0xa000
- char *dosmem;
--char cmdname[];
-+char cmdname[256];
- int dosmem_size;
-
- int pspseg; /* segment # of PSP */
diff --git a/emulators/doscmd/patches/patch-af b/emulators/doscmd/patches/patch-af
deleted file mode 100644
index abdce1307e0..00000000000
--- a/emulators/doscmd/patches/patch-af
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-af,v 1.3 2001/03/16 13:58:58 wiz Exp $
-
---- doscmd.c.orig Thu May 2 21:37:33 1996
-+++ doscmd.c
-@@ -100,7 +100,7 @@
- char *dos_path = 0;
- char cmdname[256];
-
--char *memfile = "/tmp/doscmd.XXXXXX";
-+char memfile[] = "/tmp/doscmd.XXXXXX";
-
- int
- main(int argc, char **argv)
-@@ -133,6 +133,14 @@
- if (fd != 3 && fd != 4)
- close (fd);
-
-+#ifdef __ELF__
-+ if (mmap((void *)4096, 1024 * 1024, PROT_READ|PROT_WRITE,
-+ MAP_ANON|MAP_FIXED|MAP_PRIVATE, -1, (off_t)0) == MAP_FAILED) {
-+ perror("mmap botch");
-+ quit(1);
-+ }
-+#endif
-+
- fd = -1;
-
- debug_set(0); /* debug any D_TRAPS without intnum */
-@@ -581,7 +589,11 @@
- SET16(sc.sc_fs, 0x0000);
- SET16(sc.sc_gs, 0x0000);
-
-+#if defined(__LIBC12_SOURCE__)
- sc.sc_mask = 0;
-+#else
-+ sigemptyset(&sc.sc_mask);
-+#endif
- sc.sc_onstack = 0;
-
- if (tflag) {
diff --git a/emulators/doscmd/patches/patch-ag b/emulators/doscmd/patches/patch-ag
deleted file mode 100644
index 8974ccacb0f..00000000000
--- a/emulators/doscmd/patches/patch-ag
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ag,v 1.2 2001/03/16 13:58:58 wiz Exp $
-
---- AsyncIO.c.orig Thu May 2 08:51:00 1996
-+++ AsyncIO.c
-@@ -320,6 +320,7 @@
- abort();
- }
- if (stackp++ == 0) {
-+ sigemptyset(&set);
- sigaddset(&set, SIGIO);
- sigprocmask(SIG_BLOCK, &set, 0);
- }
-@@ -335,6 +336,7 @@
- abort();
- }
- if (--stackp == 0) {
-+ sigemptyset(&set);
- sigaddset(&set, SIGIO);
- sigprocmask(SIG_UNBLOCK, &set, 0);
- }
diff --git a/emulators/doscmd/patches/patch-ah b/emulators/doscmd/patches/patch-ah
deleted file mode 100644
index 81ddec5d65a..00000000000
--- a/emulators/doscmd/patches/patch-ah
+++ /dev/null
@@ -1,74 +0,0 @@
-$NetBSD: patch-ah,v 1.3 2003/06/06 11:55:07 jmmv Exp $
-
---- doscmd_loader.c.orig 2003-06-06 14:00:18.000000000 +0200
-+++ doscmd_loader.c
-@@ -31,38 +31,50 @@
- */
-
- #include <stdio.h>
--#include <a.out.h>
-+#include <unistd.h>
-+#include <fcntl.h>
-+#include <sys/stat.h>
-+#include <sys/mman.h>
-
- /*
- * reserve space in "low" memory for the interrupt vector table
- */
- static const char filler[4096] = { 0, };
-
--#define _PATH_DOS_KERNEL_DIR "/usr/libexec/"
-+#define _PATH_DOS_KERNEL_DIR "%PREFIX%/libexec/"
- #define _PATH_DOS_KERNEL "doscmd.kernel"
-
--int
-+static char *locations[] = {
-+ _PATH_DOS_KERNEL,
-+ "obj/" _PATH_DOS_KERNEL,
-+ _PATH_DOS_KERNEL_DIR _PATH_DOS_KERNEL,
-+ NULL
-+};
-+
-+u_long
- load_kernel(void)
- {
-- FILE *fp;
-- struct exec exec;
-- int start_address;
--
-- if ((fp = fopen(_PATH_DOS_KERNEL, "r")) == NULL &&
-- (fp = fopen("obj/" _PATH_DOS_KERNEL, "r")) == NULL &&
-- (fp = fopen(_PATH_DOS_KERNEL_DIR _PATH_DOS_KERNEL, "r")) == NULL)
-+ int i, fd;
-+ size_t size;
-+ struct stat st;
-+
-+ for (i = 0; locations[i] != NULL; i++) {
-+ if ((fd = open(locations[i], O_RDONLY)) != -1)
-+ break;
-+ }
-+ if (locations[i] == NULL)
- err(1, "load_kernel");
-
-- if (fread(&exec, sizeof(exec), 1, fp) != 1 || N_GETMAGIC(exec) != OMAGIC)
-- errx(1, "bad kernel file format");
-+ if (fstat(fd, &st) == -1)
-+ err(1, "fstat");
-
-- start_address = exec.a_entry & (~(getpagesize() - 1));
-- if (brk(start_address + exec.a_text + exec.a_data + exec.a_bss) < 0)
-- err(1, "load_kernel");
-- fread((char *)start_address, exec.a_text + exec.a_data, 1, fp);
-- bzero((char *)(start_address + exec.a_text + exec.a_data), exec.a_bss);
-- fclose(fp);
-- return(exec.a_entry);
-+ size = st.st_size + START_ADDRESS;
-+
-+ if (mmap((void *)START_ADDRESS, st.st_size,
-+ PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0) == MAP_FAILED)
-+ err(1, "mmap");
-+
-+ return(START_ADDRESS);
- }
-
- void
diff --git a/emulators/doscmd/patches/patch-ai b/emulators/doscmd/patches/patch-ai
deleted file mode 100644
index f9ff5fc3eeb..00000000000
--- a/emulators/doscmd/patches/patch-ai
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-ai,v 1.1 1999/12/18 01:46:29 christos Exp $
-
---- int13.c.orig Thu May 2 16:49:57 1996
-+++ int13.c Fri Dec 17 20:36:23 1999
-@@ -296,7 +296,7 @@
- di->secsize = 512;
- di->path = strdup(file);
-
-- di->location = ((table & 0xf0000) << 12) | (table & 0xffff);
-+ di->location = ((htable & 0xf0000) << 12) | (htable & 0xffff);
-
- if (drive == 0) {
- ivec[0x41] = di->location;
-@@ -413,11 +413,11 @@
- di->path = strdup(file);
- }
- di->fd = -1;
-- di->location = ((table & 0xf0000) << 12) | (table & 0xffff);
-+ di->location = ((ftable & 0xf0000) << 12) | (ftable & 0xffff);
- di->sector0 = 0;
- di->offset = 0;
-
-- ivec[0x1e] = ((ftable & 0xf0000) << 12) | (ftable & 0xffff);
-+ ivec[0x1e] = di->location;
-
- table = ftable + drive * 0x0a;
-
diff --git a/emulators/doscmd/patches/patch-aj b/emulators/doscmd/patches/patch-aj
deleted file mode 100644
index 720af782e19..00000000000
--- a/emulators/doscmd/patches/patch-aj
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2001/03/16 13:59:54 wiz Exp $
-
---- port.c.orig Wed Apr 10 12:52:15 1996
-+++ port.c
-@@ -63,7 +63,7 @@
- goto bad;
- }
- while (cnt--) {
-- ioports[port/32] |= (1 << (port%32));
-+ ioports[port/32] &= ~(1 << (port%32));
- port++;
- }
- if (i386_set_ioperm(ioports) < 0) {
-@@ -82,7 +82,7 @@
- goto bad;
- }
- while (cnt--) {
-- ioports[port/32] &= ~(1 << (port%32));
-+ ioports[port/32] |= (1 << (port%32));
- port++;
- }
- if (i386_set_ioperm(ioports) < 0) {
-@@ -169,6 +169,10 @@
- portsw[i].p_inb = inb_nullport;
- if (portsw[i].p_outb == 0)
- portsw[i].p_outb = outb_nullport;
-+ }
-+
-+ for (i = 0; i < MAXPORT/32; i++) {
-+ ioports[i] = 0xffffffff;
- }
- }
-