summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2003-01-20 20:50:00 +0000
committerwtc%netscape.com <devnull@localhost>2003-01-20 20:50:00 +0000
commit74cecf7d9973aef46051e92dd6e09dd47c7de4f5 (patch)
treeddca953328027961e7ee583b5b93cb8e226aa84b /configure
parent21283e9ed8ff6c66eb5e8d8a0ba0fd9db4a01239 (diff)
downloadnspr-hg-74cecf7d9973aef46051e92dd6e09dd47c7de4f5.tar.gz
Bug 188439: fixed a bug in the PR_Poll implementation for
_PR_POLL_WITH_SELECT. We could still call FD_SET if the osfd was larger than FD_SETSIZE. Fixed the bug that _PR_POLL_WITH_SELECT was defined after the system header files had been included. Need to define it on the compile command line. Define _USE_BIG_FDS on HP-UX. Because that macro increases the size of fd_set to about 7500 bytes and PR_Poll allocates 3 fd_sets on the stack, also increased the minimum thread stack size to 128KB on HP-UX. Modified Files: configure configure.in _hpux.h _osf1.h ptio.c Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure64
1 files changed, 42 insertions, 22 deletions
diff --git a/configure b/configure
index dbad84cd..05bcb355 100755
--- a/configure
+++ b/configure
@@ -3328,6 +3328,18 @@ EOF
#define hppa 1
EOF
+ # OSF1 and HPUX report the POLLHUP event for a socket when the
+ # shutdown(SHUT_WR) operation is called for the remote end, even though
+ # the socket is still writeable. Use select(), instead of poll(), to
+ # workaround this problem.
+ cat >> confdefs.h <<\EOF
+#define _PR_POLL_WITH_SELECT 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _USE_BIG_FDS 1
+EOF
+
DLL_SUFFIX=sl
DSO_LDOPTS='-b +h $(notdir $@)'
PR_MD_CSRCS=hpux.c
@@ -4147,6 +4159,14 @@ EOF
#define _REENTRANT 1
EOF
+ # OSF1 and HPUX report the POLLHUP event for a socket when the
+ # shutdown(SHUT_WR) operation is called for the remote end, even though
+ # the socket is still writeable. Use select(), instead of poll(), to
+ # workaround this problem.
+ cat >> confdefs.h <<\EOF
+#define _PR_POLL_WITH_SELECT 1
+EOF
+
if echo "$OS_RELEASE" | egrep -c '(V2.0|V3.2)' 2>/dev/null ; then
USE_NSPR_THREADS=1
@@ -4160,17 +4180,17 @@ EOF
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4164: checking for machine/builtins.h" >&5
+echo "configure:4184: checking for machine/builtins.h" >&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 4169 "configure"
+#line 4189 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4194: \"$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*
@@ -4678,12 +4698,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4682: checking for dlopen" >&5
+echo "configure:4702: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4687 "configure"
+#line 4707 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -4706,7 +4726,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -4725,7 +4745,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4729: checking for dlopen in -ldl" >&5
+echo "configure:4749: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4733,7 +4753,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4737 "configure"
+#line 4757 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4744,7 +4764,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4768: \"$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"
else
@@ -4772,13 +4792,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4776: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4796: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 4782 "configure"
+#line 4802 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4796,7 +4816,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4800 "configure"
+#line 4820 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4820,12 +4840,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4824: checking for $ac_func" >&5
+echo "configure:4844: checking for $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 4829 "configure"
+#line 4849 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4848,7 +4868,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4872: \"$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"
else
@@ -4887,7 +4907,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:4891: checking for +Olit support" >&5
+echo "configure:4911: checking for +Olit support" >&5
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4921,7 +4941,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:4925: checking for pthread_create in -lpthreads" >&5
+echo "configure:4945: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -4943,7 +4963,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:4947: checking for pthread_create in -lpthread" >&5
+echo "configure:4967: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -4965,7 +4985,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:4969: checking for pthread_create in -lc_r" >&5
+echo "configure:4989: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -4987,7 +5007,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:4991: checking for pthread_create in -lc" >&5
+echo "configure:5011: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5139,7 +5159,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5143: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5163: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5162,7 +5182,7 @@ echo "configure:5143: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:5166: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5186: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then