pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/pth Enable wrappers for waitpid, recv, and send ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/eeadd3ea31e7
branches:  trunk
changeset: 473380:eeadd3ea31e7
user:      skrll <skrll%pkgsrc.org@localhost>
date:      Mon Apr 19 12:16:08 2004 +0000

description:
Enable wrappers for waitpid, recv, and send per PR 24704.

PR and patch from ITOH Yasufumi.

PKGREVISION++

diffstat:

 devel/pth/Makefile         |   3 ++-
 devel/pth/distinfo         |   4 ++--
 devel/pth/patches/patch-ad |  44 ++++++++++++++++++++++++++++----------------
 3 files changed, 32 insertions(+), 19 deletions(-)

diffs (142 lines):

diff -r c8fa41aaa9cc -r eeadd3ea31e7 devel/pth/Makefile
--- a/devel/pth/Makefile        Mon Apr 19 10:17:01 2004 +0000
+++ b/devel/pth/Makefile        Mon Apr 19 12:16:08 2004 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.62 2004/02/14 17:21:39 jlam Exp $
+# $NetBSD: Makefile,v 1.63 2004/04/19 12:16:08 skrll Exp $
 #
 
 DISTNAME=              pth-2.0.0
+PKGREVISION=           1
 CATEGORIES=            devel
 MASTER_SITES=          ${MASTER_SITE_GNU:=pth/}
 
diff -r c8fa41aaa9cc -r eeadd3ea31e7 devel/pth/distinfo
--- a/devel/pth/distinfo        Mon Apr 19 10:17:01 2004 +0000
+++ b/devel/pth/distinfo        Mon Apr 19 12:16:08 2004 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.12 2003/05/02 11:49:47 wiz Exp $
+$NetBSD: distinfo,v 1.13 2004/04/19 12:16:08 skrll Exp $
 
 SHA1 (pth-2.0.0.tar.gz) = 91b7593e5435604090c3974a8584478877194533
 Size (pth-2.0.0.tar.gz) = 536605 bytes
 SHA1 (patch-ab) = d320382a2b9e77ea7b370b3f2078df26c960ff65
 SHA1 (patch-ac) = 44ce534ede37844cf783982df7d1248f19d2c48f
-SHA1 (patch-ad) = 0e9e94d8801e61153a4676c796d81092fb3372b2
+SHA1 (patch-ad) = 18bb009f47e525467b5a665e02c3e7af2a47dbeb
 SHA1 (patch-ae) = 018d915157250da6b10ac7a5d51a82d5564744fe
 SHA1 (patch-af) = 52389585d900f39e83b3535ada2d32081552a918
 SHA1 (patch-ag) = 44108eddea2a672572646534a53dd0828b704108
diff -r c8fa41aaa9cc -r eeadd3ea31e7 devel/pth/patches/patch-ad
--- a/devel/pth/patches/patch-ad        Mon Apr 19 10:17:01 2004 +0000
+++ b/devel/pth/patches/patch-ad        Mon Apr 19 12:16:08 2004 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.4 2003/05/02 11:49:48 wiz Exp $
+$NetBSD: patch-ad,v 1.5 2004/04/19 12:16:08 skrll Exp $
 
---- pth_syscall.c.orig 2003-01-01 16:45:06.000000000 +0100
-+++ pth_syscall.c      2003-04-15 14:31:43.000000000 +0200
+--- pth_syscall.c.orig Wed Jan  1 15:45:06 2003
++++ pth_syscall.c
 @@ -57,6 +57,7 @@
  #define sendto        __pth_sys_sendto
  #define pread         __pth_sys_pread
@@ -10,7 +10,7 @@
  
  /* include the private header and this way system headers */
  #include "pth_p.h"
-@@ -108,6 +109,7 @@
+@@ -108,6 +109,7 @@ int pth_syscall_hard = PTH_SYSCALL_HARD;
  #undef sendto
  #undef pread
  #undef pwrite
@@ -18,7 +18,7 @@
  
  /* internal data structures */
  #if cpp
-@@ -157,13 +159,18 @@
+@@ -157,13 +159,18 @@ intern pth_syscall_fct_tab_t pth_syscall
  #define PTH_SCF_sendto        19
  #define PTH_SCF_pread         20
  #define PTH_SCF_pwrite        21
@@ -37,7 +37,7 @@
      { "sigwait",     NULL },
      { "select",      NULL },
      { "poll",        NULL },
-@@ -179,6 +186,7 @@
+@@ -179,6 +186,7 @@ intern pth_syscall_fct_tab_t pth_syscall
      { "sendto",      NULL },
      { "pread",       NULL },
      { "pwrite",      NULL },
@@ -45,7 +45,16 @@
      { NULL,          NULL }
  };
  #endif
-@@ -651,6 +659,48 @@
+@@ -405,6 +413,8 @@ intern pid_t pth_sc_waitpid(pid_t wpid, 
+                (wpid, status, options);
+ #if defined(HAVE_SYSCALL) && defined(SYS_waitpid)
+     else return (pid_t)syscall(SYS_waitpid, wpid, status, options);
++#elif defined(HAVE_SYSCALL) && defined(SYS_wait4)
++    else return (pid_t)syscall(SYS_wait4, wpid, status, options, (struct rusage *) NULL);
+ #else
+     else PTH_SYSCALL_ERROR(-1, ENOSYS, "waitpid");
+ #endif
+@@ -651,6 +661,52 @@ intern ssize_t pth_sc_recvfrom(int fd, v
  #endif
  }
  
@@ -65,6 +74,8 @@
 +               (fd, buf, nbytes, flags);
 +#if defined(HAVE_SYSCALL) && defined(SYS_recv)
 +    else return (ssize_t)syscall(SYS_recv, fd, buf, nbytes, flags);
++#elif defined(HAVE_SYSCALL) && defined(SYS_recvfrom)
++    else return (ssize_t)syscall(SYS_recvfrom, fd, buf, nbytes, flags, (struct sockaddr *) NULL, (socklen_t *) NULL);
 +#else
 +    else PTH_SYSCALL_ERROR(-1, ENOSYS, "recv");
 +#endif
@@ -86,6 +97,8 @@
 +               (fd, buf, nbytes, flags);
 +#if defined(HAVE_SYSCALL) && defined(SYS_send)
 +    else return (ssize_t)syscall(SYS_send, fd, buf, nbytes, flags);
++#elif defined(HAVE_SYSCALL) && defined(SYS_sendto)
++    else return (ssize_t)syscall(SYS_sendto, fd, buf, nbytes, flags, (struct sockaddr *) NULL, NULL);
 +#else
 +    else PTH_SYSCALL_ERROR(-1, ENOSYS, "send");
 +#endif
@@ -94,7 +107,7 @@
  /* ==== Pth hard syscall wrapper for sendto(2) ==== */
  ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t);
  ssize_t sendto(int fd, const void *buf, size_t nbytes, int flags, const struct sockaddr *to, socklen_t tolen)
-@@ -664,7 +714,7 @@
+@@ -664,12 +720,34 @@ intern ssize_t pth_sc_sendto(int fd, con
      /* internal exit point for Pth */
      if (pth_syscall_fct_tab[PTH_SCF_sendto].addr != NULL)
          return ((ssize_t (*)(int, const void *, size_t, int, const struct sockaddr *, socklen_t))
@@ -103,10 +116,11 @@
                 (fd, buf, nbytes, flags, to, tolen);
  #if defined(HAVE_SYSCALL) && defined(SYS_sendto)
      else return (ssize_t)syscall(SYS_sendto, fd, buf, nbytes, flags, to, tolen);
-@@ -673,5 +723,27 @@
- #endif
- }
- 
+ #else
+     else PTH_SYSCALL_ERROR(-1, ENOSYS, "sendto");
++#endif
++}
++
 +/* ==== Pth hard syscall wrapper for wait4(2) ==== */
 +pid_t wait4(pid_t, int *, int, struct rusage *);
 +pid_t wait4(pid_t wpid, int *status, int options, struct rusage *rusage)
@@ -126,8 +140,6 @@
 +    else return (pid_t)syscall(SYS_wait4, wpid, status, options, rusage);
 +#else
 +    else PTH_SYSCALL_ERROR(-1, ENOSYS, "wait4");
-+#endif
-+}
-+
- #endif /* PTH_SYSCALL_HARD */
+ #endif
+ }
  



Home | Main Index | Thread Index | Old Index