summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorbad <bad>1999-04-08 21:54:36 +0000
committerbad <bad>1999-04-08 21:54:36 +0000
commita4d70de8b886eac09a0982c1e40cee7967dc3bb1 (patch)
treeda202bfddedd90e862f84e07ec23fa34145127ea /databases
parent1f9a39536022d3e3bbe99ba3b4239f96014546d0 (diff)
downloadpkgsrc-a4d70de8b886eac09a0982c1e40cee7967dc3bb1.tar.gz
Catch up with introduction of socklen_t. Test for this typedef in the
mit-pthreads configure script and define a preprocessor symbol accordingly.
Diffstat (limited to 'databases')
-rw-r--r--databases/mysql/patches/patch-ah51
-rw-r--r--databases/mysql/patches/patch-ak116
-rw-r--r--databases/mysql/patches/patch-bc14
-rw-r--r--databases/mysql/patches/patch-bd83
4 files changed, 256 insertions, 8 deletions
diff --git a/databases/mysql/patches/patch-ah b/databases/mysql/patches/patch-ah
index 7a43d41698f..fc58ed85a78 100644
--- a/databases/mysql/patches/patch-ah
+++ b/databases/mysql/patches/patch-ah
@@ -1,7 +1,7 @@
-$NetBSD: patch-ah,v 1.1 1998/10/28 18:18:08 bad Exp $
+$NetBSD: patch-ah,v 1.2 1999/04/08 21:54:36 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
++++ mit-pthreads/config/configure Sun Mar 21 00:23:46 1999
@@ -1165,6 +1165,12 @@
name=$host_cpu-$host_os
@@ -51,16 +51,55 @@ $NetBSD: patch-ah,v 1.1 1998/10/28 18:18:08 bad Exp $
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
+@@ -1257,6 +1285,12 @@
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
+ 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
diff --git a/databases/mysql/patches/patch-ak b/databases/mysql/patches/patch-ak
index 0882514900b..7c52b87277e 100644
--- a/databases/mysql/patches/patch-ak
+++ b/databases/mysql/patches/patch-ak
@@ -1,7 +1,7 @@
-$NetBSD: patch-ak,v 1.1 1998/10/28 18:18:08 bad Exp $
+$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 Oct 24 22:37:05 1998
++++ 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)
{
@@ -10,3 +10,115 @@ $NetBSD: patch-ak,v 1.1 1998/10/28 18:18:08 bad Exp $
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;
+
diff --git a/databases/mysql/patches/patch-bc b/databases/mysql/patches/patch-bc
new file mode 100644
index 00000000000..f8c5d4e3d49
--- /dev/null
+++ b/databases/mysql/patches/patch-bc
@@ -0,0 +1,14 @@
+$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. */
diff --git a/databases/mysql/patches/patch-bd b/databases/mysql/patches/patch-bd
new file mode 100644
index 00000000000..948f5273285
--- /dev/null
+++ b/databases/mysql/patches/patch-bd
@@ -0,0 +1,83 @@
+$NetBSD: patch-bd,v 1.1 1999/04/08 21:54:37 bad Exp $
+
+--- mit-pthreads/config/configure.in.orig Mon Mar 9 11:30:59 1998
++++ mit-pthreads/config/configure.in Sat Mar 20 23:56:33 1999
+@@ -124,6 +124,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
+@@ -142,6 +148,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
+@@ -176,6 +193,17 @@
+ AC_DEFINE(LD_LINKS_STATIC_DATA)
+ AC_DEFINE(BROKEN_SIGNALS)
+ ;;
++ 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
+@@ -201,6 +229,12 @@
+ 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
+ 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
+
+