diff options
author | bad <bad@pkgsrc.org> | 1998-10-28 18:18:07 +0000 |
---|---|---|
committer | bad <bad@pkgsrc.org> | 1998-10-28 18:18:07 +0000 |
commit | 7ebfab5050743136225d5aafcfcf0327c73be1b4 (patch) | |
tree | 9421ff816fae905be5fe92fe8a15540b0f8ee80a /databases | |
parent | 2c9eabaebc05f2c3aa0ee2e9b4709f0b9347d139 (diff) | |
download | pkgsrc-7ebfab5050743136225d5aafcfcf0327c73be1b4.tar.gz |
Update to mysql-3.21.33.b
Update mit-pthreads for 1.3H signal changes on alpha and i386.
Update mit-pthreads for 1.3/1.3H on sparc (from 1.1 version).
Enable building the server on sparc.
Add mit-pthreads support for 1.3/1.3H on arm32. (Server doesn't work yet.)
Fix two bugs in mit-pthreads with functions returning off_t's.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/mysql/Makefile | 8 | ||||
-rw-r--r-- | databases/mysql/files/md5 | 4 | ||||
-rw-r--r-- | databases/mysql/patches/patch-ah | 66 | ||||
-rw-r--r-- | databases/mysql/patches/patch-ai | 22 | ||||
-rw-r--r-- | databases/mysql/patches/patch-aj | 13 | ||||
-rw-r--r-- | databases/mysql/patches/patch-ak | 12 | ||||
-rw-r--r-- | databases/mysql/patches/patch-al | 25 | ||||
-rw-r--r-- | databases/mysql/patches/patch-am | 21 | ||||
-rw-r--r-- | databases/mysql/patches/patch-an | 30 | ||||
-rw-r--r-- | databases/mysql/patches/patch-ao | 18 | ||||
-rw-r--r-- | databases/mysql/patches/patch-ap | 111 | ||||
-rw-r--r-- | databases/mysql/patches/patch-aq | 237 | ||||
-rw-r--r-- | databases/mysql/patches/patch-ar | 176 | ||||
-rw-r--r-- | databases/mysql/patches/patch-as | 52 | ||||
-rw-r--r-- | databases/mysql/patches/patch-at | 21 | ||||
-rw-r--r-- | databases/mysql/patches/patch-au | 36 | ||||
-rw-r--r-- | databases/mysql/patches/patch-av | 18 | ||||
-rw-r--r-- | databases/mysql/patches/patch-aw | 107 | ||||
-rw-r--r-- | databases/mysql/patches/patch-ax | 200 | ||||
-rw-r--r-- | databases/mysql/patches/patch-ay | 198 | ||||
-rw-r--r-- | databases/mysql/patches/patch-az | 60 |
21 files changed, 1429 insertions, 6 deletions
diff --git a/databases/mysql/Makefile b/databases/mysql/Makefile index cd4155ab8bb..f6630a70bf8 100644 --- a/databases/mysql/Makefile +++ b/databases/mysql/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.11 1998/10/19 19:02:45 tsarna Exp $ +# $NetBSD: Makefile,v 1.12 1998/10/28 18:18:07 bad Exp $ # # note: if updated, update shlib version number in patch-aa -DISTNAME= mysql-3.21.33 +DISTNAME= mysql-3.21.33b CATEGORIES= databases MASTER_SITES= ftp://ftp.digex.net/pub/database/mysql/Downloads/MySQL-3.21/ \ ftp://ftp.netcasting.net/pub/mysql/Downloads/MySQL-3.21/ @@ -10,7 +10,7 @@ MASTER_SITES= ftp://ftp.digex.net/pub/database/mysql/Downloads/MySQL-3.21/ \ MAINTAINER= packages@netbsd.org HOMEPAGE= http://www.tcx.se/ -CONFLICTS= mysql-3.21.31 mysql-3.21.32a +CONFLICTS= mysql-3.21.31 mysql-3.21.32a mysql-3.21.33 NO_CDROM= "Restrictive license." @@ -35,7 +35,7 @@ pre-install: ${INSTALL_DATA} ${WRKSRC}/Docs/mysql.info ${PREFIX}/info @${CP} ${PKGDIR}/PLIST-client ${PLIST_SRC} -.if (${MACHINE_ARCH} != "i386") && (${MACHINE_ARCH} != "alpha") +.if (${MACHINE_ARCH} != "i386") && (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc") CONFIGURE_ARGS+=--without-server pre-configure: @${ECHO} '########## Client-only support! ##########' diff --git a/databases/mysql/files/md5 b/databases/mysql/files/md5 index c21b1570397..f39772dbd3e 100644 --- a/databases/mysql/files/md5 +++ b/databases/mysql/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.4 1998/08/07 13:17:05 agc Exp $ +$NetBSD: md5,v 1.5 1998/10/28 18:18:08 bad Exp $ -MD5 (mysql-3.21.33.tar.gz) = 64672bebf05fa95f9772303d3b86e40b +MD5 (mysql-3.21.33b.tar.gz) = 6a54652a36831a0e75d4056c69ba1303 diff --git a/databases/mysql/patches/patch-ah b/databases/mysql/patches/patch-ah new file mode 100644 index 00000000000..7a43d41698f --- /dev/null +++ b/databases/mysql/patches/patch-ah @@ -0,0 +1,66 @@ +$NetBSD: patch-ah,v 1.1 1998/10/28 18:18:08 bad Exp $ + +--- mit-pthreads/config/configure.orig Tue Mar 10 10:11:25 1998 ++++ mit-pthreads/config/configure Sun Oct 25 20:33:39 1998 +@@ -1165,6 +1165,12 @@ + name=$host_cpu-$host_os + + case $host in ++ alpha-*-netbsd1.3[H-Z]) ++ name=alpha-netbsd-1.3 ++ sysincludes=netbsd-1.1 ++ except="fork lseek pipe fstat" ++ available_syscalls="sigsuspend sigprocmask" ++ ;; + alpha-*-netbsd1.3*) + name=alpha-netbsd-1.3 + sysincludes=netbsd-1.1 +@@ -1183,6 +1189,17 @@ + CFLAGS="$CFLAGS -std" + fi + ;; ++ arm32-*-netbsd1.3[H-Z]) ++ name=arm32-netbsd-1.3 ++ sysincludes=netbsd-1.1 ++ except="fork pipe lseek ftruncate fstat" ++ available_syscalls="sigsuspend sigprocmask" ++ ;; ++ arm32-*-netbsd1.3*) ++ name=arm32-netbsd-1.3 ++ sysincludes=netbsd-1.1 ++ except="fork pipe lseek ftruncate sigsuspend sigprocmask fstat" ++ ;; + hppa1.0-*-hpux10.20 | hppa1.1-*-hpux10.20) + name=hppa-hpux-10.20 + sysincludes=hpux-10.20 +@@ -1232,6 +1249,17 @@ + EOF + + ;; ++ sparc-*-netbsd1.3[H-Z]) ++ name=sparc-netbsd-1.3 ++ sysincludes=netbsd-1.1 ++ except="pipe fork lseek ftruncate fstat" ++ available_syscalls="sigprocmask sigsuspend" ++ ;; ++ sparc-*-netbsd1.3*) ++ name=sparc-netbsd-1.3 ++ sysincludes=netbsd-1.1 ++ except="pipe fork lseek ftruncate sigprocmask sigsuspend fstat" ++ ;; + sparc-*-netbsd1.0A | sparc-*-netbsd1.1* | sparc-*-netbsd1.2*) + name=sparc-sunos-4.1.3 + sysincludes=netbsd-1.0 +@@ -1256,6 +1284,12 @@ + sysincludes=bsdi-2.0 + syscall=i386-bsdi-2.0 + except="fork lseek ftruncate sigsuspend" ++ ;; ++ i386-*-netbsd1.3[H-Z]) ++ name=i386-netbsd-1.3 ++ sysincludes=netbsd-1.1 ++ except="fork lseek ftruncate pipe fstat" ++ available_syscalls="sigsuspend sigprocmask" + ;; + i386-*-netbsd1.3*) + name=i386-netbsd-1.3 diff --git a/databases/mysql/patches/patch-ai b/databases/mysql/patches/patch-ai new file mode 100644 index 00000000000..d788e8d0b37 --- /dev/null +++ b/databases/mysql/patches/patch-ai @@ -0,0 +1,22 @@ +$NetBSD: patch-ai,v 1.1 1998/10/28 18:18:08 bad Exp $ + +--- mit-pthreads/config/config.sub.orig Fri Jan 23 23:07:31 1998 ++++ mit-pthreads/config/config.sub Sun Oct 25 18:54:55 1998 +@@ -119,7 +119,7 @@ + case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. +- tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ ++ tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm | arm32 | pyramid \ + | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ + | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ + | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ +@@ -133,7 +133,7 @@ + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ +- | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ ++ | sparc-* | ns32k-* | fx80-* | arm-* | arm32-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ + | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ diff --git a/databases/mysql/patches/patch-aj b/databases/mysql/patches/patch-aj new file mode 100644 index 00000000000..e0286f4dde7 --- /dev/null +++ b/databases/mysql/patches/patch-aj @@ -0,0 +1,13 @@ +$NetBSD: patch-aj,v 1.1 1998/10/28 18:18:08 bad Exp $ + +--- mit-pthreads/pthreads/fd.c.orig Tue Jan 13 14:28:04 1998 ++++ mit-pthreads/pthreads/fd.c Sat Oct 24 22:24:28 1998 +@@ -702,7 +702,7 @@ + */ + off_t lseek(int fd, off_t offset, int whence) + { +- int ret; ++ off_t ret; + + if ((ret = fd_lock(fd, FD_RDWR, NULL)) == OK) { + ret = fd_table[fd]->ops->seek(fd_table[fd]->fd, diff --git a/databases/mysql/patches/patch-ak b/databases/mysql/patches/patch-ak new file mode 100644 index 00000000000..0882514900b --- /dev/null +++ b/databases/mysql/patches/patch-ak @@ -0,0 +1,12 @@ +$NetBSD: patch-ak,v 1.1 1998/10/28 18:18:08 bad Exp $ + +--- mit-pthreads/pthreads/fd_kern.c.orig Wed Nov 26 09:43:02 1997 ++++ mit-pthreads/pthreads/fd_kern.c Sat Oct 24 22:37:05 1998 +@@ -575,6 +575,7 @@ + off_t __fd_kern_lseek(union fd_data fd_data, int f, off_t offset, int whence) + { + int fd = fd_data.i; ++ extern off_t machdep_sys_lseek(int, off_t, int); + off_t ret=machdep_sys_lseek(fd, offset, whence); + if ((long) ret < 0L && (long) ret >= -255L) + { diff --git a/databases/mysql/patches/patch-al b/databases/mysql/patches/patch-al new file mode 100644 index 00000000000..640553f8643 --- /dev/null +++ b/databases/mysql/patches/patch-al @@ -0,0 +1,25 @@ +$NetBSD $ + +--- mit-pthreads/machdep/netbsd-1.1/__signal.h.orig Tue Apr 23 08:11:39 1996 ++++ mit-pthreads/machdep/netbsd-1.1/__signal.h Sat Oct 17 21:41:52 1998 +@@ -1,8 +1,20 @@ + #include <sys/signal.h> + ++#if NSIG <= 32 + #define __SIGEMPTYSET 0 + #define __SIGFILLSET 0xffffffff + #define __SIGADDSET(s, n) (*(s) |= 1 << ((n) - 1), 0) + #define __SIGDELSET(s, n) (*(s) &= ~(1 << ((n) - 1)), 0) + #define __SIGISMEMBER(s, n) ((*(s) & (1 << ((n) - 1))) != 0) + ++#else /* XXX Netbsd >= 1.3H */ ++#define __SIGEMPTYSET { 0, 0, 0, 0} ++#define __SIGFILLSET { 0xffffffff, 0xffffffff, \ ++ 0xffffffff, 0xffffffff } ++#define __SIGMASK(n) (1 << (((n) - 1) & 31)) ++#define __SIGWORD(n) (((n) - 1) >> 5) ++#define __SIGADDSET(s, n) ((s)->__bits[__SIGWORD(n)] |= __SIGMASK(n)) ++#define __SIGDELSET(s, n) ((s)->__bits[__SIGWORD(n)] &= ~__SIGMASK(n)) ++#define __SIGISMEMBER(s, n) (((s)->__bits[__SIGWORD(n)] & __SIGMASK(n)) != 0) ++ ++#endif diff --git a/databases/mysql/patches/patch-am b/databases/mysql/patches/patch-am new file mode 100644 index 00000000000..b9036730be2 --- /dev/null +++ b/databases/mysql/patches/patch-am @@ -0,0 +1,21 @@ +$NetBSD: patch-am,v 1.1 1998/10/28 18:18:08 bad Exp $ + +--- mit-pthreads/machdep/engine-alpha-netbsd-1.3.h.orig Mon Mar 9 11:30:59 1998 ++++ mit-pthreads/machdep/engine-alpha-netbsd-1.3.h Thu Oct 22 18:24:17 1998 +@@ -10,6 +10,7 @@ + #include <setjmp.h> + #include <sys/time.h> + #include <sys/cdefs.h> ++#include <sys/signal.h> /* for _NSIG */ + + /* The first machine dependent functions are the SEMAPHORES needing + the test and set instruction. +@@ -46,7 +47,7 @@ + * sigset_t macros + */ + #define SIG_ANY(sig) (sig) +-#define SIGMAX 31 ++#define SIGMAX (_NSIG-1) + + /* + * New Strutures diff --git a/databases/mysql/patches/patch-an b/databases/mysql/patches/patch-an new file mode 100644 index 00000000000..2a060daf61a --- /dev/null +++ b/databases/mysql/patches/patch-an @@ -0,0 +1,30 @@ +$NetBSD: patch-an,v 1.1 1998/10/28 18:18:08 bad Exp $ + +--- mit-pthreads/machdep/syscall-alpha-netbsd-1.3.S.orig Mon Mar 9 11:30:59 1998 ++++ mit-pthreads/machdep/syscall-alpha-netbsd-1.3.S Mon Oct 19 21:25:47 1998 +@@ -72,6 +72,7 @@ + RET + .end machdep_sys_pipe + ++#ifndef SYS___sigsuspend14 + /* The sigsuspend system call is special... */ + .align 4 + .globl machdep_sys_sigsuspend +@@ -83,7 +84,9 @@ + mov zero, v0 /* shouldn't need; just in case... */ + RET + .end machdep_sys_sigsuspend ++#endif /* SYS_sigsuspend14 */ + ++#ifndef SYS___sigprocmask14 + /* The sigprocmask system call is special... */ + .align 4 + .globl machdep_sys_sigprocmask +@@ -100,6 +103,7 @@ + Lret: mov zero, v0 + RET + .end machdep_sys_sigprocmask ++#endif /* SYS_sigprocmask14 */ + + /* More stuff ... */ + .align 4 diff --git a/databases/mysql/patches/patch-ao b/databases/mysql/patches/patch-ao new file mode 100644 index 00000000000..688afbaaf63 --- /dev/null +++ b/databases/mysql/patches/patch-ao @@ -0,0 +1,18 @@ +$NetBSD: patch-ao,v 1.1 1998/10/28 18:18:08 bad Exp $ + +--- mit-pthreads/machdep/syscall-template-alpha-netbsd-1.3.S.orig Mon Mar 9 11:30:59 1998 ++++ mit-pthreads/machdep/syscall-template-alpha-netbsd-1.3.S Mon Oct 19 21:24:36 1998 +@@ -3,6 +3,13 @@ + #include <sys/syscall.h> + #define CHMK() call_pal 0x83 + ++#ifdef SYS___sigsuspend14 ++#define SYS_sigsuspend SYS___sigsuspend14 ++#endif ++#ifdef SYS___sigprocmask14 ++#define SYS_sigprocmask SYS___sigprocmask14 ++#endif ++ + #undef SYSCALL + + /* Kernel syscall interface: diff --git a/databases/mysql/patches/patch-ap b/databases/mysql/patches/patch-ap new file mode 100644 index 00000000000..9b197162cda --- /dev/null +++ b/databases/mysql/patches/patch-ap @@ -0,0 +1,111 @@ +$NetBSD: patch-ap,v 1.1 1998/10/28 18:18:08 bad Exp $ + +--- /dev/null Thu Oct 22 03:18:30 1998 ++++ mit-pthreads/machdep/engine-sparc-netbsd-1.3.h Thu Oct 22 18:29:44 1998 +@@ -0,0 +1,106 @@ ++/* ==== machdep.h ============================================================ ++ * Copyright (c) 1994 Chris Provenzano, proven@athena.mit.edu ++ * ++ * engine-sparc-sunos-4.1.3.h,v 1.52.4.1 1995/12/13 05:42:33 proven Exp ++ * ++ */ ++ ++#include <unistd.h> ++#include <setjmp.h> ++#include <sys/time.h> ++#include <sys/cdefs.h> ++#include <sys/signal.h> /* for _NSIG */ ++ ++/* ++ * The first machine dependent functions are the SEMAPHORES ++ * needing the test and set instruction. ++ */ ++#define SEMAPHORE_CLEAR 0 ++#define SEMAPHORE_SET 0xff ++ ++#define SEMAPHORE_TEST_AND_SET(lock) \ ++({ \ ++char *p = lock; \ ++long temp; \ ++ \ ++__asm__ volatile("ldstub %1,%0" \ ++ :"=r" (temp) \ ++ :"m" (*p) \ ++ :"memory"); \ ++temp; \ ++}) ++ ++#define SEMAPHORE_RESET(lock) \ ++{ \ ++__asm__ volatile("stb %1, %0" \ ++ :"=m" (*lock) \ ++ :"r" (SEMAPHORE_CLEAR) \ ++ :"memory"); \ ++} ++ ++/* ++ * New types ++ */ ++typedef char semaphore; ++ ++/* ++ * sigset_t macros ++ */ ++#define SIG_ANY(sig) (sig) ++#define SIGMAX (_NSIG-1) ++ ++/* ++ * New Strutures ++ */ ++struct machdep_pthread { ++ void *(*start_routine)(void *); ++ void *start_argument; ++ void *machdep_stack; ++ struct itimerval machdep_timer; ++ jmp_buf machdep_state; ++}; ++ ++/* ++ * Static machdep_pthread initialization values. ++ * For initial thread only. ++ */ ++#define MACHDEP_PTHREAD_INIT \ ++{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 } ++ ++/* ++ * Minimum stack size ++ */ ++#define PTHREAD_STACK_MIN 1024 ++ ++/* ++ * Some fd flag defines that are necessary to distinguish between posix ++ * behavior and bsd4.3 behavior. ++ */ ++#define __FD_NONBLOCK (O_NONBLOCK | O_NDELAY) ++ ++/* ++ * New functions ++ */ ++ ++__BEGIN_DECLS ++ ++#if defined(PTHREAD_KERNEL) ++ ++#define __machdep_stack_get(x) (x)->machdep_stack ++#define __machdep_stack_set(x, y) (x)->machdep_stack = y ++#define __machdep_stack_repl(x, y) \ ++{ \ ++ if (stack = __machdep_stack_get(x)) { \ ++ __machdep_stack_free(stack); \ ++ } \ ++ __machdep_stack_set(x, y); \ ++} ++ ++void * __machdep_stack_alloc __P_((size_t)); ++void __machdep_stack_free __P_((void *)); ++ ++int machdep_save_state __P_((void)); ++ ++#endif ++ ++__END_DECLS diff --git a/databases/mysql/patches/patch-aq b/databases/mysql/patches/patch-aq new file mode 100644 index 00000000000..b53f4daa498 --- /dev/null +++ b/databases/mysql/patches/patch-aq @@ -0,0 +1,237 @@ +$NetBSD: patch-aq,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- /dev/null Sun Oct 25 03:18:33 1998 ++++ mit-pthreads/machdep/engine-sparc-netbsd-1.3.c Sun Oct 25 18:26:20 1998 +@@ -0,0 +1,232 @@ ++/* ==== machdep.c ============================================================ ++ * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu ++ * ++ * Description : Machine dependent functions for SunOS-4.1.3 on sparc ++ * ++ * 1.00 93/08/04 proven ++ * -Started coding this file. ++ * ++ * 98/10/22 bad ++ * -update for fat sigset_t in NetBSD 1.3H ++ */ ++ ++#ifndef lint ++static const char rcsid[] = "$Id: patch-aq,v 1.1 1998/10/28 18:18:09 bad Exp $"; ++#endif ++ ++#include "config.h" ++#include <pthread.h> ++#include <stdlib.h> ++#include <errno.h> ++ ++/* ========================================================================== ++ * machdep_save_state() ++ */ ++int machdep_save_state(void) ++{ ++ /* Save register windows onto stackframe */ ++ __asm__ ("ta 3"); ++ ++ return(setjmp(pthread_run->machdep_data.machdep_state)); ++} ++ ++/* ========================================================================== ++ * machdep_restore_state() ++ */ ++void machdep_restore_state(void) ++{ ++ longjmp(pthread_run->machdep_data.machdep_state, 1); ++} ++/* ========================================================================== ++ * machdep_save_float_state() ++ */ ++void machdep_save_float_state(struct pthread * pthread) ++{ ++ return; ++} ++ ++/* ========================================================================== ++ * machdep_restore_float_state() ++ */ ++void machdep_restore_float_state(void) ++{ ++ return; ++} ++ ++/* ========================================================================== ++ * machdep_set_thread_timer() ++ */ ++void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread) ++{ ++ if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) { ++ PANIC(); ++ } ++} ++ ++/* ========================================================================== ++ * machdep_unset_thread_timer() ++ */ ++void machdep_unset_thread_timer(struct machdep_pthread *machdep_pthread) ++{ ++ struct itimerval zeroval = { { 0, 0 }, { 0, 0} }; ++ ++ if (setitimer(ITIMER_VIRTUAL, &zeroval, NULL)) { ++ PANIC(); ++ } ++} ++ ++/* ========================================================================== ++ * machdep_pthread_cleanup() ++ */ ++void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread) ++{ ++ return(machdep_pthread->machdep_stack); ++} ++ ++/* ========================================================================== ++ * machdep_pthread_start() ++ */ ++void machdep_pthread_start(void) ++{ ++ context_switch_done(); ++ pthread_sched_resume (); ++ ++ /* Run current threads start routine with argument */ ++ pthread_exit(pthread_run->machdep_data.start_routine ++ (pthread_run->machdep_data.start_argument)); ++ ++ /* should never reach here */ ++ PANIC(); ++} ++ ++/* ========================================================================== ++ * __machdep_stack_free() ++ */ ++void __machdep_stack_free(void * stack) ++{ ++ free(stack); ++} ++ ++/* ========================================================================== ++ * __machdep_stack_alloc() ++ */ ++void * __machdep_stack_alloc(size_t size) ++{ ++ void * stack; ++ ++ return(malloc(size)); ++} ++ ++/* ========================================================================== ++ * __machdep_pthread_create() ++ */ ++void __machdep_pthread_create(struct machdep_pthread *machdep_pthread, ++ void *(* start_routine)(), void *start_argument, ++ long stack_size, long nsec, long flags) ++{ ++ machdep_pthread->start_routine = start_routine; ++ machdep_pthread->start_argument = start_argument; ++ ++ machdep_pthread->machdep_timer.it_value.tv_sec = 0; ++ machdep_pthread->machdep_timer.it_interval.tv_sec = 0; ++ machdep_pthread->machdep_timer.it_interval.tv_usec = 0; ++ machdep_pthread->machdep_timer.it_value.tv_usec = nsec / 1000; ++ ++ /* Save register windows onto stackframe */ ++ __asm__ ("ta 3"); ++ ++ setjmp(machdep_pthread->machdep_state); ++ /* ++ * Set up new stact frame so that it looks like it ++ * returned from a longjmp() to the beginning of ++ * machdep_pthread_start(). ++ */ ++ machdep_pthread->machdep_state[3] = (int)machdep_pthread_start; ++ machdep_pthread->machdep_state[4] = (int)machdep_pthread_start; ++ ++ /* Sparc stack starts high and builds down. */ ++ machdep_pthread->machdep_state[2] = ++ (int)machdep_pthread->machdep_stack + stack_size - 1024; ++ machdep_pthread->machdep_state[2] &= ~7; ++ ++} ++ ++#if defined(HAVE_SYSCALL_GETDENTS) ++/* ========================================================================== ++ * machdep_sys_getdirentries() ++ * ++ * Always use getdents in place of getdirentries if possible --proven ++ */ ++int machdep_sys_getdirentries(int fd, char * buf, int len, int * seek) ++{ ++ return(machdep_sys_getdents(fd, buf, len)); ++} ++#endif ++ ++/* ========================================================================== ++ * 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 pid, int * statusp, int options) ++{ ++ if (pid == -1) ++ pid = 0; ++ else if (pid == 0) ++ pid = - getpgrp (); ++ return machdep_sys_wait4 (pid, statusp, options, NULL); ++} ++ ++#if !defined(HAVE_SYSCALL_SIGPROCMASK) ++#if 0 ++/* ========================================================================== ++ * machdep_sys_sigprocmask() ++ * This isn't a real implementation; we can make the assumption that the ++ * pthreads library is not using oset, and that it is always blocking or ++ * unblocking all signals at once. ++ */ ++int machdep_sys_sigprocmask(int how, const sigset_t *set, sigset_t *oset) ++{ ++ switch(how) { ++ case SIG_BLOCK: ++ sigblock(*set); ++ break; ++ case SIG_UNBLOCK: ++ sigsetmask(~*set); ++ break; ++ case SIG_SETMASK: ++ sigsetmask(*set); ++ break; ++ default: ++ return -EINVAL; ++ } ++ return(OK); ++} ++ ++/* ========================================================================== ++ * sigaction() ++ * ++ * Temporary until I do machdep_sys_sigaction() ++ */ ++int sigaction(int sig, const struct sigaction *act, struct sigaction *oldact) ++{ ++ return(sigvec(sig, (struct sigvec *)act, (struct sigvec *)oldact)); ++} ++#endif ++#endif ++ ++#if !defined(HAVE_SYSCALL_GETDTABLESIZE) ++/* ========================================================================== ++ * machdep_sys_getdtablesize() ++ */ ++machdep_sys_getdtablesize() ++{ ++ return(sysconf(_SC_OPEN_MAX)); ++} ++#endif diff --git a/databases/mysql/patches/patch-ar b/databases/mysql/patches/patch-ar new file mode 100644 index 00000000000..65f96d45e15 --- /dev/null +++ b/databases/mysql/patches/patch-ar @@ -0,0 +1,176 @@ +$NetBSD: patch-ar,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- /dev/null Sun Oct 25 03:17:31 1998 ++++ mit-pthreads/machdep/syscall-sparc-netbsd-1.3.S Sat Oct 24 21:39:15 1998 +@@ -0,0 +1,171 @@ ++/* ==== syscall.S ============================================================ ++ * Copyright (c) 1994 Chris Provenzano, proven@mit.edu ++ * All rights reserved. ++ * ++ */ ++ ++#ifndef lint ++ .text ++ .asciz "$Id: patch-ar,v 1.1 1998/10/28 18:18:09 bad Exp $"; ++#endif ++ ++#include <sys/syscall.h> ++ ++#define SYSCALL(x) \ ++ .globl _machdep_sys_##x; \ ++ \ ++_machdep_sys_##x:; \ ++ \ ++ mov SYS_##x, %g1; \ ++ ta 0; \ ++ bcs,a 2b; \ ++ sub %r0,%o0,%o0; \ ++ retl ++ ++ ++/* ++ * Initial asm stuff for all functions. ++ */ ++ .text ++ .align 4 ++ ++/* ========================================================================== ++ * error code for all syscalls. The error value is returned as the negative ++ * of the errno value. ++ */ ++ ++1: ++ sub %r0, %o0, %o0 ++2: ++ retl ++ nop ++ ++/* ========================================================================== ++ * machdep_sys_pipe() ++ */ ++ .globl _machdep_sys_pipe ++ ++_machdep_sys_pipe: ++ mov %o0, %o2 ++ mov SYS_pipe, %g1 ++ ta 0 ++ bcs 1b ++ nop ++ st %o0, [ %o2 ] ++ st %o1, [ %o2 + 4 ] ++ retl ++ mov %g0, %o0 ++ ++/* ========================================================================== ++ * machdep_sys_fork() ++ */ ++ .globl _machdep_sys_fork; ++ ++_machdep_sys_fork:; ++ ++ mov SYS_fork, %g1; ++ ta 0; ++ bcs 1b; ++ nop; ++ dec %o1; ++ retl; ++ and %o0, %o1, %o0; ! return 0 in child, pid in parent ++ ++#ifndef SYS___sigprocmask14 ++/* ========================================================================== ++ * machdep_sys_sigprocmask() ++ */ ++ .globl _machdep_sys_sigprocmask; ++ ++_machdep_sys_sigprocmask:; ++ ++ ld [%o1], %o1; ++ mov SYS_sigprocmask, %g1; ++ ta 0; ++ bcs 1b; ++ nop; ++ retl ++ nop ++#endif ++ ++#ifndef SYS___sigsuspend14 ++/* ========================================================================== ++ * machdep_sys_sigsuspend() ++ */ ++ .globl _machdep_sys_sigsuspend; ++ ++_machdep_sys_sigsuspend:; ++ ++ ld [%o0], %o0; ++ mov SYS_sigsuspend, %g1; ++ ta 0; ++ bcs 1b; ++ nop; ++ retl ++ nop ++#endif ++ ++/* ========================================================================== ++ * machdep_sys_fstat() ++ */ ++ .globl _machdep_sys_fstat; ++ ++_machdep_sys_fstat:; ++ ++ mov SYS___fstat13, %g1; ++ ta 0; ++ bcs 1b; ++ nop; ++ retl ++ nop ++ ++/* ========================================================================== ++ * machdep_sys___syscall() ++ */ ++_machdep_sys___syscall:; ++ ++ mov SYS___syscall, %g1; ++ ta 0; ++ bcs 1b; ++ nop; ++ retl ++ nop ++ ++/* ========================================================================== ++ * machdep_sys_lseek() ++ */ ++ .global _machdep_sys_lseek ++ ++_machdep_sys_lseek: ++ save %sp,-112,%sp ++ mov %i1,%o4 ++ mov %i2,%o5 ++ st %i3,[%sp+92] ++ mov 0,%o0 ++ mov SYS_lseek,%o1 ++ mov %i0,%o2 ++ call _machdep_sys___syscall,0 ++ mov 0,%o3 ++ mov %o0,%i0 ++ mov %o1,%i1 ++ ret ++ restore ++ ++/* ========================================================================== ++ * machdep_sys_ftruncate() ++ */ ++ .global _machdep_sys_ftruncate ++ ++_machdep_sys_ftruncate: ++ save %sp,-104,%sp ++ mov %i1,%o4 ++ mov %i2,%o5 ++ mov 0,%o0 ++ mov SYS_ftruncate,%o1 ++ mov %i0,%o2 ++ call _machdep_sys___syscall,0 ++ mov 0,%o3 ++ mov %o0,%o1 ++ sra %o0,31,%o0 ++ ret ++ restore %g0,%o1,%o0 diff --git a/databases/mysql/patches/patch-as b/databases/mysql/patches/patch-as new file mode 100644 index 00000000000..9775eaefbbc --- /dev/null +++ b/databases/mysql/patches/patch-as @@ -0,0 +1,52 @@ +$NetBSD: patch-as,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- /dev/null Mon Oct 19 22:21:39 1998 ++++ mit-pthreads/machdep/syscall-template-sparc-netbsd-1.3.S Mon Oct 19 22:36:44 1998 +@@ -0,0 +1,47 @@ ++/* ==== syscall.S ============================================================ ++ * Copyright (c) 1994 Chris Provenzano, proven@mit.edu ++ * All rights reserved. ++ * ++ */ ++ ++#include <sys/syscall.h> ++ ++#ifdef SYS___sigsuspend14 ++#define SYS_sigsuspend SYS___sigsuspend14 ++#endif ++#ifdef SYS___sigprocmask14 ++#define SYS_sigprocmask SYS___sigprocmask14 ++#endif ++ ++#define SYSCALL(x) \ ++ .globl _machdep_sys_##x; \ ++ \ ++_machdep_sys_##x:; \ ++ \ ++ mov SYS_##x, %g1; \ ++ ta 0; \ ++ bcs,a 2b; \ ++ sub %r0,%o0,%o0; \ ++ retl; \ ++ nop ++ ++/* ++ * Initial asm stuff for all functions. ++ */ ++ .text ++ .align 4 ++ ++/* ========================================================================== ++ * error code for all syscalls. The error value is returned as the negative ++ * of the errno value. ++ */ ++ ++1: ++ sub %r0, %o0, %o0 ++2: ++ retl ++ nop ++ ++#define XSYSCALL(NAME) SYSCALL(NAME) ++ ++XSYSCALL(SYSCALL_NAME) diff --git a/databases/mysql/patches/patch-at b/databases/mysql/patches/patch-at new file mode 100644 index 00000000000..f1adf4a398b --- /dev/null +++ b/databases/mysql/patches/patch-at @@ -0,0 +1,21 @@ +$NetBSD: patch-at,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- mit-pthreads/machdep/engine-i386-netbsd-1.3.h.orig Mon Mar 2 19:44:34 1998 ++++ mit-pthreads/machdep/engine-i386-netbsd-1.3.h Thu Oct 22 18:24:46 1998 +@@ -8,6 +8,7 @@ + #include <unistd.h> + #include <setjmp.h> + #include <sys/time.h> ++#include <sys/signal.h> /* for _NSIG */ + + /* + * The first machine dependent functions are the SEMAPHORES +@@ -37,7 +38,7 @@ + * sigset_t macros + */ + #define SIG_ANY(sig) (sig) +-#define SIGMAX 31 ++#define SIGMAX (_NSIG-1) + + /* + * New Strutures diff --git a/databases/mysql/patches/patch-au b/databases/mysql/patches/patch-au new file mode 100644 index 00000000000..1ea72973171 --- /dev/null +++ b/databases/mysql/patches/patch-au @@ -0,0 +1,36 @@ +$NetBSD: patch-au,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- mit-pthreads/machdep/syscall-i386-netbsd-1.3.S.orig Mon Mar 2 19:44:34 1998 ++++ mit-pthreads/machdep/syscall-i386-netbsd-1.3.S Mon Oct 19 00:12:26 1998 +@@ -88,6 +88,7 @@ + jb 3f; + ret + ++#ifndef SYS___sigsuspend14 + /* ========================================================================== + * machdep_sys_sigsuspend() + */ +@@ -102,6 +103,7 @@ + int $0x80; + jb 3f; + ret ++#endif + + 3: + +@@ -148,6 +150,7 @@ + leave + ret + ++#ifndef SYS___sigprocmask14 + /* ========================================================================== + * machdep_sys_sigprocmask() + */ +@@ -162,6 +165,7 @@ + int $0x80; + jb 3b; + ret ++#endif + + /* ========================================================================== + * machdep_sys_pipe() diff --git a/databases/mysql/patches/patch-av b/databases/mysql/patches/patch-av new file mode 100644 index 00000000000..c359a0de6bd --- /dev/null +++ b/databases/mysql/patches/patch-av @@ -0,0 +1,18 @@ +$NetBSD: patch-av,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- mit-pthreads/machdep/syscall-template-i386-netbsd-1.3.S.orig Mon Mar 2 19:44:34 1998 ++++ mit-pthreads/machdep/syscall-template-i386-netbsd-1.3.S Mon Oct 19 00:10:09 1998 +@@ -1,6 +1,13 @@ + #include <machine/asm.h> + #include <sys/syscall.h> + ++#ifdef SYS___sigsuspend14 ++#define SYS_sigsuspend SYS___sigsuspend14 ++#endif ++#ifdef SYS___sigprocmask14 ++#define SYS_sigprocmask SYS___sigprocmask14 ++#endif ++ + #ifdef __STDC__ + + #define SYSCALL(x) \ diff --git a/databases/mysql/patches/patch-aw b/databases/mysql/patches/patch-aw new file mode 100644 index 00000000000..70a86e7151a --- /dev/null +++ b/databases/mysql/patches/patch-aw @@ -0,0 +1,107 @@ +$NetBSD: patch-aw,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- /dev/null Thu Oct 22 03:18:30 1998 ++++ mit-pthreads/machdep/engine-arm32-netbsd-1.3.h Thu Oct 22 19:39:30 1998 +@@ -0,0 +1,102 @@ ++/* ==== machdep.h ============================================================ ++ * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu ++ * ++ * Id: engine-i386-netbsd-1.3.h,v 1.1 1998/02/28 04:53:15 cjs Exp ++ * ++ */ ++ ++#include <unistd.h> ++#include <setjmp.h> ++#include <sys/time.h> ++#include <sys/signal.h> /* for _NSIG */ ++ ++/* ++ * The first machine dependent functions are the SEMAPHORES ++ * needing the test and set instruction. ++ */ ++#define SEMAPHORE_CLEAR 0 ++#define SEMAPHORE_SET 1 ++ ++#if 0 ++#define SEMAPHORE_TEST_AND_SET(lock) \ ++({ \ ++long temp = SEMAPHORE_SET; \ ++ \ ++__asm__ volatile ("xchgl %0,(%2)" \ ++ :"=r" (temp) \ ++ :"0" (temp),"r" (lock)); \ ++temp; \ ++}) ++ ++#define SEMAPHORE_RESET(lock) *lock = SEMAPHORE_CLEAR ++#endif ++ ++/* ++ * New types ++ */ ++typedef long semaphore; ++ ++/* ++ * sigset_t macros ++ */ ++#define SIG_ANY(sig) (sig) ++#define SIGMAX (_NSIG-1) ++ ++/* ++ * New Strutures ++ */ ++struct machdep_pthread { ++ void *(*start_routine)(void *); ++ void *start_argument; ++ void *machdep_stack; ++ struct itimerval machdep_timer; ++ jmp_buf machdep_state; ++#if 0 ++ char machdep_float_state[108]; ++#endif ++}; ++ ++/* ++ * Static machdep_pthread initialization values. ++ * For initial thread only. ++ */ ++#define MACHDEP_PTHREAD_INIT \ ++{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 } ++ ++/* ++ * Minimum stack size ++ */ ++#define PTHREAD_STACK_MIN 1024 ++ ++/* ++ * Some fd flag defines that are necessary to distinguish between posix ++ * behavior and bsd4.3 behavior. ++ */ ++#define __FD_NONBLOCK O_NONBLOCK ++ ++/* ++ * New functions ++ */ ++ ++__BEGIN_DECLS ++ ++#if defined(PTHREAD_KERNEL) ++ ++#define __machdep_stack_get(x) (x)->machdep_stack ++#define __machdep_stack_set(x, y) (x)->machdep_stack = y ++#define __machdep_stack_repl(x, y) \ ++{ \ ++ if (stack = __machdep_stack_get(x)) { \ ++ __machdep_stack_free(stack); \ ++ } \ ++ __machdep_stack_set(x, y); \ ++} ++ ++void * __machdep_stack_alloc __P_((size_t)); ++void __machdep_stack_free __P_((void *)); ++ ++int machdep_save_state __P_((void)); ++ ++#endif ++ ++__END_DECLS diff --git a/databases/mysql/patches/patch-ax b/databases/mysql/patches/patch-ax new file mode 100644 index 00000000000..fc35aba858f --- /dev/null +++ b/databases/mysql/patches/patch-ax @@ -0,0 +1,200 @@ +$NetBSD: patch-ax,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- /dev/null Sun Oct 25 03:15:17 1998 ++++ mit-pthreads/machdep/engine-arm32-netbsd-1.3.c Sun Oct 25 18:38:54 1998 +@@ -0,0 +1,195 @@ ++/* ==== machdep.c ============================================================ ++ * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu ++ * ++ * Description : Machine dependent functions for NetBSD on arm32 ++ * ++ * 1.00 93/08/04 proven ++ * -Started coding this file. ++ * ++ * 98/10/22 bad ++ * -adapt from i386 version ++ */ ++ ++#ifndef lint ++static const char rcsid[] = "$Id: patch-ax,v 1.1 1998/10/28 18:18:09 bad Exp $"; ++#endif ++ ++#include <pthread.h> ++#include <sys/types.h> ++#include <sys/socket.h> ++#include <sys/syscall.h> ++#include <stdlib.h> ++#include <fcntl.h> ++#include <stdio.h> ++ ++/* ========================================================================== ++ * machdep_save_state() ++ */ ++int machdep_save_state(void) ++{ ++ return(_setjmp(pthread_run->machdep_data.machdep_state)); ++} ++ ++/* ========================================================================== ++ * machdep_save_state() ++ */ ++int machdep_save_float_state(struct pthread * pthread) ++{ ++ return; ++} ++ ++/* ========================================================================== ++ * machdep_restore_state() ++ */ ++void machdep_restore_state(void) ++{ ++ _longjmp(pthread_run->machdep_data.machdep_state, 1); ++} ++ ++/* ========================================================================== ++ * machdep_restore_float_state() ++ */ ++int machdep_restore_float_state(void) ++{ ++ return; ++} ++ ++/* ========================================================================== ++ * machdep_set_thread_timer() ++ */ ++void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread) ++{ ++ if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) { ++ PANIC(); ++ } ++} ++ ++/* ========================================================================== ++ * machdep_unset_thread_timer() ++ */ ++void machdep_unset_thread_timer(struct machdep_pthread *machdep_pthread) ++{ ++ struct itimerval zeroval = { { 0, 0 }, { 0, 0 } }; ++ int ret; ++ ++ if (machdep_pthread) { ++ ret = setitimer(ITIMER_VIRTUAL, &zeroval, ++ &(machdep_pthread->machdep_timer)); ++ } else { ++ ret = setitimer(ITIMER_VIRTUAL, &zeroval, NULL); ++ } ++ ++ if (ret) { ++ PANIC(); ++ } ++} ++ ++/* ========================================================================== ++ * machdep_pthread_cleanup() ++ */ ++void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread) ++{ ++ return(machdep_pthread->machdep_stack); ++} ++ ++/* ========================================================================== ++ * machdep_pthread_start() ++ */ ++void machdep_pthread_start(void) ++{ ++ context_switch_done(); ++ pthread_sched_resume(); ++ ++ /* Run current threads start routine with argument */ ++ pthread_exit(pthread_run->machdep_data.start_routine ++ (pthread_run->machdep_data.start_argument)); ++ ++ /* should never reach here */ ++ PANIC(); ++} ++ ++/* ========================================================================== ++ * __machdep_stack_free() ++ */ ++void __machdep_stack_free(void * stack) ++{ ++ free(stack); ++} ++ ++/* ========================================================================== ++ * __machdep_stack_alloc() ++ */ ++void * __machdep_stack_alloc(size_t size) ++{ ++ void * stack; ++ ++ return(malloc(size)); ++} ++ ++/* ========================================================================== ++ * __machdep_pthread_create() ++ */ ++void __machdep_pthread_create(struct machdep_pthread *machdep_pthread, ++ void *(* start_routine)(), void *start_argument, ++ long stack_size, long nsec, long flags) ++{ ++ machdep_pthread->start_routine = start_routine; ++ machdep_pthread->start_argument = start_argument; ++ ++ machdep_pthread->machdep_timer.it_value.tv_sec = 0; ++ machdep_pthread->machdep_timer.it_interval.tv_sec = 0; ++ machdep_pthread->machdep_timer.it_interval.tv_usec = 0; ++ machdep_pthread->machdep_timer.it_value.tv_usec = nsec / 1000; ++ ++ _setjmp(machdep_pthread->machdep_state); ++ /* ++ * Set up new stact frame so that it looks like it ++ * returned from a longjmp() to the beginning of ++ * machdep_pthread_start(). ++ */ ++ machdep_pthread->machdep_state[JMPBUF_REG_R14] = (int)machdep_pthread_start; ++ ++ /* Stack starts high and builds down. */ ++ machdep_pthread->machdep_state[JMPBUF_REG_R13] = ++ (int)machdep_pthread->machdep_stack + stack_size; ++} ++ ++/* ========================================================================== ++ * machdep_sys_creat() ++ */ ++machdep_sys_creat(char * path, int mode) ++{ ++ return(machdep_sys_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode)); ++} ++ ++/* ========================================================================== ++ * 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)); ++} diff --git a/databases/mysql/patches/patch-ay b/databases/mysql/patches/patch-ay new file mode 100644 index 00000000000..5ef129498f3 --- /dev/null +++ b/databases/mysql/patches/patch-ay @@ -0,0 +1,198 @@ +$NetBSD: patch-ay,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- /dev/null Sun Oct 25 03:15:17 1998 ++++ mit-pthreads/machdep/syscall-arm32-netbsd-1.3.S Sun Oct 25 18:49:24 1998 +@@ -0,0 +1,193 @@ ++/* ==== syscall.S ============================================================ ++ * Copyright (c) 1990 The Regents of the University of California. ++ * Copyright (c) 1993 Chris Provenzano, proven@mit.edu ++ * All rights reserved. ++ * ++ * This code is derived from software contributed to Berkeley by ++ * William Jolitz. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. All advertising materials mentioning features or use of this software ++ * must display the following acknowledgement: ++ * This product includes software developed by the University of ++ * California, Berkeley and its contributors. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * Description : Machine dependent syscalls for i386/i486/i586 ++ * ++ * 1.00 93/08/26 proven ++ * -Started coding this file. ++ * ++ * 1.01 93/11/13 proven ++ * -The functions readv() and writev() added. ++ */ ++ ++#ifndef lint ++ .text ++ .asciz "$Id: patch-ay,v 1.1 1998/10/28 18:18:09 bad Exp $"; ++#endif ++ ++#if defined(SYSLIBC_SCCS) && !defined(lint) ++ .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90" ++#endif /* SYSLIBC_SCCS and not lint */ ++ ++#include <machine/asm.h> ++#include <sys/syscall.h> ++ ++/* ++ * Initial asm stuff for all functions. ++ */ ++ .text ++ .align 0 ++ ++ ++/* ========================================================================== ++ * machdep_sys_fork() ++ */ ++ .globl _machdep_sys_fork; ++ ++_machdep_sys_fork:; ++ ++ swi SYS_fork ++ bcs 1f ++ sub r1, r1, #0x00000001 ++ and r0, r0, r1 ++ mov r15, r14 ++ ++ ++ ++/* ========================================================================== ++ * machdep_sys_fstat() ++ */ ++ .globl _machdep_sys_fstat; ++ ++_machdep_sys_fstat:; ++ ++ swi SYS___fstat13 ++ bcs 1f ++ mov r15, r14 ++ ++/* ========================================================================== ++ * machdep_sys___syscall() ++ */ ++ ++_machdep_sys___syscall:; ++ ++ swi 0x00000000 ++ bcs 1f ++ mov r15, r14 ++ ++ ++#ifndef SYS___sigsuspend14 ++/* ========================================================================== ++ * machdep_sys_sigsuspend() ++ */ ++ .globl _machdep_sys_sigsuspend; ++ ++_machdep_sys_sigsuspend:; ++ ++ ldr r0, [r0] ++ swi SYS_sigsuspend ++ bcs 1f ++ mov r0, #0x00000000 ++ mov r15, r14 ++ ++#endif ++ ++#ifndef SYS___sigprocmask14 ++/* ========================================================================== ++ * machdep_sys_sigprocmask() ++ */ ++ .globl _machdep_sys_sigprocmask; ++ ++_machdep_sys_sigprocmask:; ++ ++ teq r1, #0x00000000 ++ moveq r0, #0x00000001 ++ moveq r1, #0x00000000 ++ ldrne r1, [r1] ++ swi SYS_sigprocmask ++ bcs 1f ++ teq r2, #0x00000000 ++ strne r0, [r2] ++ mov r0, #0x00000000 ++ mov r15, r14 ++#endif ++ ++/* ========================================================================== ++ * machdep_sys_ftruncate() ++ */ ++ .global _machdep_sys_ftruncate ++_machdep_sys_ftruncate: ++ mov r12, r13 ++ stmfd r13!, {r11, r12, r14, r15} ++ sub r13, r13, #8 ++ stmia r13, {r1-r2} ++ mov r3, #0 ++ sub r11, r12, #4 ++ mov r2, r0 ++ mov r1, #0 ++ mov r0, #201 ++ bl _machdep_sys___syscall ++ ldmea r11, {r11, r13, r15} ++ ++/* ========================================================================== ++ * machdep_sys_lseek() ++ */ ++ .global _machdep_sys_lseek ++ ++_machdep_sys_lseek: ++ mov r12, r13 ++ stmfd r13!, {r11, r12, r14, r15} ++ str r3, [r13, #-4]! ++ sub r13, r13, #8 ++ stmia r13, {r1-r2} ++ sub r11, r12, #4 ++ mov r3, #0 ++ mov r2, r0 ++ mov r1, #0 ++ mov r0, #SYS_lseek ++ bl _machdep_sys___syscall ++ ldmea r11, {r11, r13, r15} ++ ++/* ========================================================================== ++ * machdep_sys_pipe() ++ */ ++ .globl _machdep_sys_pipe; ++ ++_machdep_sys_pipe:; ++ ++ mov r2, r0 ++ swi SYS_pipe ++ bcs 1f ++ str r0, [r2, #0x0000] ++ str r1, [r2, #0x0004] ++ mov r0, #0x00000000 ++ mov r15, r14 ++ ++ ++1: ++ rsb r0, r0, #0x00000000 ++ mvn r1, #0x00000000 ++ mov r15, r14 diff --git a/databases/mysql/patches/patch-az b/databases/mysql/patches/patch-az new file mode 100644 index 00000000000..b7273e9ae79 --- /dev/null +++ b/databases/mysql/patches/patch-az @@ -0,0 +1,60 @@ +$NetBSD: patch-az,v 1.1 1998/10/28 18:18:09 bad Exp $ + +--- /dev/null Sun Oct 25 20:12:14 1998 ++++ mit-pthreads/machdep/syscall-template-arm32-netbsd-1.3.S Sun Oct 25 20:18:57 1998 +@@ -0,0 +1,55 @@ ++#include <machine/asm.h> ++#include <sys/syscall.h> ++ ++#ifdef SYS___sigsuspend14 ++#define SYS_sigsuspend SYS___sigsuspend14 ++#endif ++#ifdef SYS___sigprocmask14 ++#define SYS_sigprocmask SYS___sigprocmask14 ++#endif ++ ++#ifdef __STDC__ ++ ++#define SYSCALL(x) \ ++ .globl _machdep_sys_##x; \ ++ \ ++_machdep_sys_##x:; \ ++ \ ++ swi SYS_##x; \ ++ bcs 1b; \ ++ mov r15, r14; ++ ++#else ++ ++#define SYSCALL(x) \ ++ .globl _machdep_sys_/**/x; \ ++ \ ++_machdep_sys_/**/x:; \ ++ \ ++ swi SYS_/**/x; \ ++ bcs 1b; \ ++ mov r15, r14; ++ ++#endif ++ ++ ++/* ++ * Initial asm stuff for all functions. ++ */ ++ .text ++ .align 0 ++ ++ ++/* ========================================================================== ++ * error code for all syscalls. The error value is returned as the negative ++ * of the errno value. ++ */ ++ ++1: ++ rsb r0, r0, #0x00000000 ++ mvn r1, #0x00000000 ++ mov r15, r14 ++ ++#define XSYSCALL(NAME) SYSCALL(NAME) ++ ++XSYSCALL(SYSCALL_NAME) |