diff options
author | explorer <explorer@pkgsrc.org> | 1999-11-05 17:13:27 +0000 |
---|---|---|
committer | explorer <explorer@pkgsrc.org> | 1999-11-05 17:13:27 +0000 |
commit | 7093062007eead6352e947da8eab878667d8c25d (patch) | |
tree | eb92d40b0fe0231954a73a68f9ba129d6d0877bb /devel | |
parent | 48be00755b1a18b4b110c0f63e658025f67b7575 (diff) | |
download | pkgsrc-7093062007eead6352e947da8eab878667d8c25d.tar.gz |
commit patches to make a try at fixing signal handling, compilation under ELF.
I'll sync these changes up to the mysql package when I test these changes
a bit more.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/mit-pthreads/patches/patch-ao | 13 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bq | 12 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-br | 12 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bs | 199 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bt | 61 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bu | 12 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bv | 12 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bw | 198 |
8 files changed, 506 insertions, 13 deletions
diff --git a/devel/mit-pthreads/patches/patch-ao b/devel/mit-pthreads/patches/patch-ao deleted file mode 100644 index 0ac53bedfc9..00000000000 --- a/devel/mit-pthreads/patches/patch-ao +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ao,v 1.1 1998/12/28 22:22:00 bad Exp $ - ---- include/endian.h.orig Tue May 30 16:30:57 1995 -+++ include/endian.h Sun Dec 27 18:30:25 1998 -@@ -66,7 +66,7 @@ - - #if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \ - defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ -- defined(__alpha__) || defined(__alpha) -+ defined(__alpha__) || defined(__alpha) || defined(__arm32__) - #define BYTE_ORDER LITTLE_ENDIAN - #define __BYTE_ORDER LITTLE_ENDIAN - #endif diff --git a/devel/mit-pthreads/patches/patch-bq b/devel/mit-pthreads/patches/patch-bq new file mode 100644 index 00000000000..9745847d5db --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bq @@ -0,0 +1,12 @@ +diff -ur include/arpa/nameser.h include/arpa/nameser.h +--- include/arpa/nameser.h Tue May 30 07:33:39 1995 ++++ include/arpa/nameser.h Wed Nov 3 12:00:57 1999 +@@ -56,7 +56,7 @@ + #ifndef _NAMESER_H_ + #define _NAMESER_H_ + +-#include <endian.h> ++#include <sys/endian.h> + #include <sys/types.h> + #include <pthread/types.h> + diff --git a/devel/mit-pthreads/patches/patch-br b/devel/mit-pthreads/patches/patch-br new file mode 100644 index 00000000000..4ec4f0732b1 --- /dev/null +++ b/devel/mit-pthreads/patches/patch-br @@ -0,0 +1,12 @@ +diff -ur stdlib/strtod.c stdlib/strtod.c +--- stdlib/strtod.c Wed Nov 3 12:03:37 1999 ++++ stdlib/strtod.c Wed Nov 3 12:01:09 1999 +@@ -94,7 +94,7 @@ + #endif /* LIBC_SCCS and not lint */ + + #ifndef __arm32__ +-#include <endian.h> ++#include <sys/endian.h> + #if BYTE_ORDER == BIG_ENDIAN + #define IEEE_BIG_ENDIAN 1 + #else diff --git a/devel/mit-pthreads/patches/patch-bs b/devel/mit-pthreads/patches/patch-bs new file mode 100644 index 00000000000..de9e390d731 --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bs @@ -0,0 +1,199 @@ +diff -ur machdep/syscall-i386-netbsd-1.3.S machdep/syscall-i386-netbsd-1.3.S +--- machdep/syscall-i386-netbsd-1.3.S Wed Nov 3 12:15:30 1999 ++++ machdep/syscall-i386-netbsd-1.3.S Wed Nov 3 19:04:58 1999 +@@ -61,52 +61,47 @@ + .text + .align 2 + +- + /* ========================================================================== + * machdep_sys_fork() + */ +- .globl _machdep_sys_fork; +- +-_machdep_sys_fork:; +- +- movl $(SYS_fork), %eax; +- .byte 0x9a; .long 0; .word 7; ++ .globl _C_LABEL(machdep_sys_fork) ++ ++_C_LABEL(machdep_sys_fork): ++ movl $(SYS_fork), %eax ++ .byte 0x9a ; .long 0; .word 7; + cmpl $0, %edx + je 2f + movl $0, %eax +-2: +- ret; ++2: ++ ret + + /* ========================================================================== + * machdep_sys___syscall() + */ + +-_machdep_sys___syscall:; +- +- movl $(SYS___syscall), %eax; +- int $0x80; +- jb 3f; ++_C_LABEL(machdep_sys___syscall): ++ movl $(SYS___syscall), %eax ++ int $0x80 ++ jb 3f + ret + + #ifndef SYS___sigsuspend14 + /* ========================================================================== + * machdep_sys_sigsuspend() + */ +- .globl _machdep_sys_sigsuspend; ++ .globl _C_LABEL(machdep_sys_sigsuspend) + +-_machdep_sys_sigsuspend:; +- +- movl 4(%esp),%eax # fetch mask arg +- movl (%eax),%eax # indirect to mask arg +- movl %eax,4(%esp) +- movl $(SYS_sigsuspend), %eax; +- int $0x80; +- jb 3f; ++_C_LABEL(machdep_sys_sigsuspend): ++ movl 4(%esp),%eax ; fetch mask arg ++ movl (%eax),%eax ; indirect to mask arg ++ movl %eax,4(%esp) ++ movl $(SYS_sigsuspend), %eax ++ int $0x80 ++ jb 3f + ret + #endif + + 3: +- + neg %eax + movl $0xffffffff,%edx + ret +@@ -114,39 +109,37 @@ + /* ========================================================================== + * machdep_sys_lseek() + */ +- .globl _machdep_sys_lseek; ++ .globl _C_LABEL(machdep_sys_lseek) + +-_machdep_sys_lseek:; +- +- pushl %ebp; +- movl %esp,%ebp; +- pushl 0x14(%ebp); +- pushl 0x10(%ebp); +- pushl 0xc(%ebp); +- pushl $0x0; +- pushl 0x8(%ebp); +- pushl $0x0; +- pushl $(SYS_lseek); +- call _machdep_sys___syscall; ++_C_LABEL(machdep_sys_lseek): ++ pushl %ebp ++ movl %esp,%ebp ++ pushl 0x14(%ebp) ++ pushl 0x10(%ebp) ++ pushl 0xc(%ebp) ++ pushl $0x0 ++ pushl 0x8(%ebp) ++ pushl $0x0 ++ pushl $(SYS_lseek) ++ call _C_LABEL(machdep_sys___syscall) + leave + ret + + /* ========================================================================== + * machdep_sys_ftruncate() ; Added by Monty + */ +- .globl _machdep_sys_ftruncate; +- +-_machdep_sys_ftruncate:; ++ .globl _C_LABEL(machdep_sys_ftruncate) + +- pushl %ebp; +- movl %esp,%ebp; +- pushl 0x10(%ebp); +- pushl 0xc(%ebp); ++_C_LABEL(machdep_sys_ftruncate): ++ pushl %ebp ++ movl %esp,%ebp ++ pushl 0x10(%ebp) ++ pushl 0xc(%ebp) + pushl $0x0; # Why this? +- pushl 0x8(%ebp); ++ pushl 0x8(%ebp) + pushl $0x0; # And this? +- pushl $(SYS_ftruncate); +- call _machdep_sys___syscall; ++ pushl $(SYS_ftruncate) ++ call _C_LABEL(machdep_sys___syscall); + leave + ret + +@@ -154,29 +147,28 @@ + /* ========================================================================== + * machdep_sys_sigprocmask() + */ +- .globl _machdep_sys_sigprocmask; ++ .globl _C_LABEL(machdep_sys_sigprocmask) ++ ++_C_LABEL(machdep_sys_sigprocmask): + +-_machdep_sys_sigprocmask:; +- + movl 8(%esp),%ecx + movl (%ecx),%ecx +- movl %ecx,8(%esp) +- movl $(SYS_sigprocmask), %eax; +- int $0x80; +- jb 3b; ++ movl %ecx,8(%esp) ++ movl $(SYS_sigprocmask), %eax ++ int $0x80 ++ jb 3b + ret + #endif + + /* ========================================================================== + * machdep_sys_pipe() + */ +- .globl _machdep_sys_pipe; ++ .globl _C_LABEL(machdep_sys_pipe) + +-_machdep_sys_pipe:; +- +- movl $(SYS_pipe), %eax; +- int $0x80; +- jb 3b; ++_C_LABEL(machdep_sys_pipe): ++ movl $(SYS_pipe), %eax ++ int $0x80 ++ jb 3b + movl 4(%esp),%ecx + movl %eax,(%ecx) + movl %edx,4(%ecx) +@@ -186,15 +178,14 @@ + /* ========================================================================== + * machdep_sys_fstat() + */ +- .globl _machdep_sys_fstat; ++ .globl _C_LABEL(machdep_sys_fstat) + +-_machdep_sys_fstat:; +- movl $(SYS___fstat13), %eax; +- int $0x80; +- jb 4f; ++_C_LABEL(machdep_sys_fstat): ++ movl $(SYS___fstat13), %eax ++ int $0x80 ++ jb 4f + ret + 4: + neg %eax + movl $0xffffffff,%edx + ret +- diff --git a/devel/mit-pthreads/patches/patch-bt b/devel/mit-pthreads/patches/patch-bt new file mode 100644 index 00000000000..4f710e38162 --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bt @@ -0,0 +1,61 @@ +diff -ur machdep/syscall-template-i386-netbsd-1.3.S machdep/syscall-template-i386-netbsd-1.3.S +--- machdep/syscall-template-i386-netbsd-1.3.S Wed Nov 3 12:15:31 1999 ++++ machdep/syscall-template-i386-netbsd-1.3.S Wed Nov 3 19:28:47 1999 +@@ -4,36 +4,33 @@ + #ifdef SYS___sigsuspend14 + #define SYS_sigsuspend SYS___sigsuspend14 + #endif +-#ifdef SYS___sigprocmask14 +-#define SYS_sigprocmask SYS___sigprocmask14 ++ ++#ifdef SYS___sigaction14 ++#define SYS_sigaction SYS___sigaction14 + #endif + +-#ifdef __STDC__ ++#ifdef SYS___sigpause14 ++#define SYS_sigpause SYS___sigpause14 ++#endif + +-#define SYSCALL(x) \ +- .globl _machdep_sys_##x; \ +- \ +-_machdep_sys_##x:; \ +- \ +- movl $(SYS_##x), %eax; \ +- int $0x80; \ +- jb 1b; \ +- ret; +- +-#else +- +-#define SYSCALL(x) \ +- .globl _machdep_sys_/**/x; \ +- \ +-_machdep_sys_/**/x:; \ +- \ +- movl $(SYS_/**/x), %eax; \ +- int $0x80; \ +- jb 1b; \ +- ret; ++#ifdef SYS___sigprocmask14 ++#define SYS_sigprocmask SYS___sigprocmask14 ++#endif + ++#ifdef SYS___vfork14xxxmlg ++#define SYS_vfork SYS___vfork14 + #endif + ++/* XXXMLG What about sigantstack14 and sigreturn14? */ ++ ++#define SYSCALL(x) ; \ ++ .globl _C_LABEL(machdep_sys_##x) ; \ ++ ; \ ++_C_LABEL(machdep_sys_##x): ; \ ++ movl $(SYS_##x), %eax ; \ ++ int $0x80 ; \ ++ jb 1b ; \ ++ ret + + /* + * Initial asm stuff for all functions. diff --git a/devel/mit-pthreads/patches/patch-bu b/devel/mit-pthreads/patches/patch-bu new file mode 100644 index 00000000000..dbaf5bf623f --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bu @@ -0,0 +1,12 @@ +diff -ur config/configure config/configure +--- config/configure Wed Nov 3 12:15:27 1999 ++++ config/configure Wed Nov 3 19:26:53 1999 +@@ -1149,7 +1149,7 @@ + name=i386-netbsd-1.3 + sysincludes=netbsd-1.1 + except="fork lseek ftruncate pipe fstat" +- available_syscalls="sigsuspend sigprocmask" ++ available_syscalls="sigsuspend sigprocmask sigaction" + ;; + i386-*-netbsd1.3*) + name=i386-netbsd-1.3 diff --git a/devel/mit-pthreads/patches/patch-bv b/devel/mit-pthreads/patches/patch-bv new file mode 100644 index 00000000000..1d7e5656cd4 --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bv @@ -0,0 +1,12 @@ +diff -ur config/configure.in config/configure.in +--- config/configure.in Wed Nov 3 12:15:27 1999 ++++ config/configure.in Wed Nov 3 19:23:27 1999 +@@ -222,7 +222,7 @@ + name=i386-netbsd-1.3 + sysincludes=netbsd-1.1 + except="fork lseek ftruncate pipe fstat" +- available_syscalls="sigsuspend sigprocmask" ++ available_syscalls="sigsuspend sigaction sigprocmask" + ;; + changequote([,])dnl + i386-*-netbsd1.3*) diff --git a/devel/mit-pthreads/patches/patch-bw b/devel/mit-pthreads/patches/patch-bw new file mode 100644 index 00000000000..6d733d5d6da --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bw @@ -0,0 +1,198 @@ +--- include/signal.h Sun Dec 24 19:03:09 1995 ++++ include/signal.h Wed Nov 3 21:31:11 1999 +@@ -1,3 +1,5 @@ ++/* $NetBSD: patch-bw,v 1.1 1999/11/05 17:13:29 explorer Exp $ */ ++ + /*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. +@@ -33,48 +35,160 @@ + * @(#)signal.h 8.3 (Berkeley) 3/30/94 + */ + +-#ifndef _SIGNAL_H +-#define _SIGNAL_H ++#ifndef _SIGNAL_H_ ++#define _SIGNAL_H_ + +-#include <sys/types.h> + #include <sys/cdefs.h> +-#include <sys/__signal.h> ++#include <sys/featuretest.h> + +-__BEGIN_DECLS ++#if !defined(_ANSI_SOURCE) ++#include <sys/types.h> ++#endif + +-int raise __P((int)); ++#include <sys/signal.h> + +-#ifndef _ANSI_SOURCE ++#include <sys/__signal.h> + +-int sigfillset __P((sigset_t *)); +-int sigemptyset __P((sigset_t *)); +-int sigaddset __P((sigset_t *, int)); +-int sigdelset __P((sigset_t *, int)); +-int sigismember __P((const sigset_t *, int)); +-int sigsuspend __P((const sigset_t *)); +-int sigprocmask __P((int, const sigset_t *, sigset_t *)); ++#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ ++ !defined(_XOPEN_SOURCE) ++extern __const char *__const *sys_signame __RENAME(__sys_signame14); ++extern __const char *__const *sys_siglist __RENAME(__sys_siglist14); ++extern __const int sys_nsig __RENAME(__sys_nsig14); ++#endif + +-/* Still need work */ ++__BEGIN_DECLS ++int raise __P((int)); ++#ifndef _ANSI_SOURCE + int kill __P((pid_t, int)); +-int sigaction __P((int, const struct sigaction *, struct sigaction *)); +-int sigpending __P((sigset_t *)); +- +-#ifndef _POSIX_SOURCE + ++#ifdef __LIBC12_SOURCE__ ++int sigaction __P((int, const struct sigaction13 *, struct sigaction13 *)); ++int __sigaction14 __P((int, const struct sigaction *, struct sigaction *)); ++int sigaddset __P((sigset13_t *, int)); ++int __sigaddset14 __P((sigset_t *, int)); ++int sigdelset __P((sigset13_t *, int)); ++int __sigdelset14 __P((sigset_t *, int)); ++int sigemptyset __P((sigset13_t *)); ++int __sigemptyset14 __P((sigset_t *)); ++int sigfillset __P((sigset13_t *)); ++int __sigfillset14 __P((sigset_t *)); ++int sigismember __P((const sigset13_t *, int)); ++int __sigismember14 __P((const sigset_t *, int)); ++int sigpending __P((sigset13_t *)); ++int __sigpending14 __P((sigset_t *)); ++int sigprocmask __P((int, const sigset13_t *, sigset13_t *)); ++int __sigprocmask14 __P((int, const sigset_t *, sigset_t *)); ++int sigsuspend __P((const sigset13_t *)); ++int __sigsuspend14 __P((const sigset_t *)); ++#else /* !__LIBC12_SOURCE__ */ ++int sigaction __P((int, const struct sigaction *, struct sigaction *)) __RENAME(__sigaction14); ++int sigaddset __P((sigset_t *, int)) __RENAME(__sigaddset14); ++int sigdelset __P((sigset_t *, int)) __RENAME(__sigdelset14); ++int sigemptyset __P((sigset_t *)) __RENAME(__sigemptyset14); ++int sigfillset __P((sigset_t *)) __RENAME(__sigfillset14); ++int sigismember __P((const sigset_t *, int)) __RENAME(__sigismember14); ++int sigpending __P((sigset_t *)) __RENAME(__sigpending14); ++int sigprocmask __P((int, const sigset_t *, sigset_t *)) __RENAME(__sigprocmask14); ++int sigsuspend __P((const sigset_t *)) __RENAME(__sigsuspend14); ++ ++#if defined(__GNUC__) && defined(__STDC__) ++extern __inline int ++sigaddset(sigset_t *set, int signo) ++{ ++#ifdef _REENTRANT ++ extern int *__errno __P((void)); ++#else ++ extern int errno; ++#endif ++ ++ if (signo <= 0 || signo >= _NSIG) { ++#ifdef _REENTRANT ++ *__errno() = 22; /* EINVAL */ ++#else ++ errno = 22; /* EINVAL */ ++#endif ++ return (-1); ++ } ++ __sigaddset(set, signo); ++ return (0); ++} ++ ++extern __inline int ++sigdelset(sigset_t *set, int signo) ++{ ++#ifdef _REENTRANT ++ extern int *__errno __P((void)); ++#else ++ extern int errno; ++#endif ++ ++ if (signo <= 0 || signo >= _NSIG) { ++#ifdef _REENTRANT ++ *__errno() = 22; /* EINVAL */ ++#else ++ errno = 22; /* EINVAL */ ++#endif ++ return (-1); ++ } ++ __sigdelset(set, signo); ++ return (0); ++} ++ ++extern __inline int ++sigismember(const sigset_t *set, int signo) ++{ ++#ifdef _REENTRANT ++ extern int *__errno __P((void)); ++#else ++ extern int errno; ++#endif ++ ++ if (signo <= 0 || signo >= _NSIG) { ++#ifdef _REENTRANT ++ *__errno() = 22; /* EINVAL */ ++#else ++ errno = 22; /* EINVAL */ ++#endif ++ return (-1); ++ } ++ return (__sigismember(set, signo)); ++} ++#endif /* __GNUC__ && __STDC__ */ ++ ++/* List definitions after function declarations, or Reiser cpp gets upset. */ ++#define sigemptyset(set) (__sigemptyset(set), /*LINTED*/0) ++#define sigfillset(set) (__sigfillset(set), /*LINTED*/ 0) ++#endif /* !__LIBC12_SOURCE__ */ ++ ++#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \ ++ (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \ ++ (_XOPEN_SOURCE - 0) >= 500 + int killpg __P((pid_t, int)); + int siginterrupt __P((int, int)); +-void psignal __P((unsigned int, const char *)); ++int sigpause __P((int)); ++int sigstack __P((const struct sigstack *, struct sigstack *)); ++#ifdef __LIBC12_SOURCE__ ++int sigaltstack __P((const struct sigaltstack13 *, struct sigaltstack13 *)); ++int __sigaltstack14 __P((const stack_t *, stack_t *)); ++#else ++int sigaltstack __P((const stack_t *, stack_t *)) __RENAME(__sigaltstack14); ++#endif ++#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */ + +-/* int sigpause __P((int)); */ +-/* int sigsetmask __P((int)); */ +-/* int sigblock __P((int)); */ +-/* int sigreturn __P((struct sigcontext *)); */ +-/* int sigvec __P((int, struct sigvec *, struct sigvec *)); */ +-/* int sigstack __P((const struct sigstack *, struct sigstack *)); */ ++#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) ++void psignal __P((unsigned int, const char *)); ++int sigblock __P((int)); ++#ifdef __LIBC12_SOURCE__ ++int sigreturn __P((struct sigcontext13 *)); ++int __sigreturn14 __P((struct sigcontext *)); ++#else ++int sigreturn __P((struct sigcontext *)) __RENAME(__sigreturn14); ++#endif ++int sigsetmask __P((int)); ++int sigvec __P((int, struct sigvec *, struct sigvec *)); ++#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */ + +-#endif /* !_POSIX_SOURCE */ + #endif /* !_ANSI_SOURCE */ +- + __END_DECLS + +-#endif /* !_USER_SIGNAL_H */ ++#endif /* !_SIGNAL_H_ */ |