summaryrefslogtreecommitdiff
path: root/emulators/twin/patches
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-01-15 19:20:59 +0000
committerjoerg <joerg@pkgsrc.org>2006-01-15 19:20:59 +0000
commitfcfec7dec328a793070db2b465dab4a885b3a445 (patch)
treeb34d26e1ce4526f2de7bc741b7634c895fe29dcc /emulators/twin/patches
parent56f278501b75cc867d2552eefcc0dcf0dc806b2e (diff)
downloadpkgsrc-fcfec7dec328a793070db2b465dab4a885b3a445.tar.gz
Add DragonFly support. Workaround a bug in DragonFly's time.h when
compiling with _POSIX_SOURCE set (size_t doesn't get defined). Fix errno. Fix an incorrect va_arg: short gets promoted to int, so use that.
Diffstat (limited to 'emulators/twin/patches')
-rw-r--r--emulators/twin/patches/patch-aa18
-rw-r--r--emulators/twin/patches/patch-ae28
-rw-r--r--emulators/twin/patches/patch-ak22
-rw-r--r--emulators/twin/patches/patch-am12
-rw-r--r--emulators/twin/patches/patch-an20
-rw-r--r--emulators/twin/patches/patch-ao16
6 files changed, 102 insertions, 14 deletions
diff --git a/emulators/twin/patches/patch-aa b/emulators/twin/patches/patch-aa
index 7a154c64480..e3a48882783 100644
--- a/emulators/twin/patches/patch-aa
+++ b/emulators/twin/patches/patch-aa
@@ -1,11 +1,15 @@
-$NetBSD: patch-aa,v 1.2 2003/03/08 03:15:51 jmc Exp $
+$NetBSD: patch-aa,v 1.3 2006/01/15 19:20:59 joerg Exp $
--- configure.in.orig Sun Jan 14 08:23:50 2001
+++ configure.in Fri Apr 5 22:31:14 2002
-@@ -147,6 +147,10 @@
+@@ -147,6 +147,14 @@ case "$host" in
TARGET=freebsd
;;
++ i386-*-dragonfly* )
++ TARGET=freebsd
++ ;;
++
+ *netbsd* )
+ TARGET=netbsd
+ ;;
@@ -13,15 +17,15 @@ $NetBSD: patch-aa,v 1.2 2003/03/08 03:15:51 jmc Exp $
i*86-*-linux* )
TARGET=linux
;;
-@@ -349,6 +353,11 @@
- powerpc-*-linux* )
+@@ -350,6 +358,11 @@ case "$host" in
# egcs still broken on ppc
TWIN_CFLAGS=-g
-+ ;;
+ ;;
+
-+ *netbsd* )
++ *netbsd* | *dragonfly* | *freebsd*)
+ LIBTWIN_LDFLAGS="$LDFLAGS $LIBTWIN_LDFLAGS"
+ DLL_LDFLAGS="$LDFLAGS $DLL_LDFLAGS"
- ;;
++ ;;
esac
+ dnl Determine the initialization method for shared libraries.
diff --git a/emulators/twin/patches/patch-ae b/emulators/twin/patches/patch-ae
index 1a6da2cf304..013dc8cbc72 100644
--- a/emulators/twin/patches/patch-ae
+++ b/emulators/twin/patches/patch-ae
@@ -1,11 +1,14 @@
-$NetBSD: patch-ae,v 1.1.1.1 2001/05/15 09:46:37 agc Exp $
+$NetBSD: patch-ae,v 1.2 2006/01/15 19:20:59 joerg Exp $
--- debugger/sig_context.h.orig Sun May 13 03:01:07 2001
+++ debugger/sig_context.h Sun May 13 03:25:31 2001
-@@ -59,6 +59,20 @@
+@@ -57,7 +57,21 @@ enum {
- #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ #endif /* linux */
+-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++
+enum {
+ REG_GS = 0, REG_FS, REG_ES, REG_DS,
+ REG_EDI, REG_ESI, REG_EBP,
@@ -19,7 +22,24 @@ $NetBSD: patch-ae,v 1.1.1.1 2001/05/15 09:46:37 agc Exp $
+ REG_DI, REG_SI,
+ REG_FL
+};
-+
+
#include <signal.h>
typedef struct sigcontext SIGCONTEXT;
+@@ -120,7 +134,7 @@ typedef struct _CONTEXT /* Note 1 */
+
+
+ #if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) \
+- || defined(__OpenBSD__)
++ || defined(__OpenBSD__) || defined(__DragonFly__)
+ #define EAX_sig(context) ((context)->sc_eax)
+ #define EBX_sig(context) ((context)->sc_ebx)
+@@ -143,7 +157,7 @@ typedef struct _CONTEXT /* Note 1 */
+ #define TRAP_sig(context) ((context)->sc_trapno)
+ #endif
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__DragonFly__)
+ #define EFL_sig(context) ((context)->sc_eflags)
+ #else
+ #define EFL_sig(context) ((context)->sc_efl)
diff --git a/emulators/twin/patches/patch-ak b/emulators/twin/patches/patch-ak
index 8bdf1faf775..3f09cabe9fd 100644
--- a/emulators/twin/patches/patch-ak
+++ b/emulators/twin/patches/patch-ak
@@ -1,8 +1,16 @@
-$NetBSD: patch-ak,v 1.1 2004/07/11 00:55:19 wiz Exp $
+$NetBSD: patch-ak,v 1.2 2006/01/15 19:20:59 joerg Exp $
--- msdos/mfs_fileio.c.orig 2001-01-14 04:19:38.000000000 +0100
+++ msdos/mfs_fileio.c
-@@ -213,8 +213,8 @@ mfs_delete(DWORD p1, DWORD p2, DWORD p3,
+@@ -32,6 +32,7 @@ To send email to the maintainer of the W
+
+ #include "platform.h"
+
++#include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h> /* unlink() */
+@@ -213,8 +214,8 @@ mfs_delete(DWORD p1, DWORD p2, DWORD p3,
(strcmp(filename, xdos.fileio[slot].filename) == 0) ) {
/* Get the handle */
if ((handle = gethandle()) < 0) {
@@ -13,7 +21,7 @@ $NetBSD: patch-ak,v 1.1 2004/07/11 00:55:19 wiz Exp $
return MAKELONG(NO_HANDLES & 0xffff,0xffff);
}
xdos.fileptr[handle] = &xdos.fileio[slot];
-@@ -232,8 +232,8 @@ mfs_delete(DWORD p1, DWORD p2, DWORD p3,
+@@ -232,8 +233,8 @@ mfs_delete(DWORD p1, DWORD p2, DWORD p3,
return unlink(filename);
}
}
@@ -24,3 +32,11 @@ $NetBSD: patch-ak,v 1.1 2004/07/11 00:55:19 wiz Exp $
}
}
/* At this point, either the file was fclosed by us, or it was
+@@ -332,7 +333,6 @@ mfs_openfile(char *filename, int mode, c
+ {
+ char altname[_MAX_PATH];
+ int slot,handle,freeslot;
+- extern int errno;
+ int drive;
+ int fd;
+ int nclosed;
diff --git a/emulators/twin/patches/patch-am b/emulators/twin/patches/patch-am
new file mode 100644
index 00000000000..2a511dbf584
--- /dev/null
+++ b/emulators/twin/patches/patch-am
@@ -0,0 +1,12 @@
+$NetBSD: patch-am,v 1.1 2006/01/15 19:20:59 joerg Exp $
+
+--- msdos/dos_timer.c.orig 2006-01-15 18:50:44.000000000 +0000
++++ msdos/dos_timer.c
+@@ -31,6 +31,7 @@ To send email to the maintainer of the W
+ #include "platform.h"
+
+ #define _POSIX_SOURCE 1
++#include <sys/types.h>
+ #include <time.h>
+
+
diff --git a/emulators/twin/patches/patch-an b/emulators/twin/patches/patch-an
new file mode 100644
index 00000000000..a1c6d31db03
--- /dev/null
+++ b/emulators/twin/patches/patch-an
@@ -0,0 +1,20 @@
+$NetBSD: patch-an,v 1.1 2006/01/15 19:20:59 joerg Exp $
+
+--- msdos/fat_fileio.c.orig 2006-01-15 18:54:48.000000000 +0000
++++ msdos/fat_fileio.c
+@@ -30,6 +30,7 @@ To send email to the maintainer of the W
+
+ #include "platform.h"
+
++#include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/types.h>
+@@ -132,7 +133,6 @@ fat_open(DWORD p1, DWORD p2, DWORD p3, D
+ int DosHandle;
+
+ int slot,handle,freeslot;
+- extern int errno;
+ int nclosed;
+ LPMFSFILE fp;
+ DWORD DosDrive;
diff --git a/emulators/twin/patches/patch-ao b/emulators/twin/patches/patch-ao
new file mode 100644
index 00000000000..36d121ae59d
--- /dev/null
+++ b/emulators/twin/patches/patch-ao
@@ -0,0 +1,16 @@
+$NetBSD: patch-ao,v 1.1 2006/01/15 19:20:59 joerg Exp $
+
+--- windows/vsprintf32.c.orig 2006-01-15 18:59:25.000000000 +0000
++++ windows/vsprintf32.c
+@@ -264,9 +264,9 @@ wsprintfW(char * buf, LPCWSTR format, ..
+ num = va_arg(args, unsigned long);
+ else if (qualifier == 'h')
+ if (flags & SIGN)
+- num = va_arg(args, short);
++ num = va_arg(args, int);
+ else
+- num = va_arg(args, unsigned short);
++ num = va_arg(args, unsigned int);
+ else if (flags & SIGN)
+ num = va_arg(args, int);
+ else