Nuke mysql; it's now mysql-server and mysql-client.
This commit is contained in:
parent
51434187e0
commit
fccb40ed14
34 changed files with 5 additions and 1964 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.13 1999/04/09 23:11:53 tron Exp $
|
||||
# $NetBSD: Makefile,v 1.14 1999/05/06 23:38:36 tv Exp $
|
||||
# FreeBSD Id: Makefile,v 1.20 1997/07/30 11:47:51 tg Exp
|
||||
#
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
|||
# SUBDIR += gnats
|
||||
SUBDIR += gtksql
|
||||
# SUBDIR += msql
|
||||
SUBDIR += mysql
|
||||
SUBDIR += mysql-client
|
||||
SUBDIR += mysql-server
|
||||
SUBDIR += openldap
|
||||
# SUBDIR += p5-DBD-mysql
|
||||
# SUBDIR += p5-DBD-Pg
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.17 1999/04/09 15:39:38 bad Exp $
|
||||
#
|
||||
|
||||
DISTNAME= mysql-3.22.21
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ftp://ftp.digex.net/pub/database/mysql/Downloads/MySQL-3.22/ \
|
||||
ftp://ftp.netcasting.net/pub/mysql/Downloads/MySQL-3.22/
|
||||
|
||||
MAINTAINER= packages@netbsd.org
|
||||
HOMEPAGE= http://www.mysql.com/
|
||||
|
||||
NO_CDROM= "Restrictive license."
|
||||
|
||||
MYSQL_DATADIR?= /var/mysql
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS+=--localstatedir=${MYSQL_DATADIR} \
|
||||
--with-named-z-libs='z' \
|
||||
--without-perl --without-debug --without-bench \
|
||||
--with-low-memory
|
||||
CONFIGURE_ENV= INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
|
||||
INSTALL_DATA="${INSTALL_DATA}" \
|
||||
INSTALL_SCRIPT="${INSTALL_SCRIPT}"
|
||||
LDFLAGS+= -Wl,-R${LOCALBASE}/lib/mysql
|
||||
|
||||
USE_GMAKE= yes
|
||||
USE_PERL5= yes
|
||||
USE_LIBTOOL= yes
|
||||
|
||||
PLIST_SRC= ${WRKSRC}/.PLIST_SRC
|
||||
|
||||
INFO_FILES= mysql.info
|
||||
|
||||
pre-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/Docs/mysql.info ${PREFIX}/info
|
||||
@${CP} ${PKGDIR}/PLIST-client ${PLIST_SRC}
|
||||
|
||||
.if (${MACHINE_ARCH} != "i386") && (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "arm32") && (${MACHINE_ARCH} != "sparc")
|
||||
CONFIGURE_ARGS+=--without-server
|
||||
pre-configure:
|
||||
@${ECHO} '########## Client-only support! ##########'
|
||||
@${ECHO} 'MySQL does not support pthreads on ${MACHINE_ARCH}, so only the client'
|
||||
@${ECHO} 'support library and clients will be built.'
|
||||
@${ECHO} '##########################################'
|
||||
.else
|
||||
NO_PACKAGE= "mysql_install_db needs data dir from distribution."
|
||||
|
||||
post-install::
|
||||
(cd ${WRKSRC}; ./scripts/mysql_install_db)
|
||||
@${CAT} ${PKGDIR}/PLIST-server >>${PLIST_SRC}
|
||||
.endif
|
||||
|
||||
post-install::
|
||||
${ECHO} @dirrm lib/mysql >>${PLIST_SRC}
|
||||
${ECHO} @dirrm share/mysql >>${PLIST_SRC}
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -1,3 +0,0 @@
|
|||
$NetBSD: md5,v 1.6 1999/04/09 15:39:38 bad Exp $
|
||||
|
||||
MD5 (mysql-3.22.21.tar.gz) = 290b586a47de28f9bb4831f7d80a932f
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-aa,v 1.6 1999/04/09 15:39:38 bad Exp $
|
||||
|
||||
--- client/Makefile.in.orig Mon Mar 15 15:49:57 1999
|
||||
+++ client/Makefile.in Sun Mar 21 23:11:42 1999
|
||||
@@ -181,7 +181,7 @@
|
||||
libmysqlclient_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@
|
||||
CLEANFILES = $(libmysqlclient_la_LIBADD) $(SHLIBOBJS) \
|
||||
libmysqclient.la
|
||||
-DEFS = -DUNDEF_THREADS_HACK
|
||||
+DEFS = -DUNDEF_THREADS_HACK -Dunix
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
|
@ -1,20 +0,0 @@
|
|||
$NetBSD: patch-ab,v 1.4 1999/04/09 15:39:38 bad Exp $
|
||||
|
||||
--- configure.orig Mon Mar 15 15:31:46 1999
|
||||
+++ configure Sun Mar 21 23:55:25 1999
|
||||
@@ -1691,6 +1691,7 @@
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
+if false; then
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
|
||||
@@ -1736,6 +1737,7 @@
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
|
||||
+fi
|
||||
|
||||
# AC_PROG_INSTALL We should only need a AM_PROG_INSTALL
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
$NetBSD: patch-ac,v 1.2 1998/08/07 10:40:19 agc Exp $
|
||||
|
||||
--- client/get_password.c.orig Sun Jun 14 16:26:27 1998
|
||||
+++ client/get_password.c Sun Jun 14 19:25:24 1998
|
||||
@@ -18,8 +18,8 @@
|
||||
#include <termio.h>
|
||||
#define TERMIO struct termio
|
||||
#else
|
||||
-#include <sgtty.h>
|
||||
-#define TERMIO struct sgttyb
|
||||
+#include <termios.h>
|
||||
+#define TERMIO struct termios
|
||||
#endif
|
||||
#ifdef alpha_linux_port
|
||||
#include <asm/ioctls.h> /* QQ; Fix this in configure */
|
||||
@@ -92,13 +92,14 @@
|
||||
get_password(buff,sizeof(buff)-1,fileno(stdin),isatty(fileno(stdout)));
|
||||
ioctl(fileno(stdin),(int) TCSETA, &org);
|
||||
#else
|
||||
- gtty(fileno(stdin), &org);
|
||||
+ tcgetattr(fileno(stdin), &org);
|
||||
tmp=org;
|
||||
- tmp.sg_flags &= ~ECHO;
|
||||
- tmp.sg_flags |= RAW;
|
||||
- stty(fileno(stdin), &tmp);
|
||||
+ tmp.c_lflag &= ~(ECHO | ISIG | ICANON);
|
||||
+ tmp.c_cc[VMIN] = 1;
|
||||
+ tmp.c_cc[VTIME]= 0;
|
||||
+ tcsetattr(fileno(stdin), TCSAFLUSH, &tmp);
|
||||
get_password(buff,sizeof(buff)-1,fileno(stdin),isatty(fileno(stdout)));
|
||||
- stty(fileno(stdin), &org);
|
||||
+ tcsetattr(fileno(stdin), TCSAFLUSH, &org);
|
||||
#endif
|
||||
if (isatty(fileno(stdout)))
|
||||
fputc('\n',stdout);
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-ad,v 1.3 1999/02/04 21:35:01 frueauf Exp $
|
||||
|
||||
--- dbug/Makefile.in-orig Wed Jul 8 11:11:32 1998
|
||||
+++ dbug/Makefile.in Thu Feb 4 17:14:29 1999
|
||||
@@ -142,7 +142,7 @@
|
||||
LIBRARIES = $(pkglib_LIBRARIES)
|
||||
|
||||
|
||||
-DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
+DEFS = @DEFS@ -I. -I$(srcdir) -I.. -Dunix
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
|
@ -1,105 +0,0 @@
|
|||
$NetBSD: patch-ah,v 1.4 1999/04/16 16:21:27 bad Exp $
|
||||
|
||||
--- mit-pthreads/config/configure.orig Tue Mar 10 10:11:25 1998
|
||||
+++ mit-pthreads/config/configure Fri Apr 16 18:16:36 1999
|
||||
@@ -1165,6 +1165,12 @@
|
||||
name=$host_cpu-$host_os
|
||||
|
||||
case $host in
|
||||
+ alpha-*-netbsd1.3[H-Z]|alpha-*-netbsd1.4*)
|
||||
+ 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]|arm32-*-netbsd1.4*)
|
||||
+ 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]|sparc-*-netbsd1.4*)
|
||||
+ 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
|
||||
@@ -1257,6 +1285,12 @@
|
||||
syscall=i386-bsdi-2.0
|
||||
except="fork lseek ftruncate sigsuspend"
|
||||
;;
|
||||
+ i386-*-netbsd1.3[H-Z]|i386-*-netbsd1.4*)
|
||||
+ 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
|
||||
sysincludes=netbsd-1.1
|
||||
@@ -1898,6 +1932,38 @@
|
||||
if test $pthreads_cv_timespec_in_time = yes ; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _OS_HAS_TIMESPEC 1
|
||||
+EOF
|
||||
+fi
|
||||
+
|
||||
+echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
|
||||
+if eval "test \"`echo '$''{'pthreads_cv_socklen_t'+set}'`\" = set"; then
|
||||
+ echo $ac_n "(cached) $ac_c" 1>&6
|
||||
+else
|
||||
+ cat > conftest.$ac_ext <<EOF
|
||||
+#line 1678 "configure"
|
||||
+#include "confdefs.h"
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+int main() { return 0; }
|
||||
+int t() {
|
||||
+socklen_t foo;
|
||||
+; return 0; }
|
||||
+EOF
|
||||
+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
+ rm -rf conftest*
|
||||
+ pthreads_cv_socklen_t=yes
|
||||
+else
|
||||
+ rm -rf conftest*
|
||||
+ pthreads_cv_socklen_t=no
|
||||
+fi
|
||||
+rm -f conftest*
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+echo "$ac_t""$pthreads_cv_socklen_t" 1>&6
|
||||
+if test $pthreads_cv_socklen_t = yes ; then
|
||||
+ cat >> confdefs.h <<\EOF
|
||||
+#define _OS_HAS_SOCKLEN_T 1
|
||||
EOF
|
||||
|
||||
fi
|
|
@ -1,22 +0,0 @@
|
|||
$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-* \
|
|
@ -1,20 +0,0 @@
|
|||
$NetBSD: patch-aj,v 1.2 1998/12/29 08:12:04 garbled Exp $
|
||||
--- mit-pthreads/pthreads/fd.c.orig Tue Jan 13 06:28:04 1998
|
||||
+++ mit-pthreads/pthreads/fd.c Mon Dec 28 23:50:16 1998
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -702,7 +703,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,
|
|
@ -1,124 +0,0 @@
|
|||
$NetBSD: patch-ak,v 1.2 1999/04/08 21:54:36 bad Exp $
|
||||
|
||||
--- mit-pthreads/pthreads/fd_kern.c.orig Wed Nov 26 09:43:02 1997
|
||||
+++ mit-pthreads/pthreads/fd_kern.c Sat Mar 20 23:41:26 1999
|
||||
@@ -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)
|
||||
{
|
||||
@@ -1096,7 +1097,11 @@
|
||||
/* ==========================================================================
|
||||
* bind()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+int bind(int fd, const struct sockaddr *name, socklen_t namelen)
|
||||
+#else
|
||||
int bind(int fd, const struct sockaddr *name, int namelen)
|
||||
+#endif
|
||||
{
|
||||
/* Not much to do in bind */
|
||||
int ret;
|
||||
@@ -1118,7 +1123,11 @@
|
||||
/* ==========================================================================
|
||||
* connect()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+int connect(int fd, const struct sockaddr *name, socklen_t namelen)
|
||||
+#else
|
||||
int connect(int fd, const struct sockaddr *name, int namelen)
|
||||
+#endif
|
||||
{
|
||||
struct sockaddr tmpname;
|
||||
int ret, tmpnamelen;
|
||||
@@ -1170,7 +1179,11 @@
|
||||
/* ==========================================================================
|
||||
* accept()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+int accept(int fd, struct sockaddr *name, socklen_t *namelen)
|
||||
+#else
|
||||
int accept(int fd, struct sockaddr *name, int *namelen)
|
||||
+#endif
|
||||
{
|
||||
int ret, fd_kern;
|
||||
|
||||
@@ -1377,8 +1390,13 @@
|
||||
/* ==========================================================================
|
||||
* sendto()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+ssize_t sendto(int fd, const void * msg, size_t len, int flags,
|
||||
+ const struct sockaddr *to, socklen_t to_len)
|
||||
+#else
|
||||
ssize_t sendto(int fd, const void * msg, size_t len, int flags,
|
||||
const struct sockaddr *to, int to_len)
|
||||
+#endif
|
||||
{
|
||||
return(sendto_timedwait(fd, msg, len, flags, to, to_len, NULL));
|
||||
}
|
||||
@@ -1629,8 +1647,13 @@
|
||||
/* ==========================================================================
|
||||
* recvfrom()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+ssize_t recvfrom(int fd, void * buf, size_t len, int flags,
|
||||
+ struct sockaddr * from, socklen_t * from_len)
|
||||
+#else
|
||||
ssize_t recvfrom(int fd, void * buf, size_t len, int flags,
|
||||
struct sockaddr * from, int * from_len)
|
||||
+#endif
|
||||
{
|
||||
return(recvfrom_timedwait(fd, buf, len, flags, from, from_len, NULL));
|
||||
}
|
||||
@@ -1788,7 +1811,11 @@
|
||||
/* ==========================================================================
|
||||
* setsockopt()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+int setsockopt(int fd, int level, int optname, const void * optval, socklen_t optlen)
|
||||
+#else
|
||||
int setsockopt(int fd, int level, int optname, const void * optval, int optlen)
|
||||
+#endif
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1810,7 +1837,11 @@
|
||||
/* ==========================================================================
|
||||
* getsockopt()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+int getsockopt(int fd, int level, int optname, void * optval, socklen_t * optlen)
|
||||
+#else
|
||||
int getsockopt(int fd, int level, int optname, void * optval, int * optlen)
|
||||
+#endif
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1832,7 +1863,11 @@
|
||||
/* ==========================================================================
|
||||
* getsockname()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+int getsockname(int fd, struct sockaddr * name, socklen_t * naddrlen)
|
||||
+#else
|
||||
int getsockname(int fd, struct sockaddr * name, int * naddrlen)
|
||||
+#endif
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -1854,7 +1889,11 @@
|
||||
/* ==========================================================================
|
||||
* getpeername()
|
||||
*/
|
||||
+#ifdef _OS_HAS_SOCKLEN_T
|
||||
+int getpeername(int fd, struct sockaddr * peer, socklen_t * paddrlen)
|
||||
+#else
|
||||
int getpeername(int fd, struct sockaddr * peer, int * paddrlen)
|
||||
+#endif
|
||||
{
|
||||
int ret;
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
$NetBSD: patch-al,v 1.2 1998/10/29 18:07:38 bad Exp $
|
||||
|
||||
--- 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
|
|
@ -1,21 +0,0 @@
|
|||
$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
|
|
@ -1,30 +0,0 @@
|
|||
$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
|
|
@ -1,18 +0,0 @@
|
|||
$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:
|
|
@ -1,111 +0,0 @@
|
|||
$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
|
|
@ -1,237 +0,0 @@
|
|||
$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
|
|
@ -1,176 +0,0 @@
|
|||
$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
|
|
@ -1,52 +0,0 @@
|
|||
$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)
|
|
@ -1,21 +0,0 @@
|
|||
$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
|
|
@ -1,36 +0,0 @@
|
|||
$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()
|
|
@ -1,18 +0,0 @@
|
|||
$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) \
|
|
@ -1,107 +0,0 @@
|
|||
$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
|
|
@ -1,208 +0,0 @@
|
|||
$NetBSD: patch-ax,v 1.2 1999/02/04 21:15:15 bad Exp $
|
||||
|
||||
--- /dev/null Thu Feb 4 01:37:20 1999
|
||||
+++ mit-pthreads/machdep/engine-arm32-netbsd-1.3.c Thu Feb 4 01:53:39 1999
|
||||
@@ -0,0 +1,203 @@
|
||||
+/* ==== 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.2 1999/02/04 21:15:15 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>
|
||||
+
|
||||
+#if defined(_JB_REG_R13)
|
||||
+#define REG_LR _JB_REG_R14
|
||||
+#define REG_SP _JB_REG_R13
|
||||
+#else
|
||||
+#define REG_LR JMPBUF_REG_R14
|
||||
+#define REG_SP JMPBUF_REG_R13
|
||||
+#endif
|
||||
+
|
||||
+/* ==========================================================================
|
||||
+ * 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[REG_LR] = (int)machdep_pthread_start;
|
||||
+
|
||||
+ /* Stack starts high and builds down. */
|
||||
+ machdep_pthread->machdep_state[REG_SP] =
|
||||
+ (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));
|
||||
+}
|
|
@ -1,198 +0,0 @@
|
|||
$NetBSD: patch-ay,v 1.2 1998/12/28 16:17:12 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.2 1998/12/28 16:17:12 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 SYS___syscall
|
||||
+ 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
|
|
@ -1,60 +0,0 @@
|
|||
$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)
|
|
@ -1,11 +0,0 @@
|
|||
$NetBSD: patch-ba,v 1.1 1998/12/29 08:12:04 garbled Exp $
|
||||
--- mit-pthreads/pthreads/specific.c.orig Mon Dec 28 23:52:16 1998
|
||||
+++ mit-pthreads/pthreads/specific.c Mon Dec 28 23:52:30 1998
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
static struct pthread_key key_table[PTHREAD_DATAKEYS_MAX];
|
||||
static pthread_mutex_t key_mutex = PTHREAD_MUTEX_INITIALIZER;
|
|
@ -1,14 +0,0 @@
|
|||
$NetBSD: patch-bc,v 1.1 1999/04/08 21:54:37 bad Exp $
|
||||
|
||||
--- mit-pthreads/config/config.h.in.orig Thu May 29 16:59:14 1997
|
||||
+++ mit-pthreads/config/config.h.in Sat Mar 20 23:30:53 1999
|
||||
@@ -18,6 +18,9 @@
|
||||
/* Does the OS already support struct timespec */
|
||||
#undef _OS_HAS_TIMESPEC
|
||||
|
||||
+/* Does the OS need socklen_t for the socket syscalls? */
|
||||
+#undef _OS_HAS_SOCKLEN_T
|
||||
+
|
||||
/* For networking code: an integral type the size of an IP address (4
|
||||
octets). Determined by examining return values from certain
|
||||
functions. */
|
|
@ -1,83 +0,0 @@
|
|||
$NetBSD: patch-bd,v 1.3 1999/04/16 16:21:27 bad Exp $
|
||||
|
||||
--- mit-pthreads/config/configure.in.orig Mon Mar 9 11:30:59 1998
|
||||
+++ mit-pthreads/config/configure.in Fri Apr 16 18:17:12 1999
|
||||
@@ -124,6 +124,12 @@
|
||||
name=$host_cpu-$host_os
|
||||
|
||||
case $host in
|
||||
+ alpha-*-netbsd1.3[H-Z]|alpha-*-netbsd1.4*)
|
||||
+ 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
|
||||
@@ -142,6 +148,17 @@
|
||||
CFLAGS="$CFLAGS -std"
|
||||
fi
|
||||
;;
|
||||
+ arm32-*-netbsd1.3[H-Z]|arm32-*-netbsd1.4*)
|
||||
+ 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
|
||||
@@ -176,6 +193,17 @@
|
||||
AC_DEFINE(LD_LINKS_STATIC_DATA)
|
||||
AC_DEFINE(BROKEN_SIGNALS)
|
||||
;;
|
||||
+ sparc-*-netbsd1.3[H-Z]|sparc-*-netbsd1.4*)
|
||||
+ 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
|
||||
@@ -201,6 +229,12 @@
|
||||
syscall=i386-bsdi-2.0
|
||||
except="fork lseek ftruncate sigsuspend"
|
||||
;;
|
||||
+ i386-*-netbsd1.3[H-Z]|i386-*-netbsd1.4*)
|
||||
+ 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
|
||||
sysincludes=netbsd-1.1
|
||||
@@ -339,6 +373,16 @@
|
||||
AC_MSG_RESULT($pthreads_cv_timespec_in_time)
|
||||
if test $pthreads_cv_timespec_in_time = yes ; then
|
||||
AC_DEFINE(_OS_HAS_TIMESPEC)
|
||||
+fi
|
||||
+
|
||||
+dnl socklen_t
|
||||
+AC_CACHE_VAL(pthreads_cv_socklen_t,
|
||||
+ AC_TRY_COMPILE([#include <sys/types.h>
|
||||
+#include <sys/socket.h>], [socklen_t foo;],
|
||||
+ pthreads_cv_socklen_t=yes, pthreads_cv_socklen_t=no))
|
||||
+AC_MSG_RESULT($pthreads_cv_socklen_t)
|
||||
+if test $pthreads_cv_socklen_t = yes ; then
|
||||
+ AC_DEFINE(_OS_HAS_SOCKLEN_T)
|
||||
fi
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
MySQL, a free SQL database server
|
|
@ -1,14 +0,0 @@
|
|||
*MySQL* is a SQL (Structured Query Language) database server.
|
||||
SQL is the most popular database language in the world.
|
||||
*MySQL* is a client server implementation that consists of a
|
||||
server daemon `mysqld' and many different client programs/libraries.
|
||||
|
||||
The main goals of *MySQL* are speed and robustness.
|
||||
|
||||
The base upon which *MySQL* is built is a set of routines that have
|
||||
been used in a highly demanding production environment for many years.
|
||||
While *MySQL* is still in development it already offers a rich and
|
||||
highly useful function set.
|
||||
|
||||
The official way to pronounce *MySQL* is 'My Ess Que Ell' (Not
|
||||
MY-SEQUEL).
|
|
@ -1,40 +0,0 @@
|
|||
@comment $NetBSD: PLIST-client,v 1.4 1999/04/09 15:39:38 bad Exp $
|
||||
bin/msql2mysql
|
||||
bin/mysql
|
||||
bin/mysql_zap
|
||||
bin/mysql_fix_privilege_tables
|
||||
bin/mysqlaccess
|
||||
bin/mysqladmin
|
||||
bin/mysqlbug
|
||||
bin/mysqldump
|
||||
bin/mysqlimport
|
||||
bin/mysqlshow
|
||||
bin/mysql_setpermission
|
||||
include/mysql/chardefs.h
|
||||
include/mysql/dbug.h
|
||||
include/mysql/errmsg.h
|
||||
include/mysql/history.h
|
||||
include/mysql/keymaps.h
|
||||
include/mysql/m_ctype.h.in
|
||||
include/mysql/m_string.h
|
||||
include/mysql/my_list.h
|
||||
include/mysql/my_sys.h
|
||||
include/mysql/mysql.h
|
||||
include/mysql/mysql_com.h
|
||||
include/mysql/mysql_version.h
|
||||
include/mysql/mysqld_error.h
|
||||
include/mysql/readline.h
|
||||
include/mysql/tilde.h
|
||||
@unexec install-info --delete %D/info/mysql.info %D/info/dir
|
||||
info/mysql.info
|
||||
@exec install-info %D/info/mysql.info %D/info/dir
|
||||
lib/mysql/libmysqlclient.a
|
||||
lib/mysql/libmysqlclient.so.6.0
|
||||
share/mysql/binary-configure
|
||||
share/mysql/make_binary_distribution
|
||||
share/mysql/my-example.cnf
|
||||
share/mysql/mysql-3.22.21.spec
|
||||
share/mysql/mysql-log-rotate
|
||||
share/mysql/mysql.server
|
||||
man/man1/mysql.1
|
||||
@dirrm include/mysql
|
|
@ -1,67 +0,0 @@
|
|||
@comment $NetBSD: PLIST-server,v 1.3 1999/04/09 15:39:39 bad Exp $
|
||||
bin/comp_err
|
||||
bin/isamchk
|
||||
bin/isamlog
|
||||
bin/mysql_install_db
|
||||
bin/perror
|
||||
bin/replace
|
||||
bin/safe_mysqld
|
||||
bin/resolveip
|
||||
lib/mysql/libdbug.a
|
||||
lib/mysql/libheap.a
|
||||
lib/mysql/libmerge.a
|
||||
lib/mysql/libmystrings.a
|
||||
lib/mysql/libmysys.a
|
||||
lib/mysql/libnisam.a
|
||||
libexec/mysqld
|
||||
share/mysql/czech/errmsg.sys
|
||||
share/mysql/czech/errmsg.txt
|
||||
share/mysql/dutch/errmsg.sys
|
||||
share/mysql/dutch/errmsg.txt
|
||||
share/mysql/english/errmsg.sys
|
||||
share/mysql/english/errmsg.txt
|
||||
share/mysql/french/errmsg.sys
|
||||
share/mysql/french/errmsg.txt
|
||||
share/mysql/german/errmsg.sys
|
||||
share/mysql/german/errmsg.txt
|
||||
share/mysql/hungarian/errmsg.sys
|
||||
share/mysql/hungarian/errmsg.txt
|
||||
share/mysql/italian/errmsg.sys
|
||||
share/mysql/italian/errmsg.txt
|
||||
share/mysql/japanese/errmsg.sys
|
||||
share/mysql/japanese/errmsg.txt
|
||||
share/mysql/korean/errmsg.sys
|
||||
share/mysql/korean/errmsg.txt
|
||||
share/mysql/norwegian-ny/errmsg.sys
|
||||
share/mysql/norwegian-ny/errmsg.txt
|
||||
share/mysql/norwegian/errmsg.sys
|
||||
share/mysql/norwegian/errmsg.txt
|
||||
share/mysql/polish/errmsg.sys
|
||||
share/mysql/polish/errmsg.txt
|
||||
share/mysql/portuguese/errmsg.sys
|
||||
share/mysql/portuguese/errmsg.txt
|
||||
share/mysql/russian/errmsg.sys
|
||||
share/mysql/russian/errmsg.txt
|
||||
share/mysql/spanish/errmsg.sys
|
||||
share/mysql/spanish/errmsg.txt
|
||||
share/mysql/slovak/errmsg.sys
|
||||
share/mysql/slovak/errmsg.txt
|
||||
share/mysql/swedish/errmsg.sys
|
||||
share/mysql/swedish/errmsg.txt
|
||||
@dirrm share/mysql/czech
|
||||
@dirrm share/mysql/dutch
|
||||
@dirrm share/mysql/english
|
||||
@dirrm share/mysql/french
|
||||
@dirrm share/mysql/german
|
||||
@dirrm share/mysql/hungarian
|
||||
@dirrm share/mysql/italian
|
||||
@dirrm share/mysql/japanese
|
||||
@dirrm share/mysql/korean
|
||||
@dirrm share/mysql/norwegian
|
||||
@dirrm share/mysql/norwegian-ny
|
||||
@dirrm share/mysql/polish
|
||||
@dirrm share/mysql/portuguese
|
||||
@dirrm share/mysql/russian
|
||||
@dirrm share/mysql/spanish
|
||||
@dirrm share/mysql/slovak
|
||||
@dirrm share/mysql/swedish
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.15 1999/04/25 20:10:00 tsarna Exp $
|
||||
# $NetBSD: Makefile,v 1.16 1999/05/06 23:38:37 tv Exp $
|
||||
|
||||
DISTNAME= MySQLmodule-1.4
|
||||
PKGNAME= py-mysql-1.4
|
||||
|
@ -11,7 +11,7 @@ MAINTAINER= tsarna@netbsd.org
|
|||
HOMEPAGE= http://snail.earthlight.co.nz/projects.html
|
||||
|
||||
DEPENDS+= python-1.5.2:../../lang/python \
|
||||
mysql>=3.21:../../databases/mysql
|
||||
mysql-client-3.22.22:../../databases/mysql-client
|
||||
|
||||
EXTRACT_ONLY= MySQLmodule-1.4${EXTRACT_SUFX}
|
||||
ALL_TARGET= default
|
||||
|
|
Loading…
Reference in a new issue