summaryrefslogtreecommitdiff
path: root/emulators/lrmi
diff options
context:
space:
mode:
authorjoerg <joerg>2005-12-09 10:56:47 +0000
committerjoerg <joerg>2005-12-09 10:56:47 +0000
commit8801744b0f2a4bfc0d4ac4190dd8c06b68135ee9 (patch)
tree0a840cbfafc0c94fedd7f77c94b07a219924fe3f /emulators/lrmi
parent6d841c4b4fd7d21fbb2693e0a30e4ce8bd5e60c9 (diff)
downloadpkgsrc-8801744b0f2a4bfc0d4ac4190dd8c06b68135ee9.tar.gz
Add DragonFly support.
Diffstat (limited to 'emulators/lrmi')
-rw-r--r--emulators/lrmi/distinfo6
-rw-r--r--emulators/lrmi/patches/patch-aa97
-rw-r--r--emulators/lrmi/patches/patch-ab13
-rw-r--r--emulators/lrmi/patches/patch-ac13
4 files changed, 112 insertions, 17 deletions
diff --git a/emulators/lrmi/distinfo b/emulators/lrmi/distinfo
index 7fb852677b4..ff4f3cd5cb6 100644
--- a/emulators/lrmi/distinfo
+++ b/emulators/lrmi/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.4 2005/02/23 18:49:19 agc Exp $
+$NetBSD: distinfo,v 1.5 2005/12/09 10:56:47 joerg Exp $
SHA1 (lrmi-0.8.tar.gz) = e01ba74b5343551b8d717c2fa9c365cb11d1ab48
RMD160 (lrmi-0.8.tar.gz) = 680c7f7e6599f71b942edef10846991e1c1ce14b
Size (lrmi-0.8.tar.gz) = 9347 bytes
-SHA1 (patch-aa) = 93dbadd844e48a36ebc77139ca47da3789fb6a41
+SHA1 (patch-aa) = 1505e0095b79f0e3b7a601adb07541ede68ee15b
+SHA1 (patch-ab) = c7c63c4d69e842736e430960a4efe23eef776e86
+SHA1 (patch-ac) = 16174abce6d5959e0bd0bdbf28c573ccb1e1445e
diff --git a/emulators/lrmi/patches/patch-aa b/emulators/lrmi/patches/patch-aa
index ee7b31bab3e..e16f2f5e55f 100644
--- a/emulators/lrmi/patches/patch-aa
+++ b/emulators/lrmi/patches/patch-aa
@@ -1,8 +1,35 @@
-$NetBSD: patch-aa,v 1.2 2003/10/06 11:14:14 drochner Exp $
+$NetBSD: patch-aa,v 1.3 2005/12/09 10:56:47 joerg Exp $
---- lrmi.c.orig Wed May 14 05:18:12 2003
-+++ lrmi.c Mon Oct 6 13:03:05 2003
-@@ -211,12 +211,26 @@ LRMI_free_real(void *m)
+--- lrmi.c.orig 2003-05-14 03:18:12.000000000 +0000
++++ lrmi.c
+@@ -23,7 +23,7 @@ ARISING FROM, OUT OF OR IN CONNECTION WI
+ OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+-#if (defined(__linux__) || defined(__NetBSD__) || defined(__FreeBSD__)) && \
++#if (defined(__linux__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)) && \
+ defined(__i386__)
+
+ #include <stdio.h>
+@@ -37,7 +37,7 @@ OTHER DEALINGS IN THE SOFTWARE.
+ #include <sys/vm86.h>
+ #endif
+
+-#elif defined(__NetBSD__) || defined(__FreeBSD__)
++#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+
+ #include <sys/param.h>
+ #include <signal.h>
+@@ -203,7 +203,7 @@ LRMI_free_real(void *m)
+
+ #if defined(__linux__)
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+-#elif defined(__NetBSD__) || defined(__FreeBSD__)
++#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+ #define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL)
+ #define TF_MASK PSL_T
+ #define VIF_MASK PSL_VIF
+@@ -211,13 +211,27 @@ LRMI_free_real(void *m)
#define DEFAULT_STACK_SIZE 0x1000
#define RETURN_TO_32_INT 255
@@ -25,12 +52,25 @@ $NetBSD: patch-aa,v 1.2 2003/10/06 11:14:14 drochner Exp $
+#else
#define CONTEXT_REGS context.vm.substr.regs
#define REG(x) vmsc.sc_ ## x
+-#elif defined(__FreeBSD__)
+#endif /* SA_SIGINFO */
- #elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
#define CONTEXT_REGS context.vm.uc
#define REG(x) uc_mcontext.mc_ ## x
-@@ -237,7 +251,8 @@ static struct {
- #if defined(__NetBSD__) || defined(__FreeBSD__)
+ #endif
+@@ -228,16 +242,17 @@ static struct {
+ unsigned short stack_seg, stack_off;
+ #if defined(__linux__) || defined(__NetBSD__)
+ struct vm86_struct vm;
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ struct {
+ struct vm86_init_args init;
+ ucontext_t uc;
+ } vm;
+ #endif
+-#if defined(__NetBSD__) || defined(__FreeBSD__)
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
int success;
jmp_buf env;
- void *old_sighandler;
@@ -39,8 +79,21 @@ $NetBSD: patch-aa,v 1.2 2003/10/06 11:14:14 drochner Exp $
int vret;
#endif
} context = { 0 };
-@@ -808,10 +823,22 @@ run_vm86(void)
- #elif defined(__NetBSD__) || defined(__FreeBSD__)
+@@ -354,7 +369,7 @@ LRMI_init(void)
+ set_bit(RETURN_TO_32_INT, &context.vm.int_revectored);
+ #elif defined(__NetBSD__)
+ set_bit(RETURN_TO_32_INT, &context.vm.int_byuser);
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ set_bit(RETURN_TO_32_INT, &context.vm.init.int_map);
+ #endif
+
+@@ -805,13 +820,25 @@ run_vm86(void)
+
+ return 0;
+ }
+-#elif defined(__NetBSD__) || defined(__FreeBSD__)
++#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__NetBSD__)
static void
-vm86_callback(int sig, int code, struct sigcontext *sc)
@@ -63,7 +116,7 @@ $NetBSD: patch-aa,v 1.2 2003/10/06 11:14:14 drochner Exp $
switch (VM86_TYPE(code)) {
case VM86_INTx:
-@@ -850,7 +877,11 @@ vm86_callback(int sig, int code, struct
+@@ -850,9 +877,13 @@ vm86_callback(int sig, int code, struct
}
/* ...and sync our context back to the kernel. */
@@ -73,8 +126,11 @@ $NetBSD: patch-aa,v 1.2 2003/10/06 11:14:14 drochner Exp $
memcpy(sc, &CONTEXT_REGS, sizeof(*sc));
+#endif
}
- #elif defined(__FreeBSD__)
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
static void
+ vm86_callback(int sig, int code, struct sigcontext *sc)
+ {
@@ -899,34 +930,44 @@ vm86_callback(int sig, int code, struct
static int
run_vm86(void)
@@ -99,9 +155,10 @@ $NetBSD: patch-aa,v 1.2 2003/10/06 11:14:14 drochner Exp $
+#endif
#if defined(__NetBSD__)
- context.old_sighandler = signal(SIGURG, (void (*)(int))vm86_callback);
-+ res = sigaction(SIGURG, &sa, &context.old_sighandler);
- #elif defined(__FreeBSD__)
+-#elif defined(__FreeBSD__)
- context.old_sighandler = signal(SIGBUS, (void (*)(int))vm86_callback);
++ res = sigaction(SIGURG, &sa, &context.old_sighandler);
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ res = sigaction(SIGBUS, &sa, &context.old_sighandler);
#endif
@@ -118,9 +175,10 @@ $NetBSD: patch-aa,v 1.2 2003/10/06 11:14:14 drochner Exp $
if (setjmp(context.env)) {
#if defined(__NetBSD__)
- (void) signal(SIGURG, context.old_sighandler);
-+ sigaction(SIGURG, &context.old_sighandler, 0);
- #elif defined(__FreeBSD__)
+-#elif defined(__FreeBSD__)
- (void) signal(SIGBUS, context.old_sighandler);
++ sigaction(SIGURG, &context.old_sighandler, 0);
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ sigaction(SIGBUS, &context.old_sighandler, 0);
#endif
- context.old_sighandler = NULL;
@@ -128,3 +186,12 @@ $NetBSD: patch-aa,v 1.2 2003/10/06 11:14:14 drochner Exp $
if (context.success)
return (1);
+@@ -937,7 +978,7 @@ run_vm86(void)
+ #if defined(__NetBSD__)
+ if (i386_vm86(&context.vm) == -1)
+ return (0);
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ if (i386_vm86(VM86_INIT, &context.vm.init))
+ return 0;
+
diff --git a/emulators/lrmi/patches/patch-ab b/emulators/lrmi/patches/patch-ab
new file mode 100644
index 00000000000..67e6e8fcf05
--- /dev/null
+++ b/emulators/lrmi/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1 2005/12/09 10:56:47 joerg Exp $
+
+--- vbetest.c.orig 2005-12-09 10:46:56.000000000 +0000
++++ vbetest.c
+@@ -17,7 +17,7 @@ This program is in the public domain.
+ #include <time.h>
+ #include <dev/wscons/wsconsio.h>
+ #include <machine/sysarch.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ #include <machine/console.h>
+ #include <machine/sysarch.h>
+ #endif
diff --git a/emulators/lrmi/patches/patch-ac b/emulators/lrmi/patches/patch-ac
new file mode 100644
index 00000000000..c329f25b3e0
--- /dev/null
+++ b/emulators/lrmi/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2005/12/09 10:56:47 joerg Exp $
+
+--- lrmi.h.orig 2005-12-09 10:49:30.000000000 +0000
++++ lrmi.h
+@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
+ #ifndef LRMI_H
+ #define LRMI_H
+
+-#if (defined(__linux__) || defined(__NetBSD__) || defined(__FreeBSD__)) && \
++#if (defined(__linux__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)) && \
+ defined(__i386__)
+
+