summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorfredb <fredb@pkgsrc.org>2002-04-13 12:53:40 +0000
committerfredb <fredb@pkgsrc.org>2002-04-13 12:53:40 +0000
commit613e4922db59dac9083353af85044911511caa80 (patch)
tree6d778681bdeecce6c771db7d1942391e66be5ae5 /devel
parent1633d88f03fb921cb3507e84668901eefdd214c0 (diff)
downloadpkgsrc-613e4922db59dac9083353af85044911511caa80.tar.gz
Make this build on current - NetBSD-1.5ZC/gcc-2.95.3/mac68k.
Diffstat (limited to 'devel')
-rw-r--r--devel/unproven-pthreads/distinfo15
-rw-r--r--devel/unproven-pthreads/patches/patch-ac53
-rw-r--r--devel/unproven-pthreads/patches/patch-af43
-rw-r--r--devel/unproven-pthreads/patches/patch-aj22
-rw-r--r--devel/unproven-pthreads/patches/patch-ak26
-rw-r--r--devel/unproven-pthreads/patches/patch-aq29
-rw-r--r--devel/unproven-pthreads/patches/patch-ax148
-rw-r--r--devel/unproven-pthreads/patches/patch-ay93
-rw-r--r--devel/unproven-pthreads/patches/patch-az29
-rw-r--r--devel/unproven-pthreads/patches/patch-ba21
-rw-r--r--devel/unproven-pthreads/patches/patch-bb119
11 files changed, 526 insertions, 72 deletions
diff --git a/devel/unproven-pthreads/distinfo b/devel/unproven-pthreads/distinfo
index 3114851e68a..ce4bf3a6157 100644
--- a/devel/unproven-pthreads/distinfo
+++ b/devel/unproven-pthreads/distinfo
@@ -1,27 +1,30 @@
-$NetBSD: distinfo,v 1.3 2002/03/25 16:08:31 briggs Exp $
+$NetBSD: distinfo,v 1.4 2002/04/13 12:53:40 fredb Exp $
SHA1 (unproven-pthreads-0.17.tar.gz) = 9f50e31da916b341e0c1ce21012bbd95b1a08a7d
Size (unproven-pthreads-0.17.tar.gz) = 234180 bytes
SHA1 (patch-aa) = 21955c9af0fd80b6bd939631d79db7225a392ea1
SHA1 (patch-ab) = 870977a372b34eecc44f8e32449e8a2e008b35a1
-SHA1 (patch-ac) = 0bace453902f1081d3d5b03af87d88a9717f1982
+SHA1 (patch-ac) = 522ef95fe92bacb626d10b414798138a221f9ab2
SHA1 (patch-ad) = 7821707f34ca6c187ad3ed088b161ff8be249d62
SHA1 (patch-ae) = 8bf343cd261c3cf25a30f44ffc0b0d0d09bba588
-SHA1 (patch-af) = cd5dea4351505f7183a3223c8849622e531608b7
+SHA1 (patch-af) = 6f555c8d2e6fe8b198b3110d0ccf871abc0d25ed
SHA1 (patch-ag) = fa046412dd222dc014768a448a5bd28c639d4aab
SHA1 (patch-ah) = 123bce3c1730283a847cf0ee65039c73c40b7523
SHA1 (patch-ai) = dd76c34072a56b2145077aad03f6de49cdf64a8c
-SHA1 (patch-aj) = df3ccf1075c95e60fda2bdf6cb89c434ed146a01
-SHA1 (patch-ak) = dc19aee047f29396725b3c5ceeb168a6e294ad96
SHA1 (patch-al) = 10d9c8354e8d032d3494505ea75b2cdb583295c0
SHA1 (patch-am) = 72d33545b9705292261159ed1de4c9068475aeeb
SHA1 (patch-an) = 7d53f7f625366c64a4db7ffcb71e28e633231c61
SHA1 (patch-ao) = bcb19cf571bfdf7b3c7e8eaa128bb0cf79254c04
SHA1 (patch-ap) = 9a1292ec8301fc38384198b3dc626f8faf85fd41
-SHA1 (patch-aq) = 1f3b6745ca3ac6b13e3575c230f0f7e5f7b9ec2f
+SHA1 (patch-aq) = b1e412bd3481b2e9f1d8169de58d881874cda646
SHA1 (patch-ar) = 52b983df27904a21fcac75646aeddebe446c7a8c
SHA1 (patch-as) = e016c3028b44d4ee80b4696bb738b5c6c751cf5b
SHA1 (patch-at) = 2a3bffff656bf916a3e399874e8f1fc41219ddc5
SHA1 (patch-au) = b6f05cd5f1e212170fcdbf4a22f36666ba417929
SHA1 (patch-av) = a8186fe8c13f76382566bbdc7232bf7052053e36
SHA1 (patch-aw) = 8c79c79412210c99429fd4a5460cbb0c15b24e49
+SHA1 (patch-ax) = 0c4e0a52da6b49565d69fa520e0bf8b53ab7ca61
+SHA1 (patch-ay) = af52315c2fd7c83c6328b94c90097e9ec94a5d9b
+SHA1 (patch-az) = b8782fa7e591ee522859bc3e7c1093ff575fd0e6
+SHA1 (patch-ba) = 8ca93fac990ffd1a7deb8202c5eb17670faeaca7
+SHA1 (patch-bb) = d5c85e249099d11fc8ea14a49a98481e514a4634
diff --git a/devel/unproven-pthreads/patches/patch-ac b/devel/unproven-pthreads/patches/patch-ac
index 500c10cc35d..35e673652b0 100644
--- a/devel/unproven-pthreads/patches/patch-ac
+++ b/devel/unproven-pthreads/patches/patch-ac
@@ -1,6 +1,6 @@
-$NetBSD: patch-ac,v 1.1 2000/12/28 03:56:53 wiz Exp $
+$NetBSD: patch-ac,v 1.2 2002/04/13 12:53:41 fredb Exp $
---- config/configure.in.orig Tue Dec 26 23:43:07 2000
+--- config/configure.in.orig Mon Jul 10 14:03:06 2000
+++ config/configure.in
@@ -83,7 +83,7 @@
@@ -11,3 +11,52 @@ $NetBSD: patch-ac,v 1.1 2000/12/28 03:56:53 wiz Exp $
name=alpha-netbsd-1.3
except="fork lseek ftruncate pipe fstat"
available_syscalls="sigsuspend sigaction sigprocmask"
+@@ -97,6 +97,13 @@
+ ;;
+ changequote([,])dnl
+ changequote(,)dnl
++ powerpc-*-netbsd1.*)
++ name=powerpc-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigprocmask sigaction sigsuspend"
++ ;;
++changequote([,])dnl
++changequote(,)dnl
+ sparc-*-netbsd1.4*)
+ name=sparc-netbsd-1.3
+ except="fork lseek ftruncate pipe fstat"
+@@ -104,6 +111,13 @@
+ ;;
+ changequote([,])dnl
+ changequote(,)dnl
++ sparc-*-netbsd1.5*)
++ name=sparc-netbsd-1.3
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigprocmask sigaction sigsuspend"
++ ;;
++changequote([,])dnl
++changequote(,)dnl
+ i386-*-netbsd1.4*)
+ # CFLAGS="$CFLAGS -Werror"
+ name=i386-netbsd-1.3
+@@ -121,6 +135,20 @@
+ changequote([,])dnl
+ changequote(,)dnl
+ m68*-*-netbsd1.4*)
++ name=m68000-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigsuspend sigaction sigprocmask"
++ ;;
++changequote([,])dnl
++changequote(,)dnl
++ m68*-*-netbsd1.5*)
++ name=m68000-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigsuspend sigaction sigprocmask"
++ ;;
++changequote([,])dnl
++changequote(,)dnl
++ m68*-*-netbsd1.6*)
+ name=m68000-netbsd
+ except="fork lseek ftruncate pipe fstat"
+ available_syscalls="sigsuspend sigaction sigprocmask"
diff --git a/devel/unproven-pthreads/patches/patch-af b/devel/unproven-pthreads/patches/patch-af
index eb6cf2a3c7f..1d928b52afd 100644
--- a/devel/unproven-pthreads/patches/patch-af
+++ b/devel/unproven-pthreads/patches/patch-af
@@ -1,6 +1,6 @@
-$NetBSD: patch-af,v 1.1 2000/12/28 03:56:54 wiz Exp $
+$NetBSD: patch-af,v 1.2 2002/04/13 12:53:41 fredb Exp $
---- config/configure.orig Mon Jul 10 15:03:06 2000
+--- config/configure.orig Mon Jul 10 14:03:06 2000
+++ config/configure
@@ -1151,7 +1151,7 @@
name=$host_cpu-$host_os
@@ -11,3 +11,42 @@ $NetBSD: patch-af,v 1.1 2000/12/28 03:56:54 wiz Exp $
name=alpha-netbsd-1.3
except="fork lseek ftruncate pipe fstat"
available_syscalls="sigsuspend sigaction sigprocmask"
+@@ -1161,11 +1161,21 @@
+ except="fork lseek ftruncate pipe fstat"
+ available_syscalls="sigsuspend sigaction sigprocmask"
+ ;;
++ powerpc-*-netbsd1.*)
++ name=powerpc-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigprocmask sigaction sigsuspend"
++ ;;
+ sparc-*-netbsd1.4*)
+ name=sparc-netbsd-1.3
+ except="fork lseek ftruncate pipe fstat"
+ available_syscalls="sigprocmask sigaction sigsuspend"
+ ;;
++ sparc-*-netbsd1.5*)
++ name=sparc-netbsd-1.3
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigprocmask sigaction sigsuspend"
++ ;;
+ i386-*-netbsd1.4*)
+ # CFLAGS="$CFLAGS -Werror"
+ name=i386-netbsd-1.3
+@@ -1179,6 +1189,16 @@
+ available_syscalls="sigsuspend sigaction sigprocmask"
+ ;;
+ m68*-*-netbsd1.4*)
++ name=m68000-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigsuspend sigaction sigprocmask"
++ ;;
++ m68*-*-netbsd1.5*)
++ name=m68000-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigsuspend sigaction sigprocmask"
++ ;;
++ m68*-*-netbsd1.6*)
+ name=m68000-netbsd
+ except="fork lseek ftruncate pipe fstat"
+ available_syscalls="sigsuspend sigaction sigprocmask"
diff --git a/devel/unproven-pthreads/patches/patch-aj b/devel/unproven-pthreads/patches/patch-aj
deleted file mode 100644
index 118aa21c634..00000000000
--- a/devel/unproven-pthreads/patches/patch-aj
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aj,v 1.2 2001/04/12 15:53:31 skrll Exp $
-
---- config/configure.orig Thu Apr 12 09:04:07 2001
-+++ config/configure
-@@ -1161,7 +1161,17 @@
- except="fork lseek ftruncate pipe fstat"
- available_syscalls="sigsuspend sigaction sigprocmask"
- ;;
-+ powerpc-*-netbsd1.*)
-+ name=powerpc-netbsd
-+ except="fork lseek ftruncate pipe fstat"
-+ available_syscalls="sigprocmask sigaction sigsuspend"
-+ ;;
- sparc-*-netbsd1.4*)
-+ name=sparc-netbsd-1.3
-+ except="fork lseek ftruncate pipe fstat"
-+ available_syscalls="sigprocmask sigaction sigsuspend"
-+ ;;
-+ sparc-*-netbsd1.5*)
- name=sparc-netbsd-1.3
- except="fork lseek ftruncate pipe fstat"
- available_syscalls="sigprocmask sigaction sigsuspend"
diff --git a/devel/unproven-pthreads/patches/patch-ak b/devel/unproven-pthreads/patches/patch-ak
deleted file mode 100644
index 9710fb316ba..00000000000
--- a/devel/unproven-pthreads/patches/patch-ak
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-ak,v 1.2 2001/04/12 15:53:31 skrll Exp $
-
---- config/configure.in.orig Thu Apr 12 08:59:55 2001
-+++ config/configure.in
-@@ -97,7 +97,21 @@
- ;;
- changequote([,])dnl
- changequote(,)dnl
-+ powerpc-*-netbsd1.*)
-+ name=powerpc-netbsd
-+ except="fork lseek ftruncate pipe fstat"
-+ available_syscalls="sigprocmask sigaction sigsuspend"
-+ ;;
-+changequote([,])dnl
-+changequote(,)dnl
- sparc-*-netbsd1.4*)
-+ name=sparc-netbsd-1.3
-+ except="fork lseek ftruncate pipe fstat"
-+ available_syscalls="sigprocmask sigaction sigsuspend"
-+ ;;
-+changequote([,])dnl
-+changequote(,)dnl
-+ sparc-*-netbsd1.5*)
- name=sparc-netbsd-1.3
- except="fork lseek ftruncate pipe fstat"
- available_syscalls="sigprocmask sigaction sigsuspend"
diff --git a/devel/unproven-pthreads/patches/patch-aq b/devel/unproven-pthreads/patches/patch-aq
index 407453409b0..93f81617016 100644
--- a/devel/unproven-pthreads/patches/patch-aq
+++ b/devel/unproven-pthreads/patches/patch-aq
@@ -1,16 +1,17 @@
-$NetBSD: patch-aq,v 1.1 2001/03/23 15:57:46 agc Exp $
+$NetBSD: patch-aq,v 1.2 2002/04/13 12:53:42 fredb Exp $
-Patch from Wofgang Solfrank:
-
-The changes to unproven-pthreads fix a problem with fstat not using
-the pthreads filedescriptors, but the native ones (the code for this
-was already there (slightly buggy), but it wasn't used for some
-unknown reason). In addition, the handling of select is improved, as
-the original code may wake up not all threads waiting for some event.
-
---- pthreads/stat.c.orig Sat Nov 6 23:30:50 1999
-+++ pthreads/stat.c Fri Mar 23 15:43:59 2001
-@@ -54,7 +54,7 @@
+--- pthreads/stat.c.orig Sat Nov 6 17:30:50 1999
++++ pthreads/stat.c
+@@ -44,6 +44,8 @@
+
+ struct stat;
+
++int fstat(int, struct stat *);
++
+ /* ==========================================================================
+ * fstat()
+ *
+@@ -54,7 +56,7 @@
int ret;
if ((ret = fd_lock(fd, FD_READ, NULL)) == OK) {
@@ -19,7 +20,7 @@ the original code may wake up not all threads waiting for some event.
SET_ERRNO(-ret);
ret = NOTOK;
}
-@@ -63,6 +63,7 @@
+@@ -63,6 +65,7 @@
return(ret);
}
@@ -27,7 +28,7 @@ the original code may wake up not all threads waiting for some event.
/* ==========================================================================
* stat()
*/
-@@ -92,4 +93,4 @@
+@@ -92,4 +95,4 @@
return(ret);
}
diff --git a/devel/unproven-pthreads/patches/patch-ax b/devel/unproven-pthreads/patches/patch-ax
new file mode 100644
index 00000000000..7037601842c
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-ax
@@ -0,0 +1,148 @@
+$NetBSD: patch-ax,v 1.1 2002/04/13 12:53:42 fredb Exp $
+
+--- machdep/engine-m68000-netbsd.c.orig Fri Dec 10 12:40:41 1999
++++ machdep/engine-m68000-netbsd.c
+@@ -46,7 +46,6 @@
+ #endif
+
+-#include "pthread.h"
++#include <pthread.h>
+ #include <sys/syscall.h>
+-#include <sys/stat.h>
+
+ /* ==========================================================================
+@@ -67,5 +66,5 @@
+
+ /* ==========================================================================
+- * machdep_save_state()
++ * machdep_save_float_state()
+ */
+ void machdep_save_float_state(struct pthread * pthread)
+@@ -73,6 +72,6 @@
+ char * fdata = pthread->machdep_data.machdep_fstate;
+
+- __asm__ ( "fmovem fp0-fp7,%0"::"m" (*fdata) );
+- __asm__ ( "fmovem fpcr/fpsr/fpi,%0"::"m" (fdata[80]) );
++ __asm__ ( "fmovem %%fp0-%%fp7,%0"::"m" (*fdata) );
++ __asm__ ( "fmovem %%fpcr/%%fpsr/%%fpi,%0"::"m" (fdata[80]) );
+ }
+
+@@ -84,17 +83,6 @@
+ char * fdata = pthread_run->machdep_data.machdep_fstate;
+
+- __asm__ ( "fmovem %0,fp0-fp7"::"m" (*fdata) );
+- __asm__ ( "fmovem %0,fpcr/fpsr/fpi"::"m" (fdata[80]) );
+-
+-}
+-
+-/* ==========================================================================
+- * machdep_set_thread_timer()
+- */
+-void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread)
+-{
+- if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) {
+- PANIC("setitimer failed");
+- }
++ __asm__ ( "fmovem %0,%%fp0-%%fp7"::"m" (*fdata) );
++ __asm__ ( "fmovem %0,%%fpcr/%%fpsr/%%fpi"::"m" (fdata[80]) );
+ }
+
+@@ -112,30 +100,4 @@
+
+ /* ==========================================================================
+- * __machdep_stack_free()
+- */
+-void __machdep_stack_free(void * stack)
+-{
+- free(stack);
+-}
+-
+-/* ==========================================================================
+- * __machdep_stack_alloc()
+- */
+-void * __machdep_stack_alloc(size_t size)
+-{
+- void * stack;
+-
+- return((void*)malloc(size));
+-}
+-
+-/* ==========================================================================
+- * machdep_pthread_cleanup()
+- */
+-void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread)
+-{
+- return(machdep_pthread->machdep_stack);
+-}
+-
+-/* ==========================================================================
+ * machdep_pthread_start()
+ */
+@@ -172,5 +134,5 @@
+ */
+ void __machdep_pthread_create(struct machdep_pthread *machdep_pthread,
+- void *(* start_routine)(), void *start_argument,
++ void *(* start_routine)(void *), void *start_argument,
+ long stack_size, long nsec, long flags)
+ {
+@@ -207,38 +169,4 @@
+
+ /* ==========================================================================
+- * machdep_sys_wait3()
+- */
+-machdep_sys_wait3(int * b, int c, int * d)
+-{
+- return(machdep_sys_wait4(0, b, c, d));
+-}
+-
+-/* ==========================================================================
+- * machdep_sys_waitpid()
+- */
+-machdep_sys_waitpid(int a, int * b, int c)
+-{
+- return(machdep_sys_wait4(a, b, c, NULL));
+-}
+-
+-/* ==========================================================================
+- * machdep_sys_getdtablesize()
+- */
+-machdep_sys_getdtablesize()
+-{
+- return(sysconf(_SC_OPEN_MAX));
+-}
+-
+-/* ==========================================================================
+- * machdep_sys_getdirentries()
+- */
+-machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
+-{
+- return(machdep_sys_getdents(fd, buf, len));
+-}
+-
+-extern off_t __syscall();
+-
+-/* ==========================================================================
+ * machdep_sys_lseek()
+ */
+@@ -248,5 +176,8 @@
+ }
+
+-int machdep_sys_ftruncate( int fd, off_t length)
++/* ==========================================================================
++ * machdep_sys_ftruncate()
++ */
++int machdep_sys_ftruncate(int fd, off_t length)
+ {
+ quad_t q;
+@@ -263,6 +194,9 @@
+ }
+
+-int machdep_sys_fstat( int f, struct stat* st )
++/* ==========================================================================
++ * machdep_sys_fstat()
++ */
++int machdep_sys_fstat(int f, struct stat* st)
+ {
+- return __fstat13(f,st);
++ return(__syscall((quad_t)SYS___fstat13, f, st));
+ }
diff --git a/devel/unproven-pthreads/patches/patch-ay b/devel/unproven-pthreads/patches/patch-ay
new file mode 100644
index 00000000000..9300504b618
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-ay
@@ -0,0 +1,93 @@
+$NetBSD: patch-ay,v 1.1 2002/04/13 12:53:42 fredb Exp $
+
+--- machdep/syscall-m68000-netbsd.S.orig Sat Nov 6 17:33:04 1999
++++ machdep/syscall-m68000-netbsd.S Thu Apr 11 11:47:10 2002
+@@ -10,10 +10,10 @@
+ #ifdef __STDC__
+ #define IMM #
+ #define SYSCALL(x) .even; ENTRY(machdep_sys_ ## x); \
+- movl IMM SYS_ ## x,d0; trap IMM 0; jcs err; rts
++ movl IMM SYS_ ## x,%d0; trap IMM 0; jcs err; rts
+ #else /* !__STDC__ */
+ #define SYSCALL(x) .even; ENTRY(machdep_sys_/**/x); \
+- movl #SYS_/**/x,d0; trap #0; jcs err; rts
++ movl #SYS_/**/x,%d0; trap #0; jcs err; rts
+ #endif /* !__STDC__ */
+
+ /*
+@@ -29,7 +29,7 @@
+ */
+
+ err:
+- negl d0
++ negl %d0
+ rts
+
+ /* ==========================================================================
+@@ -37,47 +37,47 @@
+ */
+ .even
+ ENTRY(machdep_sys_pipe);
+- movl #SYS_pipe,d0
++ movl #SYS_pipe,%d0
+ trap #0
+ jcs err
+- movl sp@(4),a0
+- movl d0,a0@+
+- movl d1,a0@
+- clrl d0
++ movl %sp@(4),%a0
++ movl %d0,%a0@+
++ movl %d1,%a0@
++ clrl %d0
+ rts
+
+ #ifndef SYS___sigsuspend14
+ .even
+ ENTRY(machdep_sys_sigsuspend)
+- movl sp@(4),a0
+- movl a0@,sp@(4)
+- movl #SYS_sigsuspend,d0
++ movl %sp@(4),%a0
++ movl %a0@,%sp@(4)
++ movl #SYS_sigsuspend,%d0
+ trap #0
+ jcs err
+- clrl d0
++ clrl %d0
+ rts
+ #endif
+
+ #ifndef SYS___sigprocmask14
+ .even
+ ENTRY(machdep_sys_sigprocmask)
+- tstl sp@(8)
++ tstl %sp@(8)
+ jne gotptr
+-/* movl #0,sp@(8) /* null mask pointer; block empty set */
+- movl #1,sp@(4)
++/* movl #0,%sp@(8) /* null mask pointer; block empty set */
++ movl #1,%sp@(4)
+ jra doit
+ gotptr:
+- movl sp@(8),a0
+- movl a0@,sp@(8)
++ movl %sp@(8),%a0
++ movl %a0@,%sp@(8)
+ doit:
+- movl #SYS_sigprocmask,d0
++ movl #SYS_sigprocmask,%d0
+ trap #0
+ jcs err
+- tstl sp@(12)
++ tstl %sp@(12)
+ jeq out
+- movl sp@(12),a0
+- movl d0,a0@
++ movl %sp@(12),%a0
++ movl %d0,%a0@
+ out:
+- clrl d0
++ clrl %d0
+ rts
+ #endif
diff --git a/devel/unproven-pthreads/patches/patch-az b/devel/unproven-pthreads/patches/patch-az
new file mode 100644
index 00000000000..a57d2fc455f
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-az
@@ -0,0 +1,29 @@
+$NetBSD: patch-az,v 1.1 2002/04/13 12:53:42 fredb Exp $
+
+--- machdep/syscall-template-m68000-netbsd.S.orig Sat Nov 6 17:33:04 1999
++++ machdep/syscall-template-m68000-netbsd.S Thu Apr 11 11:44:35 2002
+@@ -13,13 +13,13 @@
+ #define IMM #
+ #define SYSCALL(x) .even; \
+ ENTRY(machdep_sys_ ## x); \
+- movl IMM SYS_ ## x,d0; \
++ movl IMM SYS_ ## x,%d0; \
+ trap IMM 0; \
+ jcs err; \
+ rts
+ #else /* !__STDC__ */
+ #define SYSCALL(x) .even; ENTRY(machdep_sys_/**/x); \
+- movl #SYS_/**/x,d0; trap #0; jcs err; rts
++ movl #SYS_/**/x,%d0; trap #0; jcs err; rts
+ #endif /* !__STDC__ */
+
+ /*
+@@ -35,7 +35,7 @@
+ */
+
+ err:
+- negl d0
++ negl %d0
+ rts
+
+ #define XSYSCALL(NAME) SYSCALL(NAME)
diff --git a/devel/unproven-pthreads/patches/patch-ba b/devel/unproven-pthreads/patches/patch-ba
new file mode 100644
index 00000000000..45c3cc7da65
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-ba
@@ -0,0 +1,21 @@
+$NetBSD: patch-ba,v 1.1 2002/04/13 12:53:43 fredb Exp $
+
+--- include/pthread/kernel.h.orig Mon Jul 10 13:23:15 2000
++++ include/pthread/kernel.h
+@@ -93,14 +93,14 @@
+ int fd_check_entry(unsigned int);
+ int fd_allocate(void);
+
++struct fd_table_entry *fd_free(int);
++
+ void fd_basic_unlock(int, int);
+ void fd_basic_basic_unlock(struct fd_table_entry *, int);
+ int fd_basic_lock(unsigned int, int, pthread_mutex_t *, struct timespec *);
+
+ int fd_lock(unsigned int, int, struct timespec *);
+ void fd_unlock(int, int);
+-
+-struct fd_table_entry *fd_free(int);
+
+ ssize_t read_timedwait(int, void *, size_t, struct timespec *);
+ int readv_timedwait(int, const struct iovec *, int, struct timespec *);
diff --git a/devel/unproven-pthreads/patches/patch-bb b/devel/unproven-pthreads/patches/patch-bb
new file mode 100644
index 00000000000..599e29171e7
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-bb
@@ -0,0 +1,119 @@
+$NetBSD: patch-bb,v 1.1 2002/04/13 12:53:43 fredb Exp $
+
+--- machdep/engine-m68000-netbsd.h.orig Fri Nov 12 15:02:41 1999
++++ machdep/engine-m68000-netbsd.h
+@@ -10,7 +10,13 @@
+
+ #include <unistd.h>
+ #include <setjmp.h>
++#include <stdlib.h>
+ #include <sys/time.h>
++#include <sys/types.h>
++#include <sys/wait.h>
++#include <sys/resource.h>
++
++#include <pthread/sysfunc.h>
+
+ /*
+ * The first machine dependent functions are the SEMAPHORES
+@@ -70,7 +76,7 @@
+ * For initial thread only.
+ */
+ #define MACHDEP_PTHREAD_INIT \
+-{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 }
++ { NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, { 0 }, { 0 } }
+
+ /*
+ * New functions
+@@ -90,17 +96,86 @@
+ #ifndef __machdep_stack_repl
+ #define __machdep_stack_repl(x, y) \
+ { \
+- if (stack = __machdep_stack_get(x)) { \
++ if ((stack = __machdep_stack_get(x))) { \
+ __machdep_stack_free(stack); \
+ } \
+ __machdep_stack_set(x, y); \
+ }
+ #endif
+
+-void * __machdep_stack_alloc(size_t);
+-void __machdep_stack_free(void *);
+-
+-int machdep_save_state(void);
++/* ==========================================================================
++ * machdep_set_thread_timer()
++ */
++static inline
++void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread)
++{
++ if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) {
++ PANIC("setitimer failed");
++ }
++}
++
++/* ==========================================================================
++ * __machdep_stack_alloc()
++ */
++static inline
++void * __machdep_stack_alloc(size_t size)
++{
++ return((void*)malloc(size));
++}
++
++/* ==========================================================================
++ * __machdep_stack_free()
++ */
++static inline
++void __machdep_stack_free(void * stack)
++{
++ free(stack);
++}
++
++/* ==========================================================================
++ * machdep_pthread_cleanup()
++ */
++static inline
++void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread)
++{
++ return(machdep_pthread->machdep_stack);
++}
++
++/* ==========================================================================
++ * machdep_sys_wait3()
++ */
++static inline
++int machdep_sys_wait3(int * b, int c, struct rusage * d)
++{
++ return(machdep_sys_wait4(0, b, c, d));
++}
++
++/* ==========================================================================
++ * machdep_sys_waitpid()
++ */
++static inline
++int machdep_sys_waitpid(int a, int * b, int c)
++{
++ return(machdep_sys_wait4(a, b, c, NULL));
++}
++
++/* ==========================================================================
++ * machdep_sys_getdtablesize()
++ */
++static inline
++int machdep_sys_getdtablesize(void)
++{
++ return(sysconf(_SC_OPEN_MAX));
++}
++
++/* ==========================================================================
++ * machdep_sys_getdirentries()
++ */
++static inline
++int machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
++{
++ return(machdep_sys_getdents(fd, buf, len));
++}
+
+ #endif
+