summaryrefslogtreecommitdiff
path: root/devel/mit-pthreads
diff options
context:
space:
mode:
authorbad <bad@pkgsrc.org>1999-04-08 19:40:45 +0000
committerbad <bad@pkgsrc.org>1999-04-08 19:40:45 +0000
commit03313567f6351fcb0a41d529f89b9d938aac41d8 (patch)
treead8b9ee3ce608499babd0d6c07f61d372cbb17e2 /devel/mit-pthreads
parenta174c2d26610c2d759283951ed4d73cc324716be (diff)
downloadpkgsrc-03313567f6351fcb0a41d529f89b9d938aac41d8.tar.gz
Fix previous commit. Use a preprocessor symbol to determine whether
the prototypes should use socklen_t or not.
Diffstat (limited to 'devel/mit-pthreads')
-rw-r--r--devel/mit-pthreads/patches/patch-aq99
1 files changed, 55 insertions, 44 deletions
diff --git a/devel/mit-pthreads/patches/patch-aq b/devel/mit-pthreads/patches/patch-aq
index 5c198a1aadd..9f384f117dd 100644
--- a/devel/mit-pthreads/patches/patch-aq
+++ b/devel/mit-pthreads/patches/patch-aq
@@ -1,7 +1,7 @@
-$NetBSD: patch-aq,v 1.3 1999/03/15 16:16:11 explorer Exp $
+$NetBSD: patch-aq,v 1.4 1999/04/08 19:40:45 bad Exp $
--- pthreads/fd_kern.c.orig Tue Oct 1 20:26:48 1996
-+++ pthreads/fd_kern.c Tue Dec 29 00:15:02 1998
++++ pthreads/fd_kern.c Sat Mar 20 22:46:30 1999
@@ -51,6 +51,7 @@
#include <sys/time.h>
#include <sys/uio.h>
@@ -18,104 +18,115 @@ $NetBSD: patch-aq,v 1.3 1999/03/15 16:16:11 explorer Exp $
return(machdep_sys_lseek(fd, offset, whence));
}
-@@ -1078,7 +1078,7 @@
+@@ -1076,7 +1078,11 @@
/* ==========================================================================
* bind()
*/
--int bind(int fd, const struct sockaddr *name, int namelen)
++#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;
-@@ -1100,7 +1100,7 @@
+@@ -1098,7 +1104,11 @@
/* ==========================================================================
* connect()
*/
--int connect(int fd, const struct sockaddr *name, int namelen)
++#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;
-@@ -1148,7 +1148,7 @@
+@@ -1146,7 +1156,11 @@
/* ==========================================================================
* accept()
*/
--int accept(int fd, struct sockaddr *name, int *namelen)
++#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;
-@@ -1284,7 +1284,8 @@
- * sendto_timedwait()
- */
- ssize_t sendto_timedwait(int fd, const void * msg, size_t len,
-- int flags, const struct sockaddr *to, int to_len, struct timespec * timeout)
-+ int flags, const struct sockaddr *to,
-+ socklen_t to_len, struct timespec * timeout)
- {
- int ret;
-
-@@ -1337,7 +1338,7 @@
+@@ -1334,8 +1348,13 @@
+ /* ==========================================================================
* sendto()
*/
- ssize_t sendto(int fd, const void * msg, size_t len, int flags,
-- const struct sockaddr *to, int to_len)
++#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));
}
-@@ -1509,7 +1510,7 @@
- * recvfrom_timedwait()
- */
- ssize_t recvfrom_timedwait(int fd, void * buf, size_t len, int flags,
-- struct sockaddr * from, int * from_len, struct timespec * timeout)
-+ struct sockaddr * from, socklen_t * from_len, struct timespec * timeout)
- {
- int ret;
-
-@@ -1563,7 +1564,7 @@
+@@ -1560,8 +1579,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)
-+ struct sockaddr * from, socklen_t * from_len)
+ struct sockaddr * from, int * from_len)
++#endif
{
return(recvfrom_timedwait(fd, buf, len, flags, from, from_len, NULL));
}
-@@ -1713,7 +1714,8 @@
+@@ -1711,7 +1735,11 @@
/* ==========================================================================
* setsockopt()
*/
--int setsockopt(int fd, int level, int optname, const void * optval, int optlen)
-+int setsockopt(int fd, int level, int optname, const void * optval,
-+ socklen_t optlen)
++#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;
-@@ -1735,7 +1737,7 @@
+@@ -1733,7 +1761,11 @@
/* ==========================================================================
* getsockopt()
*/
--int getsockopt(int fd, int level, int optname, void * optval, int * optlen)
-+int getsockopt(int fd, int level, int optname, void *optval, socklen_t *optlen)
++#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;
-@@ -1757,7 +1759,7 @@
+@@ -1755,7 +1787,11 @@
/* ==========================================================================
* getsockname()
*/
--int getsockname(int fd, struct sockaddr * name, int * naddrlen)
++#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;
-@@ -1779,7 +1781,7 @@
+@@ -1777,7 +1813,11 @@
/* ==========================================================================
* getpeername()
*/
--int getpeername(int fd, struct sockaddr * peer, int * paddrlen)
++#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;