head 1.7; access; symbols pkgsrc-2026Q1:1.7.0.90 pkgsrc-2026Q1-base:1.7 pkgsrc-2025Q4:1.7.0.88 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.86 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.7.0.84 pkgsrc-2025Q2-base:1.7 pkgsrc-2025Q1:1.7.0.82 pkgsrc-2025Q1-base:1.7 pkgsrc-2024Q4:1.7.0.80 pkgsrc-2024Q4-base:1.7 pkgsrc-2024Q3:1.7.0.78 pkgsrc-2024Q3-base:1.7 pkgsrc-2024Q2:1.7.0.76 pkgsrc-2024Q2-base:1.7 pkgsrc-2024Q1:1.7.0.74 pkgsrc-2024Q1-base:1.7 pkgsrc-2023Q4:1.7.0.72 pkgsrc-2023Q4-base:1.7 pkgsrc-2023Q3:1.7.0.70 pkgsrc-2023Q3-base:1.7 pkgsrc-2023Q2:1.7.0.68 pkgsrc-2023Q2-base:1.7 pkgsrc-2023Q1:1.7.0.66 pkgsrc-2023Q1-base:1.7 pkgsrc-2022Q4:1.7.0.64 pkgsrc-2022Q4-base:1.7 pkgsrc-2022Q3:1.7.0.62 pkgsrc-2022Q3-base:1.7 pkgsrc-2022Q2:1.7.0.60 pkgsrc-2022Q2-base:1.7 pkgsrc-2022Q1:1.7.0.58 pkgsrc-2022Q1-base:1.7 pkgsrc-2021Q4:1.7.0.56 pkgsrc-2021Q4-base:1.7 pkgsrc-2021Q3:1.7.0.54 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.7.0.52 pkgsrc-2021Q2-base:1.7 pkgsrc-2021Q1:1.7.0.50 pkgsrc-2021Q1-base:1.7 pkgsrc-2020Q4:1.7.0.48 pkgsrc-2020Q4-base:1.7 pkgsrc-2020Q3:1.7.0.46 pkgsrc-2020Q3-base:1.7 pkgsrc-2020Q2:1.7.0.42 pkgsrc-2020Q2-base:1.7 pkgsrc-2020Q1:1.7.0.22 pkgsrc-2020Q1-base:1.7 pkgsrc-2019Q4:1.7.0.44 pkgsrc-2019Q4-base:1.7 pkgsrc-2019Q3:1.7.0.40 pkgsrc-2019Q3-base:1.7 pkgsrc-2019Q2:1.7.0.38 pkgsrc-2019Q2-base:1.7 pkgsrc-2019Q1:1.7.0.36 pkgsrc-2019Q1-base:1.7 pkgsrc-2018Q4:1.7.0.34 pkgsrc-2018Q4-base:1.7 pkgsrc-2018Q3:1.7.0.32 pkgsrc-2018Q3-base:1.7 pkgsrc-2018Q2:1.7.0.30 pkgsrc-2018Q2-base:1.7 pkgsrc-2018Q1:1.7.0.28 pkgsrc-2018Q1-base:1.7 pkgsrc-2017Q4:1.7.0.26 pkgsrc-2017Q4-base:1.7 pkgsrc-2017Q3:1.7.0.24 pkgsrc-2017Q3-base:1.7 pkgsrc-2017Q2:1.7.0.20 pkgsrc-2017Q2-base:1.7 pkgsrc-2017Q1:1.7.0.18 pkgsrc-2017Q1-base:1.7 pkgsrc-2016Q4:1.7.0.16 pkgsrc-2016Q4-base:1.7 pkgsrc-2016Q3:1.7.0.14 pkgsrc-2016Q3-base:1.7 pkgsrc-2016Q2:1.7.0.12 pkgsrc-2016Q2-base:1.7 pkgsrc-2016Q1:1.7.0.10 pkgsrc-2016Q1-base:1.7 pkgsrc-2015Q4:1.7.0.8 pkgsrc-2015Q4-base:1.7 pkgsrc-2015Q3:1.7.0.6 pkgsrc-2015Q3-base:1.7 pkgsrc-2015Q2:1.7.0.4 pkgsrc-2015Q2-base:1.7 pkgsrc-2015Q1:1.7.0.2 pkgsrc-2015Q1-base:1.7 pkgsrc-2014Q4:1.6.0.68 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.66 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.64 pkgsrc-2014Q2-base:1.6 pkgsrc-2014Q1:1.6.0.62 pkgsrc-2014Q1-base:1.6 pkgsrc-2013Q4:1.6.0.60 pkgsrc-2013Q4-base:1.6 pkgsrc-2013Q3:1.6.0.58 pkgsrc-2013Q3-base:1.6 pkgsrc-2013Q2:1.6.0.56 pkgsrc-2013Q2-base:1.6 pkgsrc-2013Q1:1.6.0.54 pkgsrc-2013Q1-base:1.6 pkgsrc-2012Q4:1.6.0.52 pkgsrc-2012Q4-base:1.6 pkgsrc-2012Q3:1.6.0.50 pkgsrc-2012Q3-base:1.6 pkgsrc-2012Q2:1.6.0.48 pkgsrc-2012Q2-base:1.6 pkgsrc-2012Q1:1.6.0.46 pkgsrc-2012Q1-base:1.6 pkgsrc-2011Q4:1.6.0.44 pkgsrc-2011Q4-base:1.6 pkgsrc-2011Q3:1.6.0.42 pkgsrc-2011Q3-base:1.6 pkgsrc-2011Q2:1.6.0.40 pkgsrc-2011Q2-base:1.6 pkgsrc-2011Q1:1.6.0.38 pkgsrc-2011Q1-base:1.6 pkgsrc-2010Q4:1.6.0.36 pkgsrc-2010Q4-base:1.6 pkgsrc-2010Q3:1.6.0.34 pkgsrc-2010Q3-base:1.6 pkgsrc-2010Q2:1.6.0.32 pkgsrc-2010Q2-base:1.6 pkgsrc-2010Q1:1.6.0.30 pkgsrc-2010Q1-base:1.6 pkgsrc-2009Q4:1.6.0.28 pkgsrc-2009Q4-base:1.6 pkgsrc-2009Q3:1.6.0.26 pkgsrc-2009Q3-base:1.6 pkgsrc-2009Q2:1.6.0.24 pkgsrc-2009Q2-base:1.6 pkgsrc-2009Q1:1.6.0.22 pkgsrc-2009Q1-base:1.6 pkgsrc-2008Q4:1.6.0.20 pkgsrc-2008Q4-base:1.6 pkgsrc-2008Q3:1.6.0.18 pkgsrc-2008Q3-base:1.6 cube-native-xorg:1.6.0.16 cube-native-xorg-base:1.6 pkgsrc-2008Q2:1.6.0.14 pkgsrc-2008Q2-base:1.6 cwrapper:1.6.0.12 pkgsrc-2008Q1:1.6.0.10 pkgsrc-2008Q1-base:1.6 pkgsrc-2007Q4:1.6.0.8 pkgsrc-2007Q4-base:1.6 pkgsrc-2007Q3:1.6.0.6 pkgsrc-2007Q3-base:1.6 pkgsrc-2007Q2:1.6.0.4 pkgsrc-2007Q2-base:1.6 pkgsrc-2007Q1:1.6.0.2 pkgsrc-2007Q1-base:1.6 pkgsrc-2006Q4:1.5.0.22 pkgsrc-2006Q4-base:1.5 pkgsrc-2006Q3:1.5.0.20 pkgsrc-2006Q3-base:1.5 pkgsrc-2006Q2:1.5.0.18 pkgsrc-2006Q2-base:1.5 pkgsrc-2006Q1:1.5.0.16 pkgsrc-2006Q1-base:1.5 pkgsrc-2005Q4:1.5.0.14 pkgsrc-2005Q4-base:1.5 pkgsrc-2005Q3:1.5.0.12 pkgsrc-2005Q3-base:1.5 pkgsrc-2005Q2:1.5.0.10 pkgsrc-2005Q2-base:1.5 pkgsrc-2005Q1:1.5.0.8 pkgsrc-2005Q1-base:1.5 pkgsrc-2004Q4:1.5.0.6 pkgsrc-2004Q4-base:1.5 pkgsrc-2004Q3:1.5.0.4 pkgsrc-2004Q3-base:1.5 pkgsrc-2004Q2:1.5.0.2 pkgsrc-2004Q2-base:1.5 pkgsrc-2004Q1:1.4.0.4 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.2 pkgsrc-2003Q4-base:1.4 netbsd-1-6-1:1.3.0.2 netbsd-1-6-1-base:1.3 netbsd-1-6:1.1.0.8 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.0.4 pkgviews-base:1.1 buildlink2:1.1.0.2 buildlink2-base:1.1 netbsd-1-5-PATCH003:1.1; locks; strict; comment @# @; 1.7 date 2015.03.21.16.18.12; author wiz; state Exp; branches; next 1.6; commitid qXnWe1s3czWKyuey; 1.6 date 2007.02.18.11.40.10; author wiz; state Exp; branches; next 1.5; 1.5 date 2004.04.19.12.16.08; author skrll; state Exp; branches; next 1.4; 1.4 date 2003.05.02.11.49.48; author wiz; state Exp; branches; next 1.3; 1.3 date 2003.02.04.17.31.17; author drochner; state Exp; branches; next 1.2; 1.2 date 2002.10.14.11.49.56; author skrll; state Exp; branches; next 1.1; 1.1 date 2001.05.14.20.21.20; author skrll; state Exp; branches; next ; desc @@ 1.7 log @Adapt syscall name patch for NetBSD>=6.0. From Yasushi Oshima in PR 49759. @ text @$NetBSD$ Fix syscall names on NetBSD. --- pth_syscall.c.orig 2006-06-08 17:54:03.000000000 +0000 +++ pth_syscall.c @@@@ -57,6 +57,7 @@@@ #define sendto __pth_sys_sendto #define pread __pth_sys_pread #define pwrite __pth_sys_pwrite +#define wait4 __pth_sys_wait4 /* include the private header and this way system headers */ #include "pth_p.h" @@@@ -108,6 +109,7 @@@@ int pth_syscall_hard = PTH_SYSCALL_HARD; #undef sendto #undef pread #undef pwrite +#undef wait4 /* internal data structures */ #if cpp @@@@ -157,15 +159,28 @@@@ intern pth_syscall_fct_tab_t pth_syscall #define PTH_SCF_sendto 19 #define PTH_SCF_pread 20 #define PTH_SCF_pwrite 21 +#define PTH_SCF_wait4 22 { "fork", NULL }, { "waitpid", NULL }, { "system", NULL }, +#if defined(__NetBSD__) && defined(SYS___nanosleep50) + { "__nanosleep50", NULL }, +#else { "nanosleep", NULL }, +#endif { "usleep", NULL }, { "sleep", NULL }, +#if defined(__NetBSD__) + { "__sigprocmask14", NULL }, +#else { "sigprocmask", NULL }, +#endif { "sigwait", NULL }, +#if defined(__NetBSD__) && defined(SYS___select50) + { "__select50", NULL }, +#else { "select", NULL }, +#endif { "poll", NULL }, { "connect", NULL }, { "accept", NULL }, @@@@ -179,6 +194,11 @@@@ intern pth_syscall_fct_tab_t pth_syscall { "sendto", NULL }, { "pread", NULL }, { "pwrite", NULL }, +#if defined(__NetBSD__) && defined(SYS___wait450) + { "__wait450", NULL }, +#else + { "wait4", NULL }, +#endif { NULL, NULL } }; #endif @@@@ -405,6 +425,10 @@@@ 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); +#elif defined(HAVE_SYSCALL) && defined(SYS___wait450) + else return (pid_t)syscall(SYS___wait450, wpid, status, options, (struct rusage *) NULL); #else else PTH_SYSCALL_ERROR(-1, ENOSYS, "waitpid"); #endif @@@@ -491,6 +515,8 @@@@ intern int pth_sc_select(int nfds, fd_se else return (int)syscall(SYS__newselect, nfds, readfds, writefds, exceptfds, timeout); #elif defined(HAVE_SYSCALL) && defined(SYS_select) else return (int)syscall(SYS_select, nfds, readfds, writefds, exceptfds, timeout); +#elif defined(HAVE_SYSCALL) && defined(SYS___select50) + else return (int)syscall(SYS___select50, nfds, readfds, writefds, exceptfds, timeout); #else else PTH_SYSCALL_ERROR(-1, ENOSYS, "accept"); #endif @@@@ -721,5 +747,29 @@@@ intern ssize_t pth_sc_sendto(int fd, con #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) +{ + /* external entry point for application */ + pth_implicit_init(); + return pth_wait4(wpid, status, options, rusage); +} +intern pid_t pth_sc_wait4(pid_t wpid, int *status, int options, struct rusage *rusage) +{ + /* internal exit point for Pth */ + if (pth_syscall_fct_tab[PTH_SCF_wait4].addr != NULL) + return ((pid_t (*)(pid_t, int *, int, struct rusage *)) + pth_syscall_fct_tab[PTH_SCF_wait4].addr) + (wpid, status, options, rusage); +#if defined(HAVE_SYSCALL) && defined(SYS_wait4) + else return (pid_t)syscall(SYS_wait4, wpid, status, options, rusage); +#elif defined(HAVE_SYSCALL) && defined(SYS___wait450) + else return (pid_t)syscall(SYS___wait450, wpid, status, options, rusage); +#else + else PTH_SYSCALL_ERROR(-1, ENOSYS, "wait4"); +#endif +} + #endif /* PTH_SYSCALL_HARD */ @ 1.6 log @Update to 2.0.7: Changes between 2.0.6 and 2.0.7 (22-Nov-2005 to 08-Jun-2006) *) Let AC_CHECK_PTH use "pth-config --libs --all" instead of just "pth-config --libs" to allow it to work under platforms like Solaris where additional libraries are required. [Ralf S. Engelschall] Changes between 2.0.5 and 2.0.6 (05-Oct-2005 to 22-Nov-2005) *) Add a missing "break" in pth_attr.c:pth_attr_ctrl(). [Stefan Schippers ] *) Return an error if pth_kill() is called before pth_init(). [Martin Kraemer ] Changes between 2.0.3 and 2.0.4 (03-Dec-2004 to 18-Feb-2005) *) Fix internal determination of maximum number in a size_t in the string formatter engine. [Ralf S. Engelschall] *) Add quotes around function names for AC_DEFUN in pth.m4 to avoid warnings about "underquoted definitions". [Stephane Loeuillet ] *) Do not insist on writing to the source directory on "make install" in order to more closely follow GNU standards. [Bruno Haible ] *) Remove "*.bak" and "*~" files under "make distclean" instead of "make clean". [Bruno Haible ] Changes between 2.0.2 and 2.0.3 (12-Sep-2004 to 03-Dec-2004) *) Resurrect the old "make striptease" command by fixing the configure run-time in the stripped down source tree and fixing the list of source files. [Ralf S. Engelschall] *) The pth_uctx_save() and pth_uctx_restore() API functions unfortunately were broken by design because they are C _functions_. This leads to one more deadly nesting on the run-time stack which effectively caused the pth_mctx_restore() in pth_uctx_restore() to return to the end of pth_uctx_save() but then the control flow unfortunately returns to the pth_uctx_restore() caller instead of the pth_uctx_save() caller because the call to pth_uctx_restore() had already overwritten the run-time stack position where the original return address for the pth_uctx_save() call was stored. The only workaround would be to #define pth_uctx_save() and pth_uctx_restore() as C _macros_, but this then would require that lots of the GNU Pth internals from pth_mctx.c would have to be exported in the GNU Pth API (which in turn is not acceptable). So, the only consequence is to remove the two functions again from the GNU Pth API. [Ralf S. Engelschall, Stefan Brantschen ] *) Enhance internal pth_mctx_save() if getcontext(3) is used for the machine context saving by better emulating the setjmp(3) style return code semantics. [Ralf S. Engelschall] *) Do not break in pth_msgport_find() if a message port was created with a NULL name. [Ralf S. Engelschall] *) Better error checking in pth_key_xxx() functions. [Ralf S. Engelschall] *) Added PTH_CTRL_FAVOURNEW control which allows the user to disable the favouring of new threads on scheduling to get more strict priority based scheduling behavior. [Ralf S. Engelschall, Vinu V ] Changes between 2.0.1 and 2.0.2 (13-Jul-2004 to 12-Sep-2004) *) Added hard syscall wrappers for send(2) and recv(2). [NetBSD pkgsrc patches] *) Internally handle errors returned from pth_event() in order to pass them upstream to the caller in pth_high.c functions. [Ralf S. Engelschall, NetBSD pkgsrc patches] *) Fix syscall wrapper for sendto(2). [NetBSD pkgsrc patches] *) Use "(char *)NULL" instead of plain "NULL" in last argument to execl(2) to avoid GCC 3.5's "warning: missing sentinel in function call". [Ralf S. Engelschall] *) Workaround Autoconf/m4 problems in pth.m4 by using "m4_define" instead of just "define" and no using m4_undefine at all. [Dr. Andreas Mueller ] *) Avoid side-effects by defining _XOPEN_SOURCE only temporarily for inclusion of instead of permanently. [Graham Nash ] *) Workaround GCC 2.x and 3.5 (3.4 worked fine) macro parsing behaviour by using a pre-declared function pointer type "typedef int (*pth_event_func_t)(void *);" instead of using an inlined "int (*)(void *)". [Ralf S. Engelschall, Robert Anderson ] *) Fixed prototype for pthread_attr_setschedparam(3) from to use a "const struct sched_param *" argument. [Rafael Ávila de Espíndola ] Changes between 2.0.0 and 2.0.1 (17-Feb-2003 to 13-Jul-2004) *) Fix handling/casting of "int (*)(void *)" callback functions. [Ralf S. Engelschall] *) Resolve symbol conflict in pth_string.c between pow10/round and GCC builtins. [Ralf S. Engelschall] *) Use GCC 3.3 option "-fno-strict-aliasing" (if available) under Autoconf option "--enable-debug" because mainly pth_mctx.c contains important and correct pointer casting constructs which are not acceptable in "strict aliasing" for GCC. [Ralf S. Engelschall] *) Fixed implementation so that --enable-pthread now correctly implies --enable-syscall-soft. [Steve Alstrin , Ralf S. Engelschall] *) Replace some 0 by more politically correct NULL in pth_string.c [Ralf S. Engelschall] @ text @d1 3 a3 1 $NetBSD: patch-ad,v 1.5 2004/04/19 12:16:08 skrll Exp $ d23 1 a23 1 @@@@ -157,13 +159,18 @@@@ intern pth_syscall_fct_tab_t pth_syscall d31 3 d35 1 d44 3 d48 1 d50 3 a52 1 @@@@ -179,6 +186,7 @@@@ intern pth_syscall_fct_tab_t pth_syscall d56 3 d60 1 d64 1 a64 1 @@@@ -405,6 +413,8 @@@@ intern pid_t pth_sc_waitpid(pid_t wpid, d70 2 d75 10 a84 1 @@@@ -721,5 +731,27 @@@@ intern ssize_t pth_sc_sendto(int fd, con d105 2 @ 1.5 log @Enable wrappers for waitpid, recv, and send per PR 24704. PR and patch from ITOH Yasufumi. PKGREVISION++ @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- pth_syscall.c.orig Wed Jan 1 15:45:06 2003 d57 1 a57 1 @@@@ -651,6 +661,52 @@@@ intern ssize_t pth_sc_recvfrom(int fd, v a60 63 +ssize_t recv(int, void *, size_t, int); +ssize_t recv(int fd, void *buf, size_t nbytes, int flags) +{ + /* external entry point for application */ + pth_implicit_init(); + return pth_recv(fd, buf, nbytes, flags); +} +intern ssize_t pth_sc_recv(int fd, void *buf, size_t nbytes, int flags) +{ + /* internal exit point for Pth */ + if (pth_syscall_fct_tab[PTH_SCF_recv].addr != NULL) + return ((ssize_t (*)(int, void *, size_t, int)) + pth_syscall_fct_tab[PTH_SCF_recv].addr) + (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 +} + +ssize_t send(int, void *, size_t, int); +ssize_t send(int fd, void *buf, size_t nbytes, int flags) +{ + /* external entry point for application */ + pth_implicit_init(); + return pth_send(fd, buf, nbytes, flags); +} +intern ssize_t pth_sc_send(int fd, void *buf, size_t nbytes, int flags) +{ + /* internal exit point for Pth */ + if (pth_syscall_fct_tab[PTH_SCF_send].addr != NULL) + return ((ssize_t (*)(int, void *, size_t, int)) + pth_syscall_fct_tab[PTH_SCF_send].addr) + (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 +} + /* ==== 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,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)) - pth_syscall_fct_tab[PTH_SCF_recvfrom].addr) + pth_syscall_fct_tab[PTH_SCF_sendto].addr) (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); #else else PTH_SYSCALL_ERROR(-1, ENOSYS, "sendto"); +#endif +} + d80 4 a83 2 #endif } @ 1.4 log @Update to 2.0.0, supplied by skrll@@netbsd. Changes: *) Make pth_poll(3) more compliant to POSIX.1-2001/SUSv3 poll(2). *) Make pth_select(3) more compliant to POSIX.1-2001/SUSv3 select(2). *) Replaced pth_event_occurred() with pth_event_status(). *) Add Autoconf option --with-fdsetsize=NUM for enlarging FD_SETSIZE. *) Added thread attribute PTH_ATTR_DISPATCHES. *) Added sub-API pth_uctx_* for user-space context switching. *) Add a Pth variant of the new POSIX pselect(2) function. *) Internally cleaned up the error handling macros. *) Added POSIX-compliant sanity checks for bad fds. *) Added pth_nanosleep() function. *) Allow a NULL name for pth_msgport_create() *) Completely rewrote the "hard syscall mapping". *) Added support to pth_poll(3) for POLLD{RD,WR}{NORM,BAND}. *) Fixed a long-standing termination bug in pth_exit(3). *) Upgraded to Autoconf 2.57, Shtool 1.6.2 and Libtool 1.4.3. *) Add optional support for OSSP ex based exception handling. @ text @d3 2 a4 2 --- pth_syscall.c.orig 2003-01-01 16:45:06.000000000 +0100 +++ pth_syscall.c 2003-04-15 14:31:43.000000000 +0200 d13 1 a13 1 @@@@ -108,6 +109,7 @@@@ d21 1 a21 1 @@@@ -157,13 +159,18 @@@@ d40 1 a40 1 @@@@ -179,6 +186,7 @@@@ d48 10 a57 1 @@@@ -651,6 +659,48 @@@@ d77 2 d100 2 d110 1 a110 1 @@@@ -664,7 +714,7 @@@@ d119 5 a123 4 @@@@ -673,5 +723,27 @@@@ #endif } d143 2 a144 4 +#endif +} + #endif /* PTH_SYSCALL_HARD */ @ 1.3 log @PTH_SYSCALL_HARD's fork() replacement didn't work on archs where the system call's return values are postprocessed by the libc stub (eg alpha). Change pth to call libc's internal _fork(). This is only available since NetBSD-1.5, older releases are SOL -- sorry, but we need something working for 1.6.1. We should audit all the PTH_SYSCALL_HARD plugins whether they neglect libc assembler magic... bump PKGREVISION @ text @d3 17 a19 4 --- pth_syscall.c.orig Sun Jan 27 12:03:41 2002 +++ pth_syscall.c Thu Sep 12 09:28:44 2002 @@@@ -50,7 +50,7 @@@@ /* Pth hard wrapper for syscall fork(2) */ d21 28 a48 5 #if defined(SYS_fork) -#define PTH_SC_fork() ((pid_t)syscall(SYS_fork)) +#define PTH_SC_fork() ((pid_t)_fork()) #else #define PTH_SC_fork fork a49 1 @@@@ -63,6 +63,24 @@@@ a50 1 #endif d52 2 a53 3 +/* Pth hard wrapper for nanosleep(2) [internally fully emulated] */ +#if PTH_SYSCALL_HARD +int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) d55 1 d57 1 a57 1 + return pth_nanosleep(rqtp, rmtp); d59 11 d71 1 d73 2 a74 3 +/* Pth hard wrapper for usleep(3) [internally fully emulated] */ +#if PTH_SYSCALL_HARD +int usleep(useconds_t usec) d76 1 d78 1 a78 1 + return pth_usleep(usec); d80 11 d92 1 d94 13 a106 11 /* Pth hard wrapper for sleep(3) [internally fully emulated] */ #if PTH_SYSCALL_HARD unsigned int sleep(unsigned int sec) @@@@ -85,11 +103,13 @@@@ #if cpp #if defined(SYS_sigprocmask) #define PTH_SC_sigprocmask(a1,a2,a3) ((int)syscall(SYS_sigprocmask,(a1),(a2),(a3))) +#elif defined(SYS___sigprocmask14) +#define PTH_SC_sigprocmask(a1,a2,a3) ((int)syscall(SYS___sigprocmask14,(a1),(a2),(a3))) #else #define PTH_SC_sigprocmask sigprocmask d108 4 a111 22 #endif /* cpp */ -#if PTH_SYSCALL_HARD && defined(SYS_sigprocmask) +#if PTH_SYSCALL_HARD && (defined(SYS_sigprocmask) || defined(SYS___sigprocmask14)) int sigprocmask(int how, const sigset_t *set, sigset_t *oset) { pth_implicit_init(); @@@@ -119,6 +139,22 @@@@ { pth_implicit_init(); return pth_waitpid(wpid, status, options); +} +#endif + +/* Pth hard wrapper for syscall wait4(2) */ +#if cpp +#if defined(SYS_wait4) +#define PTH_SC_wait4(a1,a2,a3,a4) ((int)syscall(SYS_wait4,(a1),(a2),(a3),(a4))) +#else +#define PTH_SC_wait4 wait4 +#endif +#endif /* cpp */ +#if PTH_SYSCALL_HARD && defined(SYS_wait4) d114 1 d117 16 a132 2 } #endif @ 1.2 log @Various updates and fixes that I've collected recently: * Provide nanosleep(2) and usleep(3) wrappers. * Make sure sigprocmask syscalls are used in pth_system. * "Fix" FD_SET handling in the select(2) wrapper so that mismatches between pth FD_SETSIZE and user program FD_SETSIZE don't cause problems. * Update poll(2) wrapper to be more poll(2) like - in particular never return EINVAL for bad file descriptors Thanks to Matthias Drochner for this. * Improve error handling in connect(2) wrapper so that we don't confuse the scheduler. This fixes pkg/17944 from Christian Biere (ChristianBiere at gmx dot de) * Introduce autoconf handling of the value of FD_SETSIZE used by pth. If we have to hard code a value we might as well make it easy to change and make the inclusion of pth.h or pthread.h by a program that re-defines FD_SETSIZE an error. Inspired by pkg/17944. * Fix a compiler warning that I introduced a little while ago. * Disable --enable-syscall-hard for non-NetBSD platforms and for pre-1.6/m68k. Make a note of the PRs that need fixing. This closes pkg/18236 from Klaus Heinz (k dot heinz dot sep dot zwei at onlinehome dot de) The FD_SETSIZE problems would be handled better if pth was changed to use poll(2), and not select(2), internally. @ text @d3 12 a14 3 --- pth_syscall.c.orig Sun Jan 27 11:03:41 2002 +++ pth_syscall.c @@@@ -63,6 +63,24 @@@@ pid_t fork(void) d39 1 a39 1 @@@@ -85,11 +103,13 @@@@ int system(const char *cmd) d54 1 a54 1 @@@@ -119,6 +139,22 @@@@ pid_t waitpid(pid_t wpid, int *status, i @ 1.1 log @When --enable-syscall-hard is specified actually provide wrappers for all the syscalls that are documented as having wrappers. The ones missing were wait4 and sigprocmask. Patches have been sent to package maintainer. @ text @d3 1 a3 1 --- pth_syscall.c.orig Sat Mar 24 14:50:03 2001 d5 26 a30 1 @@@@ -85,11 +85,13 @@@@ d45 1 a45 1 @@@@ -119,6 +121,22 @@@@ @