diff options
Diffstat (limited to 'devel/pth')
-rw-r--r-- | devel/pth/Makefile | 11 | ||||
-rw-r--r-- | devel/pth/buildlink2.mk | 4 | ||||
-rw-r--r-- | devel/pth/distinfo | 24 | ||||
-rw-r--r-- | devel/pth/patches/patch-aa | 30 | ||||
-rw-r--r-- | devel/pth/patches/patch-ab | 366 | ||||
-rw-r--r-- | devel/pth/patches/patch-ac | 436 | ||||
-rw-r--r-- | devel/pth/patches/patch-ad | 167 | ||||
-rw-r--r-- | devel/pth/patches/patch-ae | 41 | ||||
-rw-r--r-- | devel/pth/patches/patch-af | 32 | ||||
-rw-r--r-- | devel/pth/patches/patch-ag | 43 | ||||
-rw-r--r-- | devel/pth/patches/patch-ah | 53 | ||||
-rw-r--r-- | devel/pth/patches/patch-ai | 18 | ||||
-rw-r--r-- | devel/pth/patches/patch-aj | 10 | ||||
-rw-r--r-- | devel/pth/patches/patch-ak | 38 |
14 files changed, 372 insertions, 901 deletions
diff --git a/devel/pth/Makefile b/devel/pth/Makefile index b5f971a377c..3b611b0b31f 100644 --- a/devel/pth/Makefile +++ b/devel/pth/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.55 2003/02/04 17:31:16 drochner Exp $ +# $NetBSD: Makefile,v 1.56 2003/05/02 11:49:47 wiz Exp $ # -DISTNAME= pth-1.4.1 -PKGREVISION= 7 +DISTNAME= pth-2.0.0 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNU:=pth/} @@ -14,7 +13,7 @@ CONFLICTS= pth-current-[0-9]* pth-syscall<1.4.1nb1 USE_BUILDLINK2= YES USE_LIBTOOL= YES -LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig +LIBTOOL_OVERRIDE= ${WRKSRC}/libtool GNU_CONFIGURE= YES CONFIGURE_ARGS+= --enable-pthread CONFIGURE_ARGS+= --with-fdsetsize=1024 @@ -23,8 +22,8 @@ CONFIG_GUESS_OVERRIDE= ${WRKSRC}/config.guess CONFIG_SUB_OVERRIDE= ${WRKSRC}/config.sub # for PLIST -PTH_MAJOR= 14 -PTH_MINOR= 21 +PTH_MAJOR= 20 +PTH_MINOR= 20 PLIST_SUBST+= PTH_MAJOR=${PTH_MAJOR} PTH_MINOR=${PTH_MINOR} .include "../../mk/bsd.prefs.mk" diff --git a/devel/pth/buildlink2.mk b/devel/pth/buildlink2.mk index ad8ef0716b8..26ff9b2af86 100644 --- a/devel/pth/buildlink2.mk +++ b/devel/pth/buildlink2.mk @@ -1,10 +1,10 @@ -# $NetBSD: buildlink2.mk,v 1.3 2002/11/01 06:09:37 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.4 2003/05/02 11:49:47 wiz Exp $ .if !defined(PTH_BUILDLINK2_MK) PTH_BUILDLINK2_MK= # defined BUILDLINK_PACKAGES+= pth -BUILDLINK_DEPENDS.pth?= pth>=1.4.1.nb5 +BUILDLINK_DEPENDS.pth?= pth>=2.0.0 BUILDLINK_PKGSRCDIR.pth?= ../../devel/pth EVAL_PREFIX+= BUILDLINK_PREFIX.pth=pth diff --git a/devel/pth/distinfo b/devel/pth/distinfo index b29261e9d59..2308e17bfef 100644 --- a/devel/pth/distinfo +++ b/devel/pth/distinfo @@ -1,15 +1,11 @@ -$NetBSD: distinfo,v 1.11 2003/02/04 17:31:17 drochner Exp $ +$NetBSD: distinfo,v 1.12 2003/05/02 11:49:47 wiz Exp $ -SHA1 (pth-1.4.1.tar.gz) = bc5b0847d57d2b78945a6c8d4ebab57e46213972 -Size (pth-1.4.1.tar.gz) = 446287 bytes -SHA1 (patch-aa) = c2fafc8eba5f084468fe0d07b1763d801b9ead89 -SHA1 (patch-ab) = 41dfb1d339d71ed344ab320d4f430ea8e1a04722 -SHA1 (patch-ac) = 0c9409f90cfe3d8794af03236055b1bb27e9f88a -SHA1 (patch-ad) = 8daac8cd014d18803fc53038dbfa8da4336752a9 -SHA1 (patch-ae) = 11ab7aa4e84eb01bb3956fdb58ff8d5f7e04a434 -SHA1 (patch-af) = e6d065052b935a6a689603675b7d8a473b995a5b -SHA1 (patch-ag) = 1f4cdebe81b10e0cb9e38e6f3cb5aeb521038755 -SHA1 (patch-ah) = e9080d4b1e81fd0058233cf776ac49d56d01b79a -SHA1 (patch-ai) = 0e9ef6a500470df351d616933fa086ad21e8b90c -SHA1 (patch-aj) = 7d45920f6d8aba1de8dd6a69f1ce4591c81247d2 -SHA1 (patch-ak) = 7a84b9e71466a7bb9c1eea0c0815b19d5dee5ad1 +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-ae) = 018d915157250da6b10ac7a5d51a82d5564744fe +SHA1 (patch-af) = 52389585d900f39e83b3535ada2d32081552a918 +SHA1 (patch-ag) = 44108eddea2a672572646534a53dd0828b704108 +SHA1 (patch-aj) = f155cac115446efce191b859d92900d1ea3bc44b diff --git a/devel/pth/patches/patch-aa b/devel/pth/patches/patch-aa deleted file mode 100644 index 8268a8e36cc..00000000000 --- a/devel/pth/patches/patch-aa +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-aa,v 1.13 2001/04/05 12:16:23 rh Exp $ - ---- Makefile.in.orig Thu Apr 5 10:27:27 2001 -+++ Makefile.in -@@ -59,7 +59,7 @@ - MKFLAGS = $(MFLAGS) DESTDIR=$(DESTDIR) - LIBS = @LIBS@ - SHTOOL = $(srcdir)/shtool --LIBTOOL = $(C)libtool -+LIBTOOL = @LIBTOOL@ - RM = rm -f - RMDIR = rmdir - TRUE = true -@@ -232,14 +232,14 @@ - $(SHTOOL) install -c -m 644 $(S)pth.m4 $(DESTDIR)$(datadir)/aclocal/pth.m4 - $(SHTOOL) install -c -m 644 pth.h $(DESTDIR)$(includedir)/pth.h - @umask 022; $(LIBTOOL) --mode=install \ -- $(SHTOOL) install -c libpth.la $(DESTDIR)$(libdir)/libpth.la -+ install -c libpth.la $(DESTDIR)$(libdir)/libpth.la - install-pthread: - $(SHTOOL) install -c -m 755 pthread-config $(DESTDIR)$(bindir)/pthread-config - $(SHTOOL) install -c -m 644 $(S)pthread-config.1 $(DESTDIR)$(mandir)/man1/pthread-config.1 - $(SHTOOL) install -c -m 644 pthread.h $(DESTDIR)$(includedir)/pthread.h - $(SHTOOL) install -c -m 644 $(S)pthread.3 $(DESTDIR)$(mandir)/man3/pthread.3 - @umask 022; $(LIBTOOL) --mode=install \ -- $(SHTOOL) install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la -+ install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la - - # uninstall the package - uninstall: diff --git a/devel/pth/patches/patch-ab b/devel/pth/patches/patch-ab index 8d0049c3dcc..a2f8e9d71e6 100644 --- a/devel/pth/patches/patch-ab +++ b/devel/pth/patches/patch-ab @@ -1,193 +1,170 @@ -$NetBSD: patch-ab,v 1.14 2002/10/14 11:49:55 skrll Exp $ +$NetBSD: patch-ab,v 1.15 2003/05/02 11:49:48 wiz Exp $ ---- configure.orig Sun Jan 27 12:29:59 2002 +--- configure.orig Mon Feb 17 10:53:15 2003 +++ configure -@@ -139,6 +139,8 @@ ac_help="$ac_help - ac_help="$ac_help - --enable-shared build shared libraries (default=yes)" - ac_help="$ac_help -+ --with-fdsetsize=NUM set FD_SETSIZE" -+ac_help="$ac_help - --with-mctx-mth=ID force mctx method (mcsc,sjlj)" - ac_help="$ac_help - --with-mctx-dsp=ID force mctx dispatching (sc,ssjlj,sjlj,usjlj,sjlje,...)" -@@ -177,7 +179,6 @@ program_suffix=NONE - program_transform_name=s,x,x, - silent= - site= --sitefile= - srcdir= - target=NONE - verbose= -@@ -292,7 +293,6 @@ Configuration: - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages -- --site-file=FILE use FILE as the site file - --version print the version of autoconf that created configure - Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX -@@ -463,11 +463,6 @@ EOF - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - -- -site-file | --site-file | --site-fil | --site-fi | --site-f) -- ac_prev=sitefile ;; -- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) -- sitefile="$ac_optarg" ;; -- - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) -@@ -633,16 +628,12 @@ fi - srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - - # Prefer explicitly selected file to automatically selected ones. --if test -z "$sitefile"; then -- if test -z "$CONFIG_SITE"; then -- if test "x$prefix" != xNONE; then -- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" -- else -- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" -- fi -+if test -z "$CONFIG_SITE"; then -+ if test "x$prefix" != xNONE; then -+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" -+ else -+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi --else -- CONFIG_SITE="$sitefile" - fi - for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then -@@ -1888,9 +1879,74 @@ EOF +@@ -543,7 +543,7 @@ ac_includes_default="\ + # include <unistd.h> + #endif" +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS srcdir_prefix PTH_VERSION_STR PTH_VERSION_HEX PLATFORM CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP SET_MAKE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP EGREP LIBTOOL AR PTH_FDSETSIZE PTH_FAKE_POLL PTH_FAKE_RWV EXTRA_INCLUDE_SYS_SELECT_H FALLBACK_SIG_ATOMIC_T FALLBACK_PID_T FALLBACK_SIZE_T FALLBACK_SSIZE_T FALLBACK_OFF_T FALLBACK_SOCKLEN_T FALLBACK_NFDS_T PTH_STACK_GROWTH pth_skaddr_makecontext pth_sksize_makecontext pth_skaddr_sigaltstack pth_sksize_sigaltstack pth_skaddr_sigstack pth_sksize_sigstack pth_sigjmpbuf pth_sigsetjmp pth_siglongjmp PTH_MCTX_ID PTH_SYSCALL_SOFT PTH_SYSCALL_HARD BATCH TARGET_ALL PTHREAD_O LIBPTHREAD_A LIBPTHREAD_LA PTHREAD_CONFIG_1 PTHREAD_3 INSTALL_PTHREAD UNINSTALL_PTHREAD TEST_PTHREAD PTH_EXT_SFIO LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS srcdir_prefix PTH_VERSION_STR PTH_VERSION_HEX PLATFORM CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP SET_MAKE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP EGREP LIBTOOL AR PTH_FDSETSIZE PTH_FAKE_POLL PTH_FAKE_RWV EXTRA_INCLUDE_SYS_SELECT_H EXTRA_INCLUDE_SYS_RESOURCE_H FALLBACK_SIG_ATOMIC_T FALLBACK_PID_T FALLBACK_SIZE_T FALLBACK_SSIZE_T FALLBACK_OFF_T FALLBACK_SOCKLEN_T FALLBACK_NFDS_T PTH_STACK_GROWTH pth_skaddr_makecontext pth_sksize_makecontext pth_skaddr_sigaltstack pth_sksize_sigaltstack pth_skaddr_sigstack pth_sksize_sigstack pth_sigjmpbuf pth_sigsetjmp pth_siglongjmp PTH_MCTX_ID PTH_SYSCALL_SOFT PTH_SYSCALL_HARD BATCH TARGET_ALL PTHREAD_O LIBPTHREAD_A LIBPTHREAD_LA PTHREAD_CONFIG_1 PTHREAD_3 INSTALL_PTHREAD UNINSTALL_PTHREAD TEST_PTHREAD PTH_EXT_SFIO LIBOBJS LTLIBOBJS' + ac_subst_files='' + # Initialize some variables set by options. +@@ -9334,8 +9334,7 @@ done -+echo $ac_n "checking for value of FD_SETSIZE""... $ac_c" 1>&6 -+echo "configure:1884: checking for value of FD_SETSIZE" >&5 -+cross_compile=no -+if test "$cross_compiling" = yes; then -+ ac_fdsetsize=1024 -+ -+else -+ cat > conftest.$ac_ext <<EOF -+#line 1891 "configure" -+#include "confdefs.h" -+ -+#include <stdio.h> -+#include <sys/types.h> -+ -+int main(int argc, char *argv[]) -+{ -+ FILE *fp; -+ int ac_fdsetsize; -+ -+#if defined(FD_SETSIZE) -+ ac_fdsetsize = FD_SETSIZE; -+#else -+ ac_fdsetsize = (sizeof(fd_set)*8); -+#endif -+ if ((fp = fopen("conftestval", "w")) == NULL) -+ exit(1); -+ fprintf(fp, "%d\n", ac_fdsetsize); -+ fclose(fp); -+ exit(0); -+} -+ -+ -+EOF -+if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -+then -+ ac_fdsetsize=`cat conftestval` -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -fr conftest* -+ ac_fdsetsize=1024 -+fi -+rm -fr conftest* -+fi -+echo "$ac_t""$ac_fdsetsize" 1>&6 -+PTH_FDSETSIZE="$ac_fdsetsize" -+ -+ -+ -+# Check whether --with-fdsetsize or --without-fdsetsize was given. -+if test "${with_fdsetsize+set}" = set; then -+ withval="$with_fdsetsize" -+ -+case $withval in -+ [1-9][0-9]) PTH_FDSETSIZE=$withval ;; -+ [0-9][0-9][0-9]) PTH_FDSETSIZE=$withval ;; -+ [0-9][0-9][0-9][0-9]) PTH_FDSETSIZE=$withval ;; -+ * ) { echo "configure: error: invalid FD_SETSIZE specified -- allowed: 10-9999" 1>&2; exit 1; } ;; -+esac -+CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PTH_FDSETSIZE"; -+echo "$ac_t""Overriding FD_SETSIZE with $PTH_FDSETSIZE" 1>&6; -+ -+fi -+ -+ - for ac_func in poll; do - echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6 --echo "configure:1894: checking for function $ac_func" >&5 -+echo "configure:1950: checking for function $ac_func" >&5 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -2223,7 +2279,7 @@ fi - done --for ac_hdr in sys/resource.h net/errno.h paths.h -+for ac_hdr in net/errno.h paths.h +- +-for ac_header in sys/resource.h net/errno.h paths.h ++for ac_header in net/errno.h paths.h do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -@@ -2454,8 +2510,54 @@ if test ".$ac_cv_header_sys_select_h" != + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if eval "test \"\${$as_ac_Header+set}\" = set"; then +@@ -9820,6 +9819,154 @@ if test ".$ac_cv_header_sys_select_h" != fi -+for ac_hdr in sys/resource.h ++ ++for ac_header in sys/resource.h +do -+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -+echo "configure:2518: checking for $ac_hdr" >&5 -+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 ++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++fi ++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else -+ cat > conftest.$ac_ext <<EOF -+#line 2523 "configure" -+#include "confdefs.h" -+#include <$ac_hdr> -+EOF -+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+{ (eval echo configure:2528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -+if test -z "$ac_err"; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" ++ # Is the header compilable? ++echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++cat >conftest.$ac_ext <<_ACEOF ++#line $LINENO "configure" ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++#include <$ac_header> ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_header_compiler=yes +else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=no" ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_header_compiler=no +fi -+rm -f conftest* ++rm -f conftest.$ac_objext conftest.$ac_ext ++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++# Is the header present? ++echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++cat >conftest.$ac_ext <<_ACEOF ++#line $LINENO "configure" ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include <$ac_header> ++_ACEOF ++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++else ++ ac_cpp_err=yes +fi -+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -+ cat >> confdefs.h <<EOF -+#define $ac_tr_hdr 1 -+EOF -+ ++if test -z "$ac_cpp_err"; then ++ ac_header_preproc=yes +else -+ echo "$ac_t""no" 1>&6 ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_header_preproc=no +fi ++rm -f conftest.err conftest.$ac_ext ++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6 ++ ++# So? What about this header? ++case $ac_header_compiler:$ac_header_preproc in ++ yes:no ) ++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ++ ( ++ cat <<\_ASBOX ++## ------------------------------------ ## ++## Report this to bug-autoconf@gnu.org. ## ++## ------------------------------------ ## ++_ASBOX ++ ) | ++ sed "s/^/$as_me: WARNING: /" >&2 ++ ;; ++ no:yes ) ++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ++ ( ++ cat <<\_ASBOX ++## ------------------------------------ ## ++## Report this to bug-autoconf@gnu.org. ## ++## ------------------------------------ ## ++_ASBOX ++ ) | ++ sed "s/^/$as_me: WARNING: /" >&2 ++ ;; ++esac ++echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ eval "$as_ac_Header=$ac_header_preproc" ++fi ++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ ++fi ++if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++ +done + +EXTRA_INCLUDE_SYS_RESOURCE_H="#include <sys/resource.h>" @@ -196,37 +173,22 @@ $NetBSD: patch-ab,v 1.14 2002/10/14 11:49:55 skrll Exp $ +fi + + - echo $ac_n "checking for typedef sig_atomic_t""... $ac_c" 1>&6 --echo "configure:2459: checking for typedef sig_atomic_t" >&5 -+echo "configure:2561: checking for typedef sig_atomic_t" >&5 - if eval "test \"`echo '$''{'ac_cv_typedef_sig_atomic_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -@@ -5153,6 +5255,7 @@ fi + echo "$as_me:$LINENO: checking for typedef sig_atomic_t" >&5 + echo $ECHO_N "checking for typedef sig_atomic_t... $ECHO_C" >&6 + if test "${ac_cv_typedef_sig_atomic_t+set}" = set; then +@@ -13682,6 +13829,7 @@ fi + - PTH_EXT_SFIO=0 - # Check whether --with-sfio or --without-sfio was given. - if test "${with_sfio+set}" = set; then -@@ -5708,9 +5811,11 @@ s%@CPP@%$CPP%g - s%@SET_MAKE@%$SET_MAKE%g - s%@AR@%$AR%g - s%@RANLIB@%$RANLIB%g -+s%@PTH_FDSETSIZE@%$PTH_FDSETSIZE%g - s%@PTH_FAKE_POLL@%$PTH_FAKE_POLL%g - s%@PTH_FAKE_RWV@%$PTH_FAKE_RWV%g - s%@EXTRA_INCLUDE_SYS_SELECT_H@%$EXTRA_INCLUDE_SYS_SELECT_H%g -+s%@EXTRA_INCLUDE_SYS_RESOURCE_H@%$EXTRA_INCLUDE_SYS_RESOURCE_H%g - s%@FALLBACK_SIG_ATOMIC_T@%$FALLBACK_SIG_ATOMIC_T%g - s%@FALLBACK_PID_T@%$FALLBACK_PID_T%g - s%@FALLBACK_SIZE_T@%$FALLBACK_SIZE_T%g -@@ -5736,6 +5841,7 @@ s%@TARGET_ALL@%$TARGET_ALL%g - s%@PTHREAD_O@%$PTHREAD_O%g - s%@LIBPTHREAD_A@%$LIBPTHREAD_A%g - s%@LIBPTHREAD_LA@%$LIBPTHREAD_LA%g -+s%@LIBTOOL@%$LIBTOOL%g - s%@PTHREAD_CONFIG_1@%$PTHREAD_CONFIG_1%g - s%@PTHREAD_3@%$PTHREAD_3%g - s%@INSTALL_PTHREAD@%$INSTALL_PTHREAD%g + # Check whether --with-ex or --without-ex was given. + if test "${with_ex+set}" = set; then + withval="$with_ex" +@@ -15264,6 +15412,7 @@ s,@PTH_FDSETSIZE@,$PTH_FDSETSIZE,;t t + s,@PTH_FAKE_POLL@,$PTH_FAKE_POLL,;t t + s,@PTH_FAKE_RWV@,$PTH_FAKE_RWV,;t t + s,@EXTRA_INCLUDE_SYS_SELECT_H@,$EXTRA_INCLUDE_SYS_SELECT_H,;t t ++s,@EXTRA_INCLUDE_SYS_RESOURCE_H@,$EXTRA_INCLUDE_SYS_RESOURCE_H,;t t + s,@FALLBACK_SIG_ATOMIC_T@,$FALLBACK_SIG_ATOMIC_T,;t t + s,@FALLBACK_PID_T@,$FALLBACK_PID_T,;t t + s,@FALLBACK_SIZE_T@,$FALLBACK_SIZE_T,;t t diff --git a/devel/pth/patches/patch-ac b/devel/pth/patches/patch-ac index 1a8268e7c68..706968ad195 100644 --- a/devel/pth/patches/patch-ac +++ b/devel/pth/patches/patch-ac @@ -1,51 +1,8 @@ -$NetBSD: patch-ac,v 1.4 2002/11/26 21:42:49 skrll Exp $ +$NetBSD: patch-ac,v 1.5 2003/05/02 11:49:48 wiz Exp $ ---- pth_high.c.orig Sun Jan 27 13:14:36 2002 +--- pth_high.c.orig Wed Jan 1 15:45:06 2003 +++ pth_high.c -@@ -35,6 +35,42 @@ - - #include "pth_p.h" - -+/* Pth variant of nanosleep(2) */ -+int pth_nanosleep(const struct timespec *rqtp, struct timespec *rmtp) -+{ -+ pth_time_t until; -+ pth_time_t offset; -+ pth_time_t now; -+ pth_event_t ev; -+ static pth_key_t ev_key = PTH_KEY_INIT; -+ -+ if (rqtp == NULL) { -+ return_errno(-1, EFAULT); -+ } -+ -+ /* short-circuit */ -+ if (rqtp->tv_sec == 0 && rqtp->tv_nsec == 0) -+ return 0; -+ -+ /* calculate asleep time */ -+ offset = pth_time((long)rqtp->tv_sec, (long)(rqtp->tv_nsec / 1000)); -+ pth_time_set(&until, PTH_TIME_NOW); -+ pth_time_add(&until, &offset); -+ -+ /* and let thread sleep until this time is elapsed */ -+ ev = pth_event(PTH_EVENT_TIME|PTH_MODE_STATIC, &ev_key, until); -+ pth_wait(ev); -+ -+ if (rmtp != NULL) { -+ pth_time_set(&now, PTH_TIME_NOW); -+ pth_time_sub(&until, &now); -+ rmtp->tv_sec = until.tv_sec; -+ rmtp->tv_nsec = until.tv_usec * 1000; -+ } -+ -+ return 0; -+} -+ - /* Pth variant of usleep(3) */ - int pth_usleep(unsigned int usec) - { -@@ -141,8 +177,43 @@ int pth_sigwait_ev(const sigset_t *set, +@@ -180,6 +180,35 @@ int pth_sigwait_ev(const sigset_t *set, return 0; } @@ -61,7 +18,7 @@ $NetBSD: patch-ac,v 1.4 2002/11/26 21:42:49 skrll Exp $ + + for (;;) { + /* do a non-blocking poll for the pid */ -+ while ( (pid = pth_sc(wait4)(wpid, status, options|WNOHANG, rusage)) < 0 ++ while ( (pid = pth_sc(wait4)(wpid, status, options|WNOHANG, rusage)) < 0 + && errno == EINTR) ; + + /* if pid was found or caller requested a polling return immediately */ @@ -76,72 +33,15 @@ $NetBSD: patch-ac,v 1.4 2002/11/26 21:42:49 skrll Exp $ + pth_debug2("pth_wait4: leave to thread \"%s\"", pth_current->name); + return pid; +} ++#endif + /* Pth variant of waitpid(2) */ --pid_t pth_waitpid(pid_t wpid, int *status, int options) -+pid_t pth_waitpid(pid_t wpid, int *status, int options) -+{ -+ return pth_wait4(wpid, status, options, 0); -+} -+ -+#else -+/* Pth variant of wait4(2) */ -+pid_t pth_waitpid(pid_t wpid, int *status, int options) + pid_t pth_waitpid(pid_t wpid, int *status, int options) { - pth_event_t ev; - static pth_key_t ev_key = PTH_KEY_INIT; -@@ -167,6 +238,8 @@ pid_t pth_waitpid(pid_t wpid, int *statu - pth_debug2("pth_waitpid: leave to thread \"%s\"", pth_current->name); - return pid; - } -+#endif -+ - - /* Pth variant of system(3) */ - int pth_system(const char *cmd) -@@ -195,7 +268,7 @@ int pth_system(const char *cmd) - /* block SIGCHLD signal */ - sigemptyset(&ss_block); - sigaddset(&ss_block, SIGCHLD); -- sigprocmask(SIG_BLOCK, &ss_block, &ss_old); -+ pth_sc(sigprocmask)(SIG_BLOCK, &ss_block, &ss_old); - - /* fork the current process */ - pstat = -1; -@@ -207,7 +280,7 @@ int pth_system(const char *cmd) - /* restore original signal dispositions and execute the command */ - sigaction(SIGINT, &sa_int, NULL); - sigaction(SIGQUIT, &sa_quit, NULL); -- sigprocmask(SIG_SETMASK, &ss_old, NULL); -+ pth_sc(sigprocmask)(SIG_SETMASK, &ss_old, NULL); - - /* stop the Pth scheduling */ - pth_scheduler_kill(); -@@ -227,7 +300,7 @@ int pth_system(const char *cmd) - /* restore original signal dispositions and execute the command */ - sigaction(SIGINT, &sa_int, NULL); - sigaction(SIGQUIT, &sa_quit, NULL); -- sigprocmask(SIG_SETMASK, &ss_old, NULL); -+ pth_sc(sigprocmask)(SIG_SETMASK, &ss_old, NULL); - - /* return error or child process result code */ - return (pid == -1 ? -1 : pstat); -@@ -258,6 +331,9 @@ int pth_select_ev(int nfd, fd_set *rfds, - pth_implicit_init(); - pth_debug2("pth_select_ev: called from thread \"%s\"", pth_current->name); - -+ if (nfd < 0 || nfd > FD_SETSIZE) -+ return_errno(-1, EINVAL); -+ - /* first deal with the special situation of a plain microsecond delay */ - if (nfd == 0 && rfds == NULL && wfds == NULL && efds == NULL && timeout != NULL) { - if (timeout->tv_sec < 0 || timeout->tv_usec < 0) -@@ -280,10 +356,11 @@ int pth_select_ev(int nfd, fd_set *rfds, - return_errno(-1, EINTR); +@@ -330,9 +359,9 @@ int pth_select_ev(int nfd, fd_set *rfds, } } -+ - /* POSIX compliance */ + /* POSIX.1-2001/SUSv3 compliance */ - if (rfds != NULL) FD_ZERO(rfds); - if (wfds != NULL) FD_ZERO(wfds); - if (efds != NULL) FD_ZERO(efds); @@ -151,214 +51,56 @@ $NetBSD: patch-ac,v 1.4 2002/11/26 21:42:49 skrll Exp $ return 0; } -@@ -295,36 +372,42 @@ int pth_select_ev(int nfd, fd_set *rfds, - delay.tv_sec = 0; +@@ -345,17 +374,17 @@ int pth_select_ev(int nfd, fd_set *rfds, delay.tv_usec = 0; rtmp = NULL; -+ if (rfds != NULL) { -- rspare = *rfds; +- memcpy(&rspare, rfds, sizeof(fd_set)); + pth_util_fd_copy(nfd, &rspare, rfds); rtmp = &rspare; } wtmp = NULL; if (wfds != NULL) { -- wspare = *wfds; +- memcpy(&wspare, wfds, sizeof(fd_set)); + pth_util_fd_copy(nfd, &wspare, wfds); wtmp = &wspare; } etmp = NULL; if (efds != NULL) { -- espare = *efds; +- memcpy(&espare, efds, sizeof(fd_set)); + pth_util_fd_copy(nfd, &espare, efds); etmp = &espare; } - while ((rc = pth_sc(select)(nfd, rtmp, wtmp, etmp, &delay)) < 0 && errno == EINTR) ; -+ if (rc < 0) -+ return_errno(-1, errno); - if (rc > 0) { -- if (rfds != NULL) -- *rfds = rspare; -- if (wfds != NULL) -- *wfds = wspare; -- if (efds != NULL) -- *efds = espare; -+ if (rfds != NULL) { + while ((rc = pth_sc(select)(nfd, rtmp, wtmp, etmp, &delay)) < 0 +@@ -370,11 +399,11 @@ int pth_select_ev(int nfd, fd_set *rfds, + && pth_time_cmp(timeout, PTH_TIME_ZERO) == 0)) { + /* pass-through immediate success */ + if (rfds != NULL) +- memcpy(rfds, &rspare, sizeof(fd_set)); + pth_util_fd_copy(nfd, rfds, &rspare); -+ } -+ if (wfds != NULL) { + if (wfds != NULL) +- memcpy(wfds, &wspare, sizeof(fd_set)); + pth_util_fd_copy(nfd, wfds, &wspare); -+ } -+ if (efds != NULL) { + if (efds != NULL) +- memcpy(efds, &espare, sizeof(fd_set)); + pth_util_fd_copy(nfd, efds, &espare); -+ } return rc; } - if (rc == 0 && timeout != NULL) { - if (pth_time_cmp(timeout, PTH_TIME_ZERO) == 0) { - /* POSIX compliance */ -- if (rfds != NULL) FD_ZERO(rfds); -- if (wfds != NULL) FD_ZERO(wfds); -- if (efds != NULL) FD_ZERO(efds); -+ if (rfds != NULL) pth_util_fd_zero(nfd, rfds); -+ if (wfds != NULL) pth_util_fd_zero(nfd, wfds); -+ if (efds != NULL) pth_util_fd_zero(nfd, efds); - return 0; - } - } -@@ -350,10 +433,9 @@ int pth_select_ev(int nfd, fd_set *rfds, - pth_event_isolate(ev_timeout); - if (pth_event_occurred(ev_timeout)) { - selected = TRUE; -- /* POSIX compliance */ -- if (rfds != NULL) FD_ZERO(rfds); -- if (wfds != NULL) FD_ZERO(wfds); -- if (efds != NULL) FD_ZERO(efds); -+ if (rfds != NULL) pth_util_fd_zero(nfd, rfds); -+ if (wfds != NULL) pth_util_fd_zero(nfd, wfds); -+ if (efds != NULL) pth_util_fd_zero(nfd, efds); - rc = 0; - } - } -@@ -362,7 +444,7 @@ int pth_select_ev(int nfd, fd_set *rfds, - return rc; - } --/* Pth variant of select(2) */ -+/* Pth variant of poll(2) */ - int pth_poll(struct pollfd *pfd, nfds_t nfd, int timeout) - { - return pth_poll_ev(pfd, nfd, timeout, NULL); -@@ -373,7 +455,7 @@ int pth_poll(struct pollfd *pfd, nfds_t - INTERNALLY THE SCHEDULER IS ONLY select(2) BASED!! */ - int pth_poll_ev(struct pollfd *pfd, nfds_t nfd, int timeout, pth_event_t ev_extra) - { -- fd_set rfds, wfds, efds; -+ fd_set rfds, wfds, efds, cfds; - struct timeval tv, *ptv; - int maxfd, rc, ok; - unsigned int i; -@@ -410,58 +492,64 @@ int pth_poll_ev(struct pollfd *pfd, nfds - FD_ZERO(&rfds); - FD_ZERO(&wfds); - FD_ZERO(&efds); -+ FD_ZERO(&cfds); - for(i = 0; i < nfd; i++) { -- if (!pth_util_fd_valid(pfd[i].fd)) -- return_errno(-1, EBADF); -- if (pfd[i].events & POLLIN) -- FD_SET(pfd[i].fd, &rfds); -- if (pfd[i].events & POLLOUT) -- FD_SET(pfd[i].fd, &wfds); -- if (pfd[i].events & POLLPRI) -- FD_SET(pfd[i].fd, &efds); -- if (pfd[i].fd >= maxfd && (pfd[i].events & (POLLIN|POLLOUT|POLLPRI))) -- maxfd = pfd[i].fd; -+ if (fcntl(pfd[i].fd, F_GETFL) == -1 && errno == EBADF) { -+ FD_SET(pfd[i].fd, &cfds); -+ } else { -+ if (pfd[i].events & POLLIN) -+ FD_SET(pfd[i].fd, &rfds); -+ if (pfd[i].events & POLLOUT) -+ FD_SET(pfd[i].fd, &wfds); -+ if (pfd[i].events & POLLPRI) -+ FD_SET(pfd[i].fd, &efds); -+ if (pfd[i].fd >= maxfd && (pfd[i].events & (POLLIN|POLLOUT|POLLPRI))) -+ maxfd = pfd[i].fd; -+ } -+ } -+ if (maxfd != -1) { -+ /* examine fd sets */ -+ rc = pth_select_ev(maxfd+1, &rfds, &wfds, &efds, ptv, ev_extra); -+ if (rc < 0) -+ return rc; - } -- if (maxfd == -1) -- return_errno(-1, EINVAL); -- -- /* examine fd sets */ -- rc = pth_select_ev(maxfd+1, &rfds, &wfds, &efds, ptv, ev_extra); - - /* establish results */ -- if (rc > 0) { -- rc = 0; -- for (i = 0; i < nfd; i++) { -- ok = 0; -- pfd[i].revents = 0; -- if (pfd[i].fd < 0) { -- pfd[i].revents |= POLLNVAL; -- continue; -- } -- if (FD_ISSET(pfd[i].fd, &rfds)) { -- pfd[i].revents |= POLLIN; -- ok++; -- /* support for POLLHUP */ -- if (recv(pfd[i].fd, data, 64, MSG_PEEK) == -1) { -- if ( errno == ESHUTDOWN || errno == ECONNRESET -- || errno == ECONNABORTED || errno == ENETRESET) { -- pfd[i].revents &= ~(POLLIN); -- pfd[i].revents |= POLLHUP; -- ok--; -- } -+ rc = 0; -+ for (i = 0; i < nfd; i++) { -+ ok = 0; -+ pfd[i].revents = 0; -+ if (FD_ISSET(pfd[i].fd, &cfds)) { -+ pfd[i].revents |= POLLNVAL; -+ if (pfd[i].fd >= 0) -+ rc++; -+ continue; -+ } -+ if (maxfd == -1) -+ continue; -+ if (FD_ISSET(pfd[i].fd, &rfds)) { -+ pfd[i].revents |= POLLIN; -+ ok++; -+ /* support for POLLHUP */ -+ if (recv(pfd[i].fd, data, 64, MSG_PEEK) == -1) { -+ if ( errno == ESHUTDOWN || errno == ECONNRESET -+ || errno == ECONNABORTED || errno == ENETRESET) { -+ pfd[i].revents &= ~(POLLIN); -+ pfd[i].revents |= POLLHUP; -+ ok--; - } - } -- if (FD_ISSET(pfd[i].fd, &wfds)) { -- pfd[i].revents |= POLLOUT; -- ok++; -- } -- if (FD_ISSET(pfd[i].fd, &efds)) { -- pfd[i].revents |= POLLPRI; -- ok++; -- } -- if (ok) -- rc++; - } -+ if (FD_ISSET(pfd[i].fd, &wfds)) { -+ pfd[i].revents |= POLLOUT; -+ ok++; -+ } -+ if (FD_ISSET(pfd[i].fd, &efds)) { -+ pfd[i].revents |= POLLPRI; -+ ok++; -+ } -+ if (ok) -+ rc++; +@@ -407,9 +436,9 @@ int pth_select_ev(int nfd, fd_set *rfds, + && pth_event_status(ev_timeout) == PTH_STATUS_OCCURRED) { + selected = TRUE; + /* POSIX.1-2001/SUSv3 compliance */ +- if (rfds != NULL) FD_ZERO(rfds); +- if (wfds != NULL) FD_ZERO(wfds); +- if (efds != NULL) FD_ZERO(efds); ++ if (rfds != NULL) pth_util_fd_zero(nfd, rfds); ++ if (wfds != NULL) pth_util_fd_zero(nfd, wfds); ++ if (efds != NULL) pth_util_fd_zero(nfd, efds); + rc = 0; } - return rc; - } -@@ -485,7 +573,8 @@ int pth_connect_ev(int s, const struct s - pth_debug2("pth_connect_ev: enter from thread \"%s\"", pth_current->name); - - /* force filedescriptor into non-blocking mode */ -- fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK); -+ if ((fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR) -+ return_errno(-1, EBADF); - - /* try to connect */ - while ( (rv = pth_sc(connect)(s, (struct sockaddr *)addr, addrlen)) == -1 -@@ -498,6 +587,13 @@ int pth_connect_ev(int s, const struct s + if (ev_extra != NULL && !selected) +@@ -620,6 +649,13 @@ int pth_connect_ev(int s, const struct s /* if it is still on progress wait until socket is really writeable */ if (rv == -1 && errno == EINPROGRESS && fdmode != PTH_FDMODE_NONBLOCK) { ev = pth_event(PTH_EVENT_FD|PTH_UNTIL_FD_WRITEABLE|PTH_MODE_STATIC, &ev_key, s); @@ -367,114 +109,8 @@ $NetBSD: patch-ac,v 1.4 2002/11/26 21:42:49 skrll Exp $ + * caller. + */ + if (ev == NULL) { -+ return_errno(-1, errno); ++ return pth_error(-1, errno); + } if (ev_extra != NULL) pth_event_concat(ev, ev_extra, NULL); pth_wait(ev); -@@ -536,7 +632,8 @@ int pth_accept_ev(int s, struct sockaddr - pth_debug2("pth_accept_ev: enter from thread \"%s\"", pth_current->name); - - /* force filedescriptor into non-blocking mode */ -- fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK); -+ if ((fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR) -+ return_errno(-1, EBADF); - - /* poll socket via accept */ - ev = NULL; -@@ -585,6 +682,7 @@ ssize_t pth_read_ev(int fd, void *buf, s - pth_event_t ev; - static pth_key_t ev_key = PTH_KEY_INIT; - fd_set fds; -+ int fdmode; - int n; - - pth_implicit_init(); -@@ -594,8 +692,12 @@ ssize_t pth_read_ev(int fd, void *buf, s - if (nbytes == 0) - return 0; - -+ /* check mode of filedescriptor */ -+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_POLL)) == PTH_FDMODE_ERROR) -+ return_errno(-1, EBADF); -+ - /* poll filedescriptor if not already in non-blocking operation */ -- if (pth_fdmode(fd, PTH_FDMODE_POLL) == PTH_FDMODE_BLOCK) { -+ if (fdmode == PTH_FDMODE_BLOCK) { - - /* now directly poll filedescriptor for readability - to avoid unneccessary (and resource consuming because of context -@@ -662,7 +764,8 @@ ssize_t pth_write_ev(int fd, const void - return 0; - - /* force filedescriptor into non-blocking mode */ -- fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK); -+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR) -+ return_errno(-1, EBADF); - - /* poll filedescriptor if not already in non-blocking operation */ - if (fdmode != PTH_FDMODE_NONBLOCK) { -@@ -749,6 +852,7 @@ ssize_t pth_readv_ev(int fd, const struc - pth_event_t ev; - static pth_key_t ev_key = PTH_KEY_INIT; - fd_set fds; -+ int fdmode; - int n; - - pth_implicit_init(); -@@ -758,8 +862,12 @@ ssize_t pth_readv_ev(int fd, const struc - if (iovcnt <= 0 || iovcnt > UIO_MAXIOV) - return_errno(-1, EINVAL); - -+ /* check mode of filedescriptor */ -+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_POLL)) == PTH_FDMODE_ERROR) -+ return_errno(-1, EBADF); -+ - /* poll filedescriptor if not already in non-blocking operation */ -- if (pth_fdmode(fd, PTH_FDMODE_POLL) == PTH_FDMODE_BLOCK) { -+ if (fdmode == PTH_FDMODE_BLOCK) { - - /* first directly poll filedescriptor for readability - to avoid unneccessary (and resource consuming because of context -@@ -881,7 +989,8 @@ ssize_t pth_writev_ev(int fd, const stru - return_errno(-1, EINVAL); - - /* force filedescriptor into non-blocking mode */ -- fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK); -+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR) -+ return_errno(-1, EBADF); - - /* poll filedescriptor if not already in non-blocking operation */ - if (fdmode != PTH_FDMODE_NONBLOCK) { -@@ -1176,6 +1285,7 @@ ssize_t pth_recvfrom_ev(int fd, void *bu - pth_event_t ev; - static pth_key_t ev_key = PTH_KEY_INIT; - fd_set fds; -+ int fdmode; - int n; - - pth_implicit_init(); -@@ -1185,8 +1295,12 @@ ssize_t pth_recvfrom_ev(int fd, void *bu - if (nbytes == 0) - return 0; - -+ /* check mode of filedescriptor */ -+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_POLL)) == PTH_FDMODE_ERROR) -+ return_errno(-1, EBADF); -+ - /* poll filedescriptor if not already in non-blocking operation */ -- if (pth_fdmode(fd, PTH_FDMODE_POLL) == PTH_FDMODE_BLOCK) { -+ if (fdmode == PTH_FDMODE_BLOCK) { - - /* now directly poll filedescriptor for readability - to avoid unneccessary (and resource consuming because of context -@@ -1265,7 +1379,8 @@ ssize_t pth_sendto_ev(int fd, const void - return 0; - - /* force filedescriptor into non-blocking mode */ -- fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK); -+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR) -+ return_errno(-1, EBADF); - - /* poll filedescriptor if not already in non-blocking operation */ - if (fdmode != PTH_FDMODE_NONBLOCK) { diff --git a/devel/pth/patches/patch-ad b/devel/pth/patches/patch-ad index bdc0dd35bee..f2db47d5a62 100644 --- a/devel/pth/patches/patch-ad +++ b/devel/pth/patches/patch-ad @@ -1,76 +1,133 @@ -$NetBSD: patch-ad,v 1.3 2003/02/04 17:31:17 drochner Exp $ +$NetBSD: patch-ad,v 1.4 2003/05/02 11:49:48 wiz Exp $ ---- 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) */ +--- pth_syscall.c.orig 2003-01-01 16:45:06.000000000 +0100 ++++ pth_syscall.c 2003-04-15 14:31:43.000000000 +0200 +@@ -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 @@ + #undef sendto + #undef pread + #undef pwrite ++#undef wait4 + + /* internal data structures */ #if cpp - #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 +@@ -157,13 +159,18 @@ + #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 }, + { "nanosleep", NULL }, + { "usleep", NULL }, + { "sleep", NULL }, ++#if defined(__NetBSD__) ++ { "__sigprocmask14", NULL }, ++#else + { "sigprocmask", NULL }, ++#endif + { "sigwait", NULL }, + { "select", NULL }, + { "poll", NULL }, +@@ -179,6 +186,7 @@ + { "sendto", NULL }, + { "pread", NULL }, + { "pwrite", NULL }, ++ { "wait4", NULL }, + { NULL, NULL } + }; #endif -@@ -63,6 +63,24 @@ - } +@@ -651,6 +659,48 @@ #endif + } -+/* Pth hard wrapper for nanosleep(2) [internally fully emulated] */ -+#if PTH_SYSCALL_HARD -+int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) ++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_nanosleep(rqtp, rmtp); ++ 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); ++#else ++ else PTH_SYSCALL_ERROR(-1, ENOSYS, "recv"); +#endif ++} + -+/* Pth hard wrapper for usleep(3) [internally fully emulated] */ -+#if PTH_SYSCALL_HARD -+int usleep(useconds_t usec) ++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_usleep(usec); ++ 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); ++#else ++ else PTH_SYSCALL_ERROR(-1, ENOSYS, "send"); +#endif -+ - /* 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 - #endif - #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) + /* ==== 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 @@ + /* 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); +@@ -673,5 +723,27 @@ + #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); - } - #endif ++} ++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); ++#else ++ else PTH_SYSCALL_ERROR(-1, ENOSYS, "wait4"); ++#endif ++} ++ + #endif /* PTH_SYSCALL_HARD */ diff --git a/devel/pth/patches/patch-ae b/devel/pth/patches/patch-ae index 82ee0348ee7..e95a5dcaf62 100644 --- a/devel/pth/patches/patch-ae +++ b/devel/pth/patches/patch-ae @@ -1,36 +1,9 @@ -$NetBSD: patch-ae,v 1.2 2002/10/14 11:49:56 skrll Exp $ +$NetBSD: patch-ae,v 1.3 2003/05/02 11:49:48 wiz Exp $ ---- configure.in.orig Sun Jan 27 11:03:40 2002 -+++ configure.in -@@ -148,6 +148,26 @@ AC_MSG_PART(Optional Platform Environmen - dnl # check for the number of signals - AC_CHECK_NSIG(PTH_NSIG) - -+dnl # check for value of FD_SETSIZE -+AC_FDSETSIZE(PTH_FDSETSIZE) -+ -+dnl # -+dnl # Allow value of PTH_FDSETSIZE to be overridden by user -+dnl # -+ -+AC_ARG_WITH(fdsetsize,dnl -+[ --with-fdsetsize=NUM set FD_SETSIZE],[ -+case $withval in -+ [[1-9]][[0-9]]) PTH_FDSETSIZE=$withval ;; -+ [[0-9]][[0-9]][[0-9]]) PTH_FDSETSIZE=$withval ;; -+ [[0-9]][[0-9]][[0-9]][[0-9]]) PTH_FDSETSIZE=$withval ;; -+ * ) AC_ERROR([invalid FD_SETSIZE specified -- allowed: 10-9999]) ;; -+esac -+CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PTH_FDSETSIZE"; -+AC_MSG_RESULT([Overriding FD_SETSIZE with $PTH_FDSETSIZE]); -+])dnl -+AC_SUBST(PTH_FDSETSIZE) -+ - dnl # check whether poll(2)'s input stuff has to be faked - AC_CHECK_FUNCTIONS(poll) - AC_CHECK_DEFINE(POLLIN, poll.h) -@@ -178,7 +198,7 @@ dnl # check for various other functions - AC_CHECK_FUNCTIONS(usleep strerror) +--- configure.ac.orig Wed Jan 1 15:45:06 2003 ++++ configure.ac +@@ -190,7 +190,7 @@ dnl # check for various other functions + AC_CHECK_FUNCS(usleep strerror) dnl # check for various other headers which we might need -AC_HAVE_HEADERS(sys/resource.h net/errno.h paths.h) @@ -38,7 +11,7 @@ $NetBSD: patch-ae,v 1.2 2002/10/14 11:49:56 skrll Exp $ dnl # at least the test programs need some socket stuff AC_CHECK_LIB(nsl, gethostname) -@@ -196,6 +216,15 @@ if test ".$ac_cv_header_sys_select_h" != +@@ -208,6 +208,15 @@ if test ".$ac_cv_header_sys_select_h" != fi AC_SUBST(EXTRA_INCLUDE_SYS_SELECT_H) @@ -54,7 +27,7 @@ $NetBSD: patch-ae,v 1.2 2002/10/14 11:49:56 skrll Exp $ dnl # check whether we've to define sig_atomic_t AC_CHECK_TYPEDEF(sig_atomic_t, signal.h) FALLBACK_SIG_ATOMIC_T="typedef int sig_atomic_t;" -@@ -563,6 +592,7 @@ fi +@@ -618,6 +627,7 @@ fi AC_SUBST(PTHREAD_O) AC_SUBST(LIBPTHREAD_A) AC_SUBST(LIBPTHREAD_LA) diff --git a/devel/pth/patches/patch-af b/devel/pth/patches/patch-af index 5af34b93126..22d9907313c 100644 --- a/devel/pth/patches/patch-af +++ b/devel/pth/patches/patch-af @@ -1,28 +1,24 @@ -$NetBSD: patch-af,v 1.2 2002/10/14 11:49:56 skrll Exp $ +$NetBSD: patch-af,v 1.3 2003/05/02 11:49:48 wiz Exp $ ---- pth.h.in.orig Sun Jan 27 11:03:40 2002 +--- pth.h.in.orig Wed Jan 1 15:45:06 2003 +++ pth.h.in -@@ -44,6 +44,7 @@ - #include <sys/socket.h> /* for sockaddr */ - #include <sys/signal.h> /* for sigset_t */ +@@ -45,6 +45,7 @@ + #include <sys/socket.h> /* for sockaddr */ + #include <sys/signal.h> /* for sigset_t */ @EXTRA_INCLUDE_SYS_SELECT_H@ +@EXTRA_INCLUDE_SYS_RESOURCE_H@ /* fallbacks for essential typedefs */ #ifndef _PTHREAD_PRIVATE -@@ -85,6 +86,11 @@ struct timeval; - #define END_DECLARATION /*nop*/ - #endif - -+ /* check if the user want a bigger FD_SETSIZE than we can handle */ -+#if FD_SETSIZE > @PTH_FDSETSIZE@ -+#error "FD_SETSIZE is larger than pth can handle." -+#endif -+ - BEGIN_DECLARATION - - /* some global constants */ -@@ -500,7 +506,10 @@ extern ssize_t pth_sendto(int, co +@@ -338,7 +339,6 @@ enum { + #define PTH_FAKE_POLL @PTH_FAKE_POLL@ + #if !(PTH_FAKE_POLL) + /* use vendor poll(2) environment */ +-#define _XOPEN_SOURCE + #include <poll.h> + #ifndef POLLRDNORM + #define POLLRDNORM POLLIN +@@ -544,7 +544,10 @@ extern ssize_t pth_sendto(int, co extern ssize_t pth_pread(int, void *, size_t, off_t); extern ssize_t pth_pwrite(int, const void *, size_t, off_t); diff --git a/devel/pth/patches/patch-ag b/devel/pth/patches/patch-ag index 6ce1e665125..deecc666127 100644 --- a/devel/pth/patches/patch-ag +++ b/devel/pth/patches/patch-ag @@ -1,30 +1,34 @@ -$NetBSD: patch-ag,v 1.4 2002/11/26 21:42:49 skrll Exp $ +$NetBSD: patch-ag,v 1.5 2003/05/02 11:49:48 wiz Exp $ ---- pth_lib.c.orig Sun Jan 27 11:03:40 2002 +--- pth_lib.c.orig Wed Jan 1 15:45:06 2003 +++ pth_lib.c -@@ -37,28 +37,25 @@ long pth_version(void) +@@ -37,10 +37,11 @@ long pth_version(void) /* implicit initialization support */ intern int pth_initialized = FALSE; +intern int pth_explicit_initialize = FALSE; -+ #if cpp #define pth_implicit_init() \ if (!pth_initialized) \ - pth_init(); -+ pth__init(); ++ pth__init(); + #endif + + #ifdef PTH_EX +@@ -55,19 +56,13 @@ static void pth_ex_terminate(ex_t *ex) + } #endif -/* initialize the package */ -int pth_init(void) -+intern int pth__init(void) ++int pth__init(void) { pth_attr_t t_attr; - /* support for implicit initialization calls - and to prevent multiple explict initialization, too */ - if (pth_initialized) -- return_errno(FALSE, EPERM); +- return pth_error(FALSE, EPERM); - else - pth_initialized = TRUE; + pth_initialized = TRUE; @@ -32,14 +36,9 @@ $NetBSD: patch-ag,v 1.4 2002/11/26 21:42:49 skrll Exp $ - pth_debug1("pth_init: enter"); + pth_debug1("pth__init: enter"); - /* initialize the scheduler */ -- pth_scheduler_init(); -+ if (!pth_scheduler_init()) -+ return_errno(FALSE, EAGAIN); - - /* spawn the scheduler thread */ - t_attr = pth_attr_new(); -@@ -105,10 +102,29 @@ int pth_init(void) + /* initialize syscall wrapping */ + pth_syscall_init(); +@@ -131,10 +126,29 @@ int pth_init(void) pth_mctx_switch(&pth_main->mctx, &pth_sched->mctx); /* came back, so let's go home... */ @@ -58,7 +57,7 @@ $NetBSD: patch-ag,v 1.4 2002/11/26 21:42:49 skrll Exp $ + if (pth_initialized) { + /* if we've already explicitly initialized then error */ + if (pth_explicit_initialize) -+ return_errno(FALSE, EPERM); ++ return pth_error(FALSE, EPERM); + rv = TRUE; + } else { + rv = pth__init(); @@ -70,19 +69,11 @@ $NetBSD: patch-ag,v 1.4 2002/11/26 21:42:49 skrll Exp $ /* kill the package internals */ int pth_kill(void) { -@@ -118,6 +134,7 @@ int pth_kill(void) +@@ -144,6 +158,7 @@ int pth_kill(void) pth_thread_cleanup(pth_main); pth_scheduler_kill(); pth_initialized = FALSE; + pth_explicit_initialize = FALSE; pth_tcb_free(pth_sched); pth_tcb_free(pth_main); - pth_debug1("pth_kill: leave"); -@@ -182,6 +199,7 @@ static void pth_spawn_trampoline(void) - /* no return! */ - abort(); - } -+ - pth_t pth_spawn(pth_attr_t attr, void *(*func)(void *), void *arg) - { - pth_t t; + pth_syscall_kill(); diff --git a/devel/pth/patches/patch-ah b/devel/pth/patches/patch-ah deleted file mode 100644 index 362c252be73..00000000000 --- a/devel/pth/patches/patch-ah +++ /dev/null @@ -1,53 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2002/10/14 11:49:56 skrll Exp $ - ---- aclocal.m4.orig Sun Jan 27 11:03:40 2002 -+++ aclocal.m4 -@@ -1254,6 +1254,48 @@ AC_DEFINE_UNQUOTED($1, $nsig) - ]) - - dnl ## -+dnl ## Check for FD_SETSIZE -+dnl ## -+dnl ## configure.in: -+dnl ## AC_FDSETSIZE(<varname>) -+ -+AC_DEFUN(AC_FDSETSIZE,[dnl -+AC_MSG_CHECKING(for value of FD_SETSIZE) -+cross_compile=no -+AC_TRY_RUN( -+changequote(<<, >>)dnl -+<< -+#include <stdio.h> -+#include <sys/types.h> -+ -+int main(int argc, char *argv[]) -+{ -+ FILE *fp; -+ int ac_fdsetsize; -+ -+#if defined(FD_SETSIZE) -+ ac_fdsetsize = FD_SETSIZE; -+#else -+ ac_fdsetsize = (sizeof(fd_set)*8); -+#endif -+ if ((fp = fopen("conftestval", "w")) == NULL) -+ exit(1); -+ fprintf(fp, "%d\n", ac_fdsetsize); -+ fclose(fp); -+ exit(0); -+} -+>> -+changequote([, ])dnl -+, -+ac_fdsetsize=`cat conftestval`, -+ac_fdsetsize=1024, -+ac_fdsetsize=1024 -+)dnl -+AC_MSG_RESULT([$ac_fdsetsize]) -+$1="$ac_fdsetsize" -+]) -+ -+dnl ## - dnl ## Check for an external/extension library. - dnl ## - is aware of <libname>-config style scripts - dnl ## - searches under standard paths include, lib, etc. diff --git a/devel/pth/patches/patch-ai b/devel/pth/patches/patch-ai deleted file mode 100644 index 28e9d18a58c..00000000000 --- a/devel/pth/patches/patch-ai +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-ai,v 1.1 2002/10/14 11:49:57 skrll Exp $ - ---- pthread.h.in.orig Sun Jan 27 11:03:41 2002 -+++ pthread.h.in -@@ -29,6 +29,13 @@ - #define _PTH_PTHREAD_H_ - - /* -+ * check if the user wants a bigger FD_SETSIZE than we can handle -+ */ -+#if FD_SETSIZE > @PTH_FDSETSIZE@ -+#error "FD_SETSIZE is larger than pth can handle." -+#endif -+ -+/* - ** - ** BOOTSTRAPPING - ** diff --git a/devel/pth/patches/patch-aj b/devel/pth/patches/patch-aj index 4fcfd1e8fe5..8f460f77a44 100644 --- a/devel/pth/patches/patch-aj +++ b/devel/pth/patches/patch-aj @@ -1,15 +1,15 @@ -$NetBSD: patch-aj,v 1.1 2002/10/14 11:55:14 skrll Exp $ +$NetBSD: patch-aj,v 1.2 2003/05/02 11:49:49 wiz Exp $ ---- pth_util.c.orig Sun Jan 27 13:11:39 2002 +--- pth_util.c.orig Wed Jan 1 15:45:06 2003 +++ pth_util.c -@@ -181,3 +181,25 @@ intern int pth_util_fds_select(int nfd, +@@ -182,3 +182,25 @@ intern int pth_util_fds_select(int nfd, return n; } +/* + * zero the first 'nfd' file descriptors in an fd_set. + */ -+intern int pth_util_fd_zero(int nfd, fd_set *fds) ++intern void pth_util_fd_zero(int nfd, fd_set *fds) +{ + int i; + for (i=0; i<nfd; i++) @@ -19,7 +19,7 @@ $NetBSD: patch-aj,v 1.1 2002/10/14 11:55:14 skrll Exp $ +/* + * copy the first 'nfd' file descriptors from one fd_set to another. + */ -+intern int pth_util_fd_copy(int nfd, fd_set* dfds, fd_set* sfds) ++intern void pth_util_fd_copy(int nfd, fd_set* dfds, fd_set* sfds) +{ + int i; + for (i=0; i < nfd; i++) diff --git a/devel/pth/patches/patch-ak b/devel/pth/patches/patch-ak deleted file mode 100644 index 732253e95c7..00000000000 --- a/devel/pth/patches/patch-ak +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-ak,v 1.1 2002/11/26 21:42:49 skrll Exp $ - ---- pth_sched.c.orig Sun Jan 27 11:03:41 2002 -+++ pth_sched.c -@@ -47,16 +47,15 @@ static pth_time_t pth_loadticknext; - static pth_time_t pth_loadtickgap = PTH_TIME(1,0); - - /* initialize the scheduler ingredients */ --intern void pth_scheduler_init(void) -+intern int pth_scheduler_init(void) - { - /* create the internal signal pipe */ -- if (pipe(pth_sigpipe) == -1) { -- fprintf(stderr, "**Pth** INIT: Cannot create internal pipe: %s\n", -- strerror(errno)); -- abort(); -- } -- pth_fdmode(pth_sigpipe[0], PTH_FDMODE_NONBLOCK); -- pth_fdmode(pth_sigpipe[1], PTH_FDMODE_NONBLOCK); -+ if (pipe(pth_sigpipe) == -1) -+ return_errno(FALSE, errno); -+ if (pth_fdmode(pth_sigpipe[0], PTH_FDMODE_NONBLOCK) == PTH_FDMODE_ERROR) -+ return_errno(FALSE, errno); -+ if (pth_fdmode(pth_sigpipe[1], PTH_FDMODE_NONBLOCK) == PTH_FDMODE_ERROR) -+ return_errno(FALSE, errno); - - /* initialize the essential threads */ - pth_sched = NULL; -@@ -72,7 +71,8 @@ intern void pth_scheduler_init(void) - /* initialize load support */ - pth_loadval = 1.0; - pth_time_set(&pth_loadticknext, PTH_TIME_NOW); -- return; -+ -+ return TRUE; - } - - /* drop all threads (except for the currently active one) */ |