summaryrefslogtreecommitdiff
path: root/devel/pth
diff options
context:
space:
mode:
authorskrll <skrll@pkgsrc.org>2002-10-14 11:49:54 +0000
committerskrll <skrll@pkgsrc.org>2002-10-14 11:49:54 +0000
commite3bf53861b610af246fd665d2c49a97110c1355a (patch)
tree83365031bf233d7e0710e0ebc1bb9fd88e2f4862 /devel/pth
parent70ec1b606e8e76b99ed28aec69f68a6f6bfcb22d (diff)
downloadpkgsrc-e3bf53861b610af246fd665d2c49a97110c1355a.tar.gz
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.
Diffstat (limited to 'devel/pth')
-rw-r--r--devel/pth/Makefile16
-rw-r--r--devel/pth/distinfo17
-rw-r--r--devel/pth/patches/patch-ab1424
-rw-r--r--devel/pth/patches/patch-ac314
-rw-r--r--devel/pth/patches/patch-ad33
-rw-r--r--devel/pth/patches/patch-ae37
-rw-r--r--devel/pth/patches/patch-af18
-rw-r--r--devel/pth/patches/patch-ag11
-rw-r--r--devel/pth/patches/patch-ah53
-rw-r--r--devel/pth/patches/patch-ai18
10 files changed, 596 insertions, 1345 deletions
diff --git a/devel/pth/Makefile b/devel/pth/Makefile
index 39c27f71f53..9c0abf1c0bc 100644
--- a/devel/pth/Makefile
+++ b/devel/pth/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.48 2002/08/29 19:44:07 skrll Exp $
+# $NetBSD: Makefile,v 1.49 2002/10/14 11:49:54 skrll Exp $
#
DISTNAME= pth-1.4.1
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=pth/}
@@ -17,7 +17,7 @@ USE_LIBTOOL= YES
LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --enable-pthread
-CONFIGURE_ARGS+= --enable-syscall-hard
+CONFIGURE_ARGS+= --with-fdsetsize=1024
CONFIG_GUESS_OVERRIDE= ${WRKSRC}/config.guess
CONFIG_SUB_OVERRIDE= ${WRKSRC}/config.sub
@@ -26,6 +26,16 @@ PTH_MAJOR= 14
PTH_MINOR= 21
PLIST_SUBST+= PTH_MAJOR=${PTH_MAJOR} PTH_MINOR=${PTH_MINOR}
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+. if ${MACHINE_ARCH} == "m68k" && (${OS_VERSION:M1.5.[12]*} || ${OS_VERSION:M1.[0-4]*})
+@${ECHO} Building without --enable-syscall-hard. lib/18644 needs fixing.
+. else
+CONFIGURE_ARGS+= --enable-syscall-hard
+. endif
+.endif
+
test: build
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} test | \
tee ${WRKSRC}/test.log
diff --git a/devel/pth/distinfo b/devel/pth/distinfo
index a29b5180a5f..44ee0e8c873 100644
--- a/devel/pth/distinfo
+++ b/devel/pth/distinfo
@@ -1,11 +1,14 @@
-$NetBSD: distinfo,v 1.7 2002/08/25 18:38:44 jlam Exp $
+$NetBSD: distinfo,v 1.8 2002/10/14 11:49:54 skrll 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) = 57383d10067e8b8f02f17342c66a8715cfb88659
-SHA1 (patch-ac) = 77202a5f9f39e63b24288051273a3518e80c47ec
-SHA1 (patch-ad) = 0f1e18cff418b066d37333578f2e5874741f2008
-SHA1 (patch-ae) = fe0714f3d1c71f7f347ba217abf918cb7ea8f31b
-SHA1 (patch-af) = 95ab72c602d6b69e10de9e3218f4c455036f40ca
-SHA1 (patch-ag) = f4c8673837c9b2a06bcd16eaf17ee3e755ebb158
+SHA1 (patch-ab) = 41dfb1d339d71ed344ab320d4f430ea8e1a04722
+SHA1 (patch-ac) = ce52eaf1a7227abb31f45573ce7902c19cb16219
+SHA1 (patch-ad) = 6769672225854d3b8bc830dc223cccd72b629c8d
+SHA1 (patch-ae) = 11ab7aa4e84eb01bb3956fdb58ff8d5f7e04a434
+SHA1 (patch-af) = e6d065052b935a6a689603675b7d8a473b995a5b
+SHA1 (patch-ag) = 6eea1e1a5e66e7f12ea279bcf80d5cbdfc14ac75
+SHA1 (patch-ah) = e9080d4b1e81fd0058233cf776ac49d56d01b79a
+SHA1 (patch-ai) = 0e9ef6a500470df351d616933fa086ad21e8b90c
+SHA1 (patch-aj) = 7d45920f6d8aba1de8dd6a69f1ce4591c81247d2
diff --git a/devel/pth/patches/patch-ab b/devel/pth/patches/patch-ab
index c56ad1593d7..8d0049c3dcc 100644
--- a/devel/pth/patches/patch-ab
+++ b/devel/pth/patches/patch-ab
@@ -1,20 +1,34 @@
-$NetBSD: patch-ab,v 1.13 2002/03/24 18:47:40 dmcmahill Exp $
+$NetBSD: patch-ab,v 1.14 2002/10/14 11:49:55 skrll Exp $
---- configure.orig Sun Jan 27 07:29:59 2002
-+++ configure Sat Mar 23 16:08:21 2002
-@@ -178,5 +178,4 @@
+--- configure.orig Sun Jan 27 12:29:59 2002
++++ 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
-@@ -293,5 +292,4 @@
+ 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:
-@@ -464,9 +462,4 @@
+ --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)
@@ -24,7 +38,9 @@ $NetBSD: patch-ab,v 1.13 2002/03/24 18:47:40 dmcmahill Exp $
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-@@ -634,14 +627,10 @@
+ -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
@@ -44,443 +60,85 @@ $NetBSD: patch-ab,v 1.13 2002/03/24 18:47:40 dmcmahill Exp $
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
-@@ -746,5 +735,5 @@
- set dummy gcc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:749: checking for $ac_word" >&5
-+echo "configure:738: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -776,5 +765,5 @@
- set dummy cc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:779: checking for $ac_word" >&5
-+echo "configure:768: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -827,5 +816,5 @@
- set dummy cl; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:830: checking for $ac_word" >&5
-+echo "configure:819: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -859,5 +848,5 @@
-
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
--echo "configure:862: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-+echo "configure:851: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
- ac_ext=c
-@@ -870,10 +859,10 @@
- cat > conftest.$ac_ext << EOF
-
--#line 873 "configure"
-+#line 862 "configure"
- #include "confdefs.h"
-
- main(){return(0);}
- EOF
--if { (eval echo configure:878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
-@@ -901,10 +890,10 @@
- fi
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
--echo "configure:904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-+echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
- echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
- cross_compiling=$ac_cv_prog_cc_cross
-
- echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
--echo "configure:909: checking whether we are using GNU C" >&5
-+echo "configure:898: checking whether we are using GNU C" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -915,5 +904,5 @@
- #endif
- EOF
--if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
- else
-@@ -934,5 +923,5 @@
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
--echo "configure:937: checking whether ${CC-cc} accepts -g" >&5
-+echo "configure:926: checking whether ${CC-cc} accepts -g" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -966,5 +955,5 @@
-
- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
--echo "configure:969: checking how to run the C preprocessor" >&5
-+echo "configure:958: checking how to run the C preprocessor" >&5
- # On Suns, sometimes $CPP names a directory.
- if test -n "$CPP" && test -d "$CPP"; then
-@@ -981,5 +970,5 @@
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
--#line 984 "configure"
-+#line 973 "configure"
- #include "confdefs.h"
- #include <assert.h>
-@@ -987,5 +976,5 @@
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:979: \"$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
-@@ -998,5 +987,5 @@
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
--#line 1001 "configure"
-+#line 990 "configure"
- #include "confdefs.h"
- #include <assert.h>
-@@ -1004,5 +993,5 @@
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:996: \"$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
-@@ -1015,5 +1004,5 @@
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
--#line 1018 "configure"
-+#line 1007 "configure"
- #include "confdefs.h"
- #include <assert.h>
-@@ -1021,5 +1010,5 @@
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:1013: \"$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
-@@ -1046,5 +1035,5 @@
-
- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
--echo "configure:1049: checking whether ${MAKE-make} sets \${MAKE}" >&5
-+echo "configure:1038: checking whether ${MAKE-make} sets \${MAKE}" >&5
- set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-@@ -1087,5 +1076,5 @@
- *-pipe* ) ;;
- * ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
--echo "configure:1090: checking for compiler option -pipe" >&5
-+echo "configure:1079: checking for compiler option -pipe" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1113,5 +1102,5 @@
- esac
- echo $ac_n "checking for compiler option -ggdb3""... $ac_c" 1>&6
--echo "configure:1116: checking for compiler option -ggdb3" >&5
-+echo "configure:1105: checking for compiler option -ggdb3" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_ggdb3'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1144,5 +1133,5 @@
- WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
- echo $ac_n "checking for compiler option -W<xxx>""... $ac_c" 1>&6
--echo "configure:1147: checking for compiler option -W<xxx>" >&5
-+echo "configure:1136: checking for compiler option -W<xxx>" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_wmore'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1169,5 +1158,5 @@
-
- echo $ac_n "checking for compiler option -Wno-long-long""... $ac_c" 1>&6
--echo "configure:1172: checking for compiler option -Wno-long-long" >&5
-+echo "configure:1161: checking for compiler option -Wno-long-long" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_wnolonglong'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1211,5 +1200,5 @@
- *-pipe* ) ;;
- * ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
--echo "configure:1214: checking for compiler option -pipe" >&5
-+echo "configure:1203: checking for compiler option -pipe" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1249,5 +1238,5 @@
- fi
- echo $ac_n "checking for compilation debug mode""... $ac_c" 1>&6
--echo "configure:1252: checking for compilation debug mode" >&5
-+echo "configure:1241: checking for compilation debug mode" >&5
- echo "$ac_t""$msg" 1>&6
- if test ".$msg" = .enabled; then
-@@ -1256,5 +1245,5 @@
-
- echo $ac_n "checking for compilation profile mode""... $ac_c" 1>&6
--echo "configure:1259: checking for compilation profile mode" >&5
-+echo "configure:1248: checking for compilation profile mode" >&5
- # Check whether --enable-profile or --disable-profile was given.
- if test "${enable_profile+set}" = set; then
-@@ -1290,5 +1279,5 @@
- *-pipe* ) ;;
- * ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
--echo "configure:1293: checking for compiler option -pipe" >&5
-+echo "configure:1282: checking for compiler option -pipe" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1317,5 +1306,5 @@
- OPT_CFLAGS='-funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math'
- echo $ac_n "checking for compiler option -f<xxx> for optimizations""... $ac_c" 1>&6
--echo "configure:1320: checking for compiler option -f<xxx> for optimizations" >&5
-+echo "configure:1309: checking for compiler option -f<xxx> for optimizations" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_optimize_std'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1345,5 +1334,5 @@
- OPT_CFLAGS='-malign-functions=4 -malign-jumps=4 -malign-loops=4'
- echo $ac_n "checking for compiler option -f<xxx> for Intel x86 CPU""... $ac_c" 1>&6
--echo "configure:1348: checking for compiler option -f<xxx> for Intel x86 CPU" >&5
-+echo "configure:1337: checking for compiler option -f<xxx> for Intel x86 CPU" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_optimize_x86'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1380,5 +1369,5 @@
- *-*-solaris* )
- echo $ac_n "checking for compiler option -fast""... $ac_c" 1>&6
--echo "configure:1383: checking for compiler option -fast" >&5
-+echo "configure:1372: checking for compiler option -fast" >&5
- if eval "test \"`echo '$''{'ac_cv_compiler_option_fast'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1415,5 +1404,5 @@
- fi
- echo $ac_n "checking for compilation optimization mode""... $ac_c" 1>&6
--echo "configure:1418: checking for compilation optimization mode" >&5
-+echo "configure:1407: checking for compilation optimization mode" >&5
- echo "$ac_t""$msg" 1>&6
-
-@@ -1459,5 +1448,5 @@
- set dummy ar; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:1462: checking for $ac_word" >&5
-+echo "configure:1451: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1488,5 +1477,5 @@
- set dummy ranlib; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:1491: checking for $ac_word" >&5
-+echo "configure:1480: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1571,10 +1560,10 @@
-
- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
--echo "configure:1574: checking for ANSI C header files" >&5
-+echo "configure:1563: checking for ANSI C header files" >&5
- if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 1579 "configure"
-+#line 1568 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
-@@ -1584,5 +1573,5 @@
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:1576: \"$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
-@@ -1601,5 +1590,5 @@
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat > conftest.$ac_ext <<EOF
--#line 1604 "configure"
-+#line 1593 "configure"
- #include "confdefs.h"
- #include <string.h>
-@@ -1619,5 +1608,5 @@
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat > conftest.$ac_ext <<EOF
--#line 1622 "configure"
-+#line 1611 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
-@@ -1640,5 +1629,5 @@
- else
- cat > conftest.$ac_ext <<EOF
--#line 1643 "configure"
-+#line 1632 "configure"
- #include "confdefs.h"
- #include <ctype.h>
-@@ -1651,5 +1640,5 @@
-
- EOF
--if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- :
-@@ -1678,15 +1667,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:1681: checking for $ac_hdr" >&5
-+echo "configure:1670: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 1686 "configure"
-+#line 1675 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:1691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:1680: \"$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
-@@ -1716,10 +1705,10 @@
- for ac_func in gettimeofday select sigaction sigprocmask sigpending sigsuspend; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:1719: checking for function $ac_func" >&5
-+echo "configure:1708: 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
- cat > conftest.$ac_ext <<EOF
--#line 1724 "configure"
-+#line 1713 "configure"
- #include "confdefs.h"
-
-@@ -1748,5 +1737,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -1834,5 +1823,5 @@
+ if test -r "$ac_site_file"; then
+@@ -1888,9 +1879,74 @@ EOF
- echo $ac_n "checking for number of signals""... $ac_c" 1>&6
--echo "configure:1837: checking for number of signals" >&5
-+echo "configure:1826: checking for number of signals" >&5
- cross_compile=no
- if test "$cross_compiling" = yes; then
-@@ -1841,5 +1830,5 @@
- else
- cat > conftest.$ac_ext <<EOF
--#line 1844 "configure"
-+#line 1833 "configure"
- #include "confdefs.h"
-@@ -1871,5 +1860,5 @@
- EOF
--if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- nsig=`cat conftestval`
-@@ -1891,10 +1880,10 @@
++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:1883: 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
- cat > conftest.$ac_ext <<EOF
--#line 1899 "configure"
-+#line 1888 "configure"
- #include "confdefs.h"
-
-@@ -1923,5 +1912,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -1948,10 +1937,10 @@
-
- echo $ac_n "checking for define POLLIN in poll.h""... $ac_c" 1>&6
--echo "configure:1951: checking for define POLLIN in poll.h" >&5
-+echo "configure:1940: checking for define POLLIN in poll.h" >&5
- if eval "test \"`echo '$''{'ac_cv_define_POLLIN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 1956 "configure"
-+#line 1945 "configure"
- #include "confdefs.h"
-
-@@ -1982,5 +1971,5 @@
-
- echo $ac_n "checking whether poll(2) facility has to be faked""... $ac_c" 1>&6
--echo "configure:1985: checking whether poll(2) facility has to be faked" >&5
-+echo "configure:1974: checking whether poll(2) facility has to be faked" >&5
- ac_rc=yes
- for ac_spec in func:poll define:POLLIN; do
-@@ -2028,15 +2017,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:2031: checking for $ac_hdr" >&5
-+echo "configure:2020: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 2036 "configure"
-+#line 2025 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:2030: \"$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
-@@ -2066,10 +2055,10 @@
- for ac_func in readv writev; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:2069: checking for function $ac_func" >&5
-+echo "configure:2058: 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
- cat > conftest.$ac_ext <<EOF
--#line 2074 "configure"
-+#line 2063 "configure"
- #include "confdefs.h"
-
-@@ -2098,5 +2087,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -2123,5 +2112,5 @@
-
- echo $ac_n "checking whether readv(2)/writev(2) facility has to be faked""... $ac_c" 1>&6
--echo "configure:2126: checking whether readv(2)/writev(2) facility has to be faked" >&5
-+echo "configure:2115: checking whether readv(2)/writev(2) facility has to be faked" >&5
- ac_rc=yes
- for ac_spec in func:readv func:writev header:sys/uio.h; do
-@@ -2167,10 +2156,10 @@
- for ac_func in usleep strerror; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:2170: checking for function $ac_func" >&5
-+echo "configure:2159: 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
- cat > conftest.$ac_ext <<EOF
--#line 2175 "configure"
-+#line 2164 "configure"
- #include "confdefs.h"
-
-@@ -2199,5 +2188,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -2224,19 +2213,19 @@
+@@ -2223,7 +2279,7 @@ fi
+ done
-for ac_hdr in sys/resource.h net/errno.h paths.h
@@ -488,122 +146,25 @@ $NetBSD: patch-ab,v 1.13 2002/03/24 18:47:40 dmcmahill Exp $
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:2231: checking for $ac_hdr" >&5
-+echo "configure:2220: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 2236 "configure"
-+#line 2225 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:2230: \"$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
-@@ -2266,5 +2255,5 @@
-
- echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
--echo "configure:2269: checking for gethostname in -lnsl" >&5
-+echo "configure:2258: checking for gethostname in -lnsl" >&5
- ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-@@ -2274,5 +2263,5 @@
- LIBS="-lnsl $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 2277 "configure"
-+#line 2266 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
-@@ -2285,5 +2274,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-@@ -2314,5 +2303,5 @@
- if test ".`echo $LIBS | grep nsl`" = . ;then
- echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
--echo "configure:2317: checking for gethostbyname in -lnsl" >&5
-+echo "configure:2306: checking for gethostbyname in -lnsl" >&5
- ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-@@ -2322,5 +2311,5 @@
- LIBS="-lnsl $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 2325 "configure"
-+#line 2314 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
-@@ -2333,5 +2322,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-@@ -2362,5 +2351,5 @@
+@@ -2454,8 +2510,54 @@ if test ".$ac_cv_header_sys_select_h" !=
fi
- echo $ac_n "checking for accept in -lsocket""... $ac_c" 1>&6
--echo "configure:2365: checking for accept in -lsocket" >&5
-+echo "configure:2354: checking for accept in -lsocket" >&5
- ac_lib_var=`echo socket'_'accept | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-@@ -2370,5 +2359,5 @@
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 2373 "configure"
-+#line 2362 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
-@@ -2381,5 +2370,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-@@ -2413,15 +2402,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:2416: checking for $ac_hdr" >&5
-+echo "configure:2405: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 2421 "configure"
-+#line 2410 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:2426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:2415: \"$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
-@@ -2455,11 +2444,57 @@
+for ac_hdr 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:2451: checking for $ac_hdr" >&5
++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
+else
+ cat > conftest.$ac_ext <<EOF
-+#line 2456 "configure"
++#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:2461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (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*
@@ -637,800 +198,35 @@ $NetBSD: patch-ab,v 1.13 2002/03/24 18:47:40 dmcmahill Exp $
+
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:2494: 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
- cat > conftest.$ac_ext <<EOF
--#line 2464 "configure"
-+#line 2499 "configure"
- #include "confdefs.h"
-
-@@ -2493,10 +2528,10 @@
-
- echo $ac_n "checking for typedef pid_t""... $ac_c" 1>&6
--echo "configure:2496: checking for typedef pid_t" >&5
-+echo "configure:2531: checking for typedef pid_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_pid_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2501 "configure"
-+#line 2536 "configure"
- #include "confdefs.h"
-
-@@ -2530,10 +2565,10 @@
-
- echo $ac_n "checking for typedef size_t""... $ac_c" 1>&6
--echo "configure:2533: checking for typedef size_t" >&5
-+echo "configure:2568: checking for typedef size_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2538 "configure"
-+#line 2573 "configure"
- #include "confdefs.h"
-
-@@ -2567,10 +2602,10 @@
-
- echo $ac_n "checking for typedef ssize_t""... $ac_c" 1>&6
--echo "configure:2570: checking for typedef ssize_t" >&5
-+echo "configure:2605: checking for typedef ssize_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_ssize_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2575 "configure"
-+#line 2610 "configure"
- #include "confdefs.h"
-
-@@ -2604,10 +2639,10 @@
-
- echo $ac_n "checking for typedef off_t""... $ac_c" 1>&6
--echo "configure:2607: checking for typedef off_t" >&5
-+echo "configure:2642: checking for typedef off_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2612 "configure"
-+#line 2647 "configure"
- #include "confdefs.h"
-
-@@ -2641,10 +2676,10 @@
-
- echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
--echo "configure:2644: checking for typedef stack_t" >&5
-+echo "configure:2679: checking for typedef stack_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2649 "configure"
-+#line 2684 "configure"
- #include "confdefs.h"
-
-@@ -2673,5 +2708,5 @@
-
- echo $ac_n "checking for attribute ss_base in struct sigaltstack from sys/signal.h""... $ac_c" 1>&6
--echo "configure:2676: checking for attribute ss_base in struct sigaltstack from sys/signal.h" >&5
-+echo "configure:2711: checking for attribute ss_base in struct sigaltstack from sys/signal.h" >&5
- if eval "test \"`echo '$''{'ac_cv_structattr_ss_base'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -2679,5 +2714,5 @@
-
- cat > conftest.$ac_ext <<EOF
--#line 2682 "configure"
-+#line 2717 "configure"
- #include "confdefs.h"
-
-@@ -2693,5 +2728,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_structattr_ss_base=yes
-@@ -2713,5 +2748,5 @@
-
- echo $ac_n "checking for attribute ss_sp in struct sigaltstack from sys/signal.h""... $ac_c" 1>&6
--echo "configure:2716: checking for attribute ss_sp in struct sigaltstack from sys/signal.h" >&5
-+echo "configure:2751: checking for attribute ss_sp in struct sigaltstack from sys/signal.h" >&5
- if eval "test \"`echo '$''{'ac_cv_structattr_ss_sp'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -2719,5 +2754,5 @@
-
- cat > conftest.$ac_ext <<EOF
--#line 2722 "configure"
-+#line 2757 "configure"
- #include "confdefs.h"
-
-@@ -2733,5 +2768,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_structattr_ss_sp=yes
-@@ -2754,8 +2789,8 @@
-
- echo $ac_n "checking for a single-argument based gettimeofday""... $ac_c" 1>&6
--echo "configure:2757: checking for a single-argument based gettimeofday" >&5
-+echo "configure:2792: checking for a single-argument based gettimeofday" >&5
- cross_compile=no
- cat > conftest.$ac_ext <<EOF
--#line 2760 "configure"
-+#line 2795 "configure"
- #include "confdefs.h"
-
-@@ -2771,5 +2806,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- msg="yes"
-@@ -2796,8 +2831,8 @@
-
- echo $ac_n "checking for struct timespec""... $ac_c" 1>&6
--echo "configure:2799: checking for struct timespec" >&5
-+echo "configure:2834: checking for struct timespec" >&5
- cross_compile=no
- cat > conftest.$ac_ext <<EOF
--#line 2802 "configure"
-+#line 2837 "configure"
- #include "confdefs.h"
-
-@@ -2811,5 +2846,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-+if { (eval echo configure:2849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- msg="yes"
-@@ -2832,10 +2867,10 @@
-
- echo $ac_n "checking for typedef socklen_t""... $ac_c" 1>&6
--echo "configure:2835: checking for typedef socklen_t" >&5
-+echo "configure:2870: checking for typedef socklen_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_socklen_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2840 "configure"
-+#line 2875 "configure"
- #include "confdefs.h"
-
-@@ -2863,5 +2898,5 @@
-
- echo $ac_n "checking for type of argument 3 for accept()""... $ac_c" 1>&6
--echo "configure:2866: checking for type of argument 3 for accept()" >&5
-+echo "configure:2901: checking for type of argument 3 for accept()" >&5
- if eval "test \"`echo '$''{'ac_cv_argtype_accept3'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -2869,5 +2904,5 @@
-
- cat >conftest.$ac_ext <<EOF
--#line 2872 "configure"
-+#line 2907 "configure"
- #include "confdefs.h"
- EOF
-@@ -2927,5 +2962,5 @@
-
- echo $ac_n "checking for fallback socklen_t""... $ac_c" 1>&6
--echo "configure:2930: checking for fallback socklen_t" >&5
-+echo "configure:2965: checking for fallback socklen_t" >&5
- if eval "test \"`echo '$''{'ac_cv_check_socklentype'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -2954,10 +2989,10 @@
-
- echo $ac_n "checking for typedef nfds_t""... $ac_c" 1>&6
--echo "configure:2957: checking for typedef nfds_t" >&5
-+echo "configure:2992: checking for typedef nfds_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_nfds_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 2962 "configure"
-+#line 2997 "configure"
- #include "confdefs.h"
-
-@@ -2985,5 +3020,5 @@
-
- echo $ac_n "checking for type of argument 2 for poll()""... $ac_c" 1>&6
--echo "configure:2988: checking for type of argument 2 for poll()" >&5
-+echo "configure:3023: checking for type of argument 2 for poll()" >&5
- if eval "test \"`echo '$''{'ac_cv_argtype_poll2'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -2991,5 +3026,5 @@
-
- cat >conftest.$ac_ext <<EOF
--#line 2994 "configure"
-+#line 3029 "configure"
- #include "confdefs.h"
- EOF
-@@ -3049,5 +3084,5 @@
-
- echo $ac_n "checking for fallback nfds_t""... $ac_c" 1>&6
--echo "configure:3052: checking for fallback nfds_t" >&5
-+echo "configure:3087: checking for fallback nfds_t" >&5
- if eval "test \"`echo '$''{'ac_cv_check_nfdstype'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3076,5 +3111,5 @@
-
- echo $ac_n "checking for built-in type long long""... $ac_c" 1>&6
--echo "configure:3079: checking for built-in type long long" >&5
-+echo "configure:3114: checking for built-in type long long" >&5
- if eval "test \"`echo '$''{'ac_cv_type_longlong'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3082,5 +3117,5 @@
-
- cat > conftest.$ac_ext <<EOF
--#line 3085 "configure"
-+#line 3120 "configure"
- #include "confdefs.h"
-
-@@ -3094,5 +3129,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:3097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
-@@ -3113,5 +3148,5 @@
-
- echo $ac_n "checking for built-in type long double""... $ac_c" 1>&6
--echo "configure:3116: checking for built-in type long double" >&5
-+echo "configure:3151: checking for built-in type long double" >&5
- if eval "test \"`echo '$''{'ac_cv_type_longdouble'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3119,5 +3154,5 @@
-
- cat > conftest.$ac_ext <<EOF
--#line 3122 "configure"
-+#line 3157 "configure"
- #include "confdefs.h"
-
-@@ -3131,5 +3166,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
-@@ -3162,15 +3197,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:3165: checking for $ac_hdr" >&5
-+echo "configure:3200: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 3170 "configure"
-+#line 3205 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:3210: \"$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
-@@ -3200,10 +3235,10 @@
- for ac_func in makecontext swapcontext getcontext setcontext; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:3203: checking for function $ac_func" >&5
-+echo "configure:3238: 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
- cat > conftest.$ac_ext <<EOF
--#line 3208 "configure"
-+#line 3243 "configure"
- #include "confdefs.h"
-
-@@ -3232,5 +3267,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -3258,5 +3293,5 @@
-
- echo $ac_n "checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)""... $ac_c" 1>&6
--echo "configure:3261: checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)" >&5
-+echo "configure:3296: checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)" >&5
- if eval "test \"`echo '$''{'ac_cv_check_mcsc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3268,5 +3303,5 @@
- else
- cat > conftest.$ac_ext <<EOF
--#line 3271 "configure"
-+#line 3306 "configure"
- #include "confdefs.h"
-
-@@ -3324,5 +3359,5 @@
-
- EOF
--if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_check_mcsc=`cat conftestval`
-@@ -3349,15 +3384,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:3352: checking for $ac_hdr" >&5
-+echo "configure:3387: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 3357 "configure"
-+#line 3392 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:3397: \"$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
-@@ -3387,10 +3422,10 @@
- for ac_func in sigsetjmp siglongjmp setjmp longjmp _setjmp _longjmp; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:3390: checking for function $ac_func" >&5
-+echo "configure:3425: 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
- cat > conftest.$ac_ext <<EOF
--#line 3395 "configure"
-+#line 3430 "configure"
- #include "confdefs.h"
-
-@@ -3419,5 +3454,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -3445,10 +3480,10 @@
- for ac_func in sigaltstack sigstack; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:3448: checking for function $ac_func" >&5
-+echo "configure:3483: 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
- cat > conftest.$ac_ext <<EOF
--#line 3453 "configure"
-+#line 3488 "configure"
- #include "confdefs.h"
-
-@@ -3477,5 +3512,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -3502,5 +3537,5 @@
-
- echo $ac_n "checking for signal-mask aware setjmp(3)/longjmp(3)""... $ac_c" 1>&6
--echo "configure:3505: checking for signal-mask aware setjmp(3)/longjmp(3)" >&5
-+echo "configure:3540: checking for signal-mask aware setjmp(3)/longjmp(3)" >&5
- if eval "test \"`echo '$''{'ac_cv_check_sjlj'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3549,5 +3584,5 @@
- else
- cat > conftest.$ac_ext <<EOF
--#line 3552 "configure"
-+#line 3587 "configure"
- #include "confdefs.h"
-
-@@ -3649,5 +3684,5 @@
-
- EOF
--if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- rc=`cat conftestval`
-@@ -3824,10 +3859,10 @@
-
- echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
--echo "configure:3827: checking for typedef stack_t" >&5
-+echo "configure:3862: checking for typedef stack_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 3832 "configure"
-+#line 3867 "configure"
- #include "confdefs.h"
-
-@@ -3856,5 +3891,5 @@
-
- echo $ac_n "checking for direction of stack growth""... $ac_c" 1>&6
--echo "configure:3859: checking for direction of stack growth" >&5
-+echo "configure:3894: checking for direction of stack growth" >&5
- if eval "test \"`echo '$''{'ac_cv_check_stackgrowth'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3867,5 +3902,5 @@
- else
- cat > conftest.$ac_ext <<EOF
--#line 3870 "configure"
-+#line 3905 "configure"
- #include "confdefs.h"
-
-@@ -3896,5 +3931,5 @@
-
- EOF
--if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_check_stackgrowth=`cat conftestval`
-@@ -3932,10 +3967,10 @@
- for ac_func in makecontext; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:3935: checking for function $ac_func" >&5
-+echo "configure:3970: 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
- cat > conftest.$ac_ext <<EOF
--#line 3940 "configure"
-+#line 3975 "configure"
- #include "confdefs.h"
-
-@@ -3964,5 +3999,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -3990,5 +4025,5 @@
-
- echo $ac_n "checking for stack setup via makecontext""... $ac_c" 1>&6
--echo "configure:3993: checking for stack setup via makecontext" >&5
-+echo "configure:4028: checking for stack setup via makecontext" >&5
- if eval "test \"`echo '$''{'ac_cv_stacksetup_makecontext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -4007,5 +4042,5 @@
- else
- cat > conftest.$ac_ext <<EOF
--#line 4010 "configure"
-+#line 4045 "configure"
- #include "confdefs.h"
-
-@@ -4142,5 +4177,5 @@
-
- EOF
--if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:4180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-
-@@ -4181,10 +4216,10 @@
- for ac_func in sigaltstack; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:4184: checking for function $ac_func" >&5
-+echo "configure:4219: 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
- cat > conftest.$ac_ext <<EOF
--#line 4189 "configure"
-+#line 4224 "configure"
- #include "confdefs.h"
-
-@@ -4213,5 +4248,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:4216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -4243,10 +4278,10 @@
-
- echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
--echo "configure:4246: checking for typedef stack_t" >&5
-+echo "configure:4281: checking for typedef stack_t" >&5
- if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 4251 "configure"
-+#line 4286 "configure"
- #include "confdefs.h"
-
-@@ -4277,5 +4312,5 @@
-
- echo $ac_n "checking for stack setup via sigaltstack""... $ac_c" 1>&6
--echo "configure:4280: checking for stack setup via sigaltstack" >&5
-+echo "configure:4315: checking for stack setup via sigaltstack" >&5
- if eval "test \"`echo '$''{'ac_cv_stacksetup_sigaltstack'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -4294,5 +4329,5 @@
- else
- cat > conftest.$ac_ext <<EOF
--#line 4297 "configure"
-+#line 4332 "configure"
- #include "confdefs.h"
-
-@@ -4429,5 +4464,5 @@
-
- EOF
--if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-
-@@ -4467,10 +4502,10 @@
- for ac_func in sigstack; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:4470: checking for function $ac_func" >&5
-+echo "configure:4505: 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
- cat > conftest.$ac_ext <<EOF
--#line 4475 "configure"
-+#line 4510 "configure"
- #include "confdefs.h"
-
-@@ -4499,5 +4534,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -4525,5 +4560,5 @@
-
- echo $ac_n "checking for stack setup via sigstack""... $ac_c" 1>&6
--echo "configure:4528: checking for stack setup via sigstack" >&5
-+echo "configure:4563: checking for stack setup via sigstack" >&5
- if eval "test \"`echo '$''{'ac_cv_stacksetup_sigstack'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-@@ -4542,5 +4577,5 @@
- else
- cat > conftest.$ac_ext <<EOF
--#line 4545 "configure"
-+#line 4580 "configure"
- #include "confdefs.h"
-
-@@ -4677,5 +4712,5 @@
-
- EOF
--if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-
-@@ -4788,10 +4823,10 @@
- for ac_func in syscall; do
- echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
--echo "configure:4791: checking for function $ac_func" >&5
-+echo "configure:4826: 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
- cat > conftest.$ac_ext <<EOF
--#line 4796 "configure"
-+#line 4831 "configure"
- #include "confdefs.h"
-
-@@ -4820,5 +4855,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-@@ -4848,15 +4883,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:4851: checking for $ac_hdr" >&5
-+echo "configure:4886: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 4856 "configure"
-+#line 4891 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:4861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:4896: \"$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
-@@ -4885,10 +4920,10 @@
-
- echo $ac_n "checking for define SYS_read in sys/syscall.h""... $ac_c" 1>&6
--echo "configure:4888: checking for define SYS_read in sys/syscall.h" >&5
-+echo "configure:4923: checking for define SYS_read in sys/syscall.h" >&5
- if eval "test \"`echo '$''{'ac_cv_define_SYS_read'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
--#line 4893 "configure"
-+#line 4928 "configure"
- #include "confdefs.h"
-
-@@ -4920,5 +4955,5 @@
-
- echo $ac_n "checking whether soft system call mapping is used""... $ac_c" 1>&6
--echo "configure:4923: checking whether soft system call mapping is used" >&5
-+echo "configure:4958: checking whether soft system call mapping is used" >&5
- # Check whether --enable-syscall-soft or --disable-syscall-soft was given.
- if test "${enable_syscall_soft+set}" = set; then
-@@ -4942,5 +4977,5 @@
-
- echo $ac_n "checking whether hard system call mapping is used""... $ac_c" 1>&6
--echo "configure:4945: checking whether hard system call mapping is used" >&5
-+echo "configure:4980: checking whether hard system call mapping is used" >&5
- # Check whether --enable-syscall-hard or --disable-syscall-hard was given.
- if test "${enable_syscall_hard+set}" = set; then
-@@ -5013,5 +5048,5 @@
-
- echo $ac_n "checking whether to activate batch build mode""... $ac_c" 1>&6
--echo "configure:5016: checking whether to activate batch build mode" >&5
-+echo "configure:5051: checking whether to activate batch build mode" >&5
- # Check whether --enable-batch or --disable-batch was given.
- if test "${enable_batch+set}" = set; then
-@@ -5030,5 +5065,5 @@
- TARGET_ALL='$(TARGET_PREQ) $(TARGET_LIBS)'
- echo $ac_n "checking whether to activate maintainer build targets""... $ac_c" 1>&6
--echo "configure:5033: checking whether to activate maintainer build targets" >&5
-+echo "configure:5068: checking whether to activate maintainer build targets" >&5
- # Check whether --enable-maintainer or --disable-maintainer was given.
- if test "${enable_maintainer+set}" = set; then
-@@ -5044,5 +5079,5 @@
- fi
- echo $ac_n "checking whether to activate test build targets""... $ac_c" 1>&6
--echo "configure:5047: checking whether to activate test build targets" >&5
-+echo "configure:5082: checking whether to activate test build targets" >&5
- # Check whether --enable-tests or --disable-tests was given.
- if test "${enable_tests+set}" = set; then
-@@ -5061,5 +5096,5 @@
+@@ -5153,6 +5255,7 @@ fi
- echo $ac_n "checking whether to build Pthread library""... $ac_c" 1>&6
--echo "configure:5064: checking whether to build Pthread library" >&5
-+echo "configure:5099: checking whether to build Pthread library" >&5
- # Check whether --enable-pthread or --disable-pthread was given.
- if test "${enable_pthread+set}" = set; then
-@@ -5085,15 +5120,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:5088: checking for $ac_hdr" >&5
-+echo "configure:5123: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 5093 "configure"
-+#line 5128 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:5098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:5133: \"$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
-@@ -5154,4 +5189,5 @@
+
PTH_EXT_SFIO=0
# Check whether --with-sfio or --without-sfio was given.
-@@ -5220,15 +5256,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:5223: checking for $ac_hdr" >&5
-+echo "configure:5259: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 5228 "configure"
-+#line 5264 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:5233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:5269: \"$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
-@@ -5257,5 +5293,5 @@
-
- echo $ac_n "checking for sfdisc in -lsfio""... $ac_c" 1>&6
--echo "configure:5260: checking for sfdisc in -lsfio" >&5
-+echo "configure:5296: checking for sfdisc in -lsfio" >&5
- ac_lib_var=`echo sfio'_'sfdisc | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-@@ -5265,5 +5301,5 @@
- LIBS="-lsfio $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 5268 "configure"
-+#line 5304 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
-@@ -5276,5 +5312,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-@@ -5347,5 +5383,5 @@
- fi
- echo $ac_n "checking whether to build against Sfio library""... $ac_c" 1>&6
--echo "configure:5350: checking whether to build against Sfio library" >&5
-+echo "configure:5386: checking whether to build against Sfio library" >&5
- if test ".$with_sfio" = .yes; then
- PTH_EXT_SFIO=1
-@@ -5422,15 +5458,15 @@
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
--echo "configure:5425: checking for $ac_hdr" >&5
-+echo "configure:5461: 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
- else
- cat > conftest.$ac_ext <<EOF
--#line 5430 "configure"
-+#line 5466 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:5435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:5471: \"$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
-@@ -5459,5 +5495,5 @@
-
- echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
--echo "configure:5462: checking for dmalloc_debug in -ldmalloc" >&5
-+echo "configure:5498: checking for dmalloc_debug in -ldmalloc" >&5
- ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-@@ -5467,5 +5503,5 @@
- LIBS="-ldmalloc $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 5470 "configure"
-+#line 5506 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
-@@ -5478,5 +5514,5 @@
- ; return 0; }
- EOF
--if { (eval echo configure:5481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:5517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-@@ -5549,5 +5585,5 @@
- fi
- echo $ac_n "checking whether to build against Dmalloc library""... $ac_c" 1>&6
--echo "configure:5552: checking whether to build against Dmalloc library" >&5
-+echo "configure:5588: checking whether to build against Dmalloc library" >&5
- if test ".$with_dmalloc" = .yes; then
- cat >> confdefs.h <<\EOF
-@@ -5712,4 +5748,5 @@
+ 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
-@@ -5737,4 +5774,5 @@
+ 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
diff --git a/devel/pth/patches/patch-ac b/devel/pth/patches/patch-ac
index 96535792179..23d8a9aa329 100644
--- a/devel/pth/patches/patch-ac
+++ b/devel/pth/patches/patch-ac
@@ -1,8 +1,51 @@
-$NetBSD: patch-ac,v 1.1 2001/05/14 20:21:19 skrll Exp $
+$NetBSD: patch-ac,v 1.2 2002/10/14 11:49:55 skrll Exp $
---- pth_high.c.orig Sat Mar 24 14:49:58 2001
+--- pth_high.c.orig Sun Jan 27 13:14:36 2002
+++ pth_high.c
-@@ -141,8 +141,43 @@
+@@ -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,
return 0;
}
@@ -47,7 +90,7 @@ $NetBSD: patch-ac,v 1.1 2001/05/14 20:21:19 skrll Exp $
{
pth_event_t ev;
static pth_key_t ev_key = PTH_KEY_INIT;
-@@ -167,6 +202,8 @@
+@@ -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;
}
@@ -56,3 +99,266 @@ $NetBSD: patch-ac,v 1.1 2001/05/14 20:21:19 skrll Exp $
/* 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 (!pth_util_fd_valid(nfd-1))
++ 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);
+ }
+ }
++
+ /* 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;
+ }
+
+@@ -295,36 +372,42 @@ int pth_select_ev(int nfd, fd_set *rfds,
+ delay.tv_sec = 0;
+ delay.tv_usec = 0;
+ rtmp = NULL;
++
+ if (rfds != NULL) {
+- rspare = *rfds;
++ pth_util_fd_copy(nfd, &rspare, rfds);
+ rtmp = &rspare;
+ }
+ wtmp = NULL;
+ if (wfds != NULL) {
+- wspare = *wfds;
++ pth_util_fd_copy(nfd, &wspare, wfds);
+ wtmp = &wspare;
+ }
+ etmp = NULL;
+ if (efds != NULL) {
+- espare = *efds;
++ 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) {
++ pth_util_fd_copy(nfd, rfds, &rspare);
++ }
++ if (wfds != NULL) {
++ pth_util_fd_copy(nfd, wfds, &wspare);
++ }
++ if (efds != NULL) {
++ 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++;
+ }
+ return rc;
+ }
+@@ -498,6 +586,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);
++ /*
++ * This will fail if the fd is > FD_SETSIZE so pass the error back to the
++ * caller.
++ */
++ if (ev == NULL) {
++ return_errno(-1, errno);
++ }
+ if (ev_extra != NULL)
+ pth_event_concat(ev, ev_extra, NULL);
+ pth_wait(ev);
diff --git a/devel/pth/patches/patch-ad b/devel/pth/patches/patch-ad
index b5bee8266e1..4b24e1603a0 100644
--- a/devel/pth/patches/patch-ad
+++ b/devel/pth/patches/patch-ad
@@ -1,8 +1,33 @@
-$NetBSD: patch-ad,v 1.1 2001/05/14 20:21:20 skrll Exp $
+$NetBSD: patch-ad,v 1.2 2002/10/14 11:49:56 skrll Exp $
---- pth_syscall.c.orig Sat Mar 24 14:50:03 2001
+--- pth_syscall.c.orig Sun Jan 27 11:03:41 2002
+++ pth_syscall.c
-@@ -85,11 +85,13 @@
+@@ -63,6 +63,24 @@ pid_t fork(void)
+ }
+ #endif
+
++/* Pth hard wrapper for nanosleep(2) [internally fully emulated] */
++#if PTH_SYSCALL_HARD
++int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
++{
++ pth_implicit_init();
++ return pth_nanosleep(rqtp, rmtp);
++}
++#endif
++
++/* Pth hard wrapper for usleep(3) [internally fully emulated] */
++#if PTH_SYSCALL_HARD
++int usleep(useconds_t usec)
++{
++ pth_implicit_init();
++ return pth_usleep(usec);
++}
++#endif
++
+ /* Pth hard wrapper for sleep(3) [internally fully emulated] */
+ #if PTH_SYSCALL_HARD
+ unsigned int sleep(unsigned int sec)
+@@ -85,11 +103,13 @@ int system(const char *cmd)
#if cpp
#if defined(SYS_sigprocmask)
#define PTH_SC_sigprocmask(a1,a2,a3) ((int)syscall(SYS_sigprocmask,(a1),(a2),(a3)))
@@ -17,7 +42,7 @@ $NetBSD: patch-ad,v 1.1 2001/05/14 20:21:20 skrll Exp $
int sigprocmask(int how, const sigset_t *set, sigset_t *oset)
{
pth_implicit_init();
-@@ -119,6 +121,22 @@
+@@ -119,6 +139,22 @@ pid_t waitpid(pid_t wpid, int *status, i
{
pth_implicit_init();
return pth_waitpid(wpid, status, options);
diff --git a/devel/pth/patches/patch-ae b/devel/pth/patches/patch-ae
index 4e225d88a48..82ee0348ee7 100644
--- a/devel/pth/patches/patch-ae
+++ b/devel/pth/patches/patch-ae
@@ -1,8 +1,35 @@
-$NetBSD: patch-ae,v 1.1 2001/05/14 20:21:20 skrll Exp $
+$NetBSD: patch-ae,v 1.2 2002/10/14 11:49:56 skrll Exp $
---- configure.in.orig Sat Mar 24 14:49:45 2001
+--- configure.in.orig Sun Jan 27 11:03:40 2002
+++ configure.in
-@@ -178,7 +178,7 @@
+@@ -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)
dnl # check for various other headers which we might need
@@ -11,7 +38,7 @@ $NetBSD: patch-ae,v 1.1 2001/05/14 20:21:20 skrll Exp $
dnl # at least the test programs need some socket stuff
AC_CHECK_LIB(nsl, gethostname)
-@@ -196,6 +196,15 @@
+@@ -196,6 +216,15 @@ if test ".$ac_cv_header_sys_select_h" !=
fi
AC_SUBST(EXTRA_INCLUDE_SYS_SELECT_H)
@@ -27,7 +54,7 @@ $NetBSD: patch-ae,v 1.1 2001/05/14 20:21:20 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 +572,7 @@
+@@ -563,6 +592,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 ce8b3eff8f6..5af34b93126 100644
--- a/devel/pth/patches/patch-af
+++ b/devel/pth/patches/patch-af
@@ -1,6 +1,6 @@
-$NetBSD: patch-af,v 1.1 2001/05/14 20:21:20 skrll Exp $
+$NetBSD: patch-af,v 1.2 2002/10/14 11:49:56 skrll Exp $
---- pth.h.in.orig Sat Mar 24 14:49:49 2001
+--- pth.h.in.orig Sun Jan 27 11:03:40 2002
+++ pth.h.in
@@ -44,6 +44,7 @@
#include <sys/socket.h> /* for sockaddr */
@@ -10,7 +10,19 @@ $NetBSD: patch-af,v 1.1 2001/05/14 20:21:20 skrll Exp $
/* fallbacks for essential typedefs */
#ifndef _PTHREAD_PRIVATE
-@@ -499,7 +500,10 @@
+@@ -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
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 fb4d421e080..8decaa4a498 100644
--- a/devel/pth/patches/patch-ag
+++ b/devel/pth/patches/patch-ag
@@ -1,4 +1,4 @@
-$NetBSD: patch-ag,v 1.2 2002/08/25 18:38:45 jlam Exp $
+$NetBSD: patch-ag,v 1.3 2002/10/14 11:49:56 skrll Exp $
--- pth_lib.c.orig Sun Jan 27 11:03:40 2002
+++ pth_lib.c
@@ -34,7 +34,7 @@ $NetBSD: patch-ag,v 1.2 2002/08/25 18:38:45 jlam Exp $
/* initialize the scheduler */
pth_scheduler_init();
-@@ -105,10 +101,28 @@ int pth_init(void)
+@@ -105,10 +101,29 @@ int pth_init(void)
pth_mctx_switch(&pth_main->mctx, &pth_sched->mctx);
/* came back, so let's go home... */
@@ -54,17 +54,18 @@ $NetBSD: patch-ag,v 1.2 2002/08/25 18:38:45 jlam Exp $
+ /* if we've already explicitly initialized then error */
+ if (pth_explicit_initialize)
+ return_errno(FALSE, EPERM);
++ rv = TRUE;
+ } else {
+ rv = pth__init();
+ pth_explicit_initialize = TRUE;
-+ return rv;
+ }
++ return rv;
+}
+
/* kill the package internals */
int pth_kill(void)
{
-@@ -118,6 +132,7 @@ int pth_kill(void)
+@@ -118,6 +133,7 @@ int pth_kill(void)
pth_thread_cleanup(pth_main);
pth_scheduler_kill();
pth_initialized = FALSE;
@@ -72,7 +73,7 @@ $NetBSD: patch-ag,v 1.2 2002/08/25 18:38:45 jlam Exp $
pth_tcb_free(pth_sched);
pth_tcb_free(pth_main);
pth_debug1("pth_kill: leave");
-@@ -182,6 +197,7 @@ static void pth_spawn_trampoline(void)
+@@ -182,6 +198,7 @@ static void pth_spawn_trampoline(void)
/* no return! */
abort();
}
diff --git a/devel/pth/patches/patch-ah b/devel/pth/patches/patch-ah
new file mode 100644
index 00000000000..362c252be73
--- /dev/null
+++ b/devel/pth/patches/patch-ah
@@ -0,0 +1,53 @@
+$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
new file mode 100644
index 00000000000..28e9d18a58c
--- /dev/null
+++ b/devel/pth/patches/patch-ai
@@ -0,0 +1,18 @@
+$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
+ **