From: wessels <> Date: Sun, 4 Jan 1998 07:17:52 +0000 (+0000) Subject: why is poll() not being skipped on OSF? X-Git-Tag: SQUID_3_0_PRE1~4268 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbaf3d23c4b128229f39d75722e95cdd4f519e2b;p=thirdparty%2Fsquid.git why is poll() not being skipped on OSF? --- diff --git a/configure b/configure index 1b6bf328b7..5803bf3c8f 100755 --- a/configure +++ b/configure @@ -535,7 +535,7 @@ fi -# From configure.in Revision: 1.91 +# From configure.in Revision: 1.92 ac_aux_dir= for ac_dir in aux $srcdir/aux; do if test -f $ac_dir/install-sh; then @@ -3068,7 +3068,6 @@ for ac_func in \ memmove \ mktime \ mstats \ - poll \ random \ regcomp \ regexec \ @@ -3090,12 +3089,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3094: checking for $ac_func" >&5 +echo "configure:3093: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3146,13 +3145,68 @@ done case "$host" in alpha-dec-osf3.*) # John Kay (jkay@nlanr.net) 19970818 - echo "Disabling poll() for $host..." - ac_cv_func_poll="no" + echo "skipping poll() check for $host..." + ac_cv_func_poll='no' + ;; + *-hp-hpux*.*) + # Duane Wessels + echo "skipping poll() check for $host..." + ac_cv_func_poll='no' + ;; + *) + echo $ac_n "checking for poll""... $ac_c" 1>&6 +echo "configure:3159: checking for poll" >&5 +if eval "test \"`echo '$''{'ac_cv_func_poll'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char poll(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_poll) || defined (__stub___poll) +choke me +#else +poll(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_poll=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_poll=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'poll`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + ;; esac echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6 -echo "configure:3156: checking if setresuid is implemented" >&5 +echo "configure:3210: checking if setresuid is implemented" >&5 if eval "test \"`echo '$''{'ac_cv_func_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3160,7 +3214,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -3173,7 +3227,7 @@ else } EOF -if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_setresuid="yes" else @@ -3283,7 +3337,7 @@ fi echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6 -echo "configure:3287: checking if GNUregex needs to be compiled" >&5 +echo "configure:3341: checking if GNUregex needs to be compiled" >&5 if test "$ac_cv_func_regcomp" = "no" ; then USE_GNUREGEX="yes" else @@ -3315,12 +3369,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3319: checking for $ac_func" >&5 +echo "configure:3373: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3371,12 +3425,12 @@ done echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6 -echo "configure:3375: checking Default FD_SETSIZE value" >&5 +echo "configure:3429: checking Default FD_SETSIZE value" >&5 if test "$cross_compiling" = yes; then DEFAULT_FD_SETSIZE=256 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -3419,12 +3473,12 @@ EOF echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6 -echo "configure:3423: checking Maximum number of filedescriptors we can open" >&5 +echo "configure:3477: checking Maximum number of filedescriptors we can open" >&5 if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -3476,7 +3530,7 @@ main() { } EOF -if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -3495,12 +3549,12 @@ EOF echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6 -echo "configure:3499: checking Default UDP send buffer size" >&5 +echo "configure:3553: checking Default UDP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -3519,7 +3573,7 @@ main () } EOF -if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_SNDBUF=`cat conftestval` else @@ -3538,12 +3592,12 @@ EOF echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6 -echo "configure:3542: checking Default UDP receive buffer size" >&5 +echo "configure:3596: checking Default UDP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -3562,7 +3616,7 @@ main () } EOF -if { (eval echo configure:3566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_RCVBUF=`cat conftestval` else @@ -3581,12 +3635,12 @@ EOF echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6 -echo "configure:3585: checking Default TCP send buffer size" >&5 +echo "configure:3639: checking Default TCP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -3605,7 +3659,7 @@ main () } EOF -if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_SNDBUF=`cat conftestval` else @@ -3624,12 +3678,12 @@ EOF echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6 -echo "configure:3628: checking Default TCP receive buffer size" >&5 +echo "configure:3682: checking Default TCP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -3648,7 +3702,7 @@ main () } EOF -if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_RCVBUF=`cat conftestval` else @@ -3667,19 +3721,19 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 -echo "configure:3671: checking if sys_errlist is already defined" >&5 +echo "configure:3725: checking if sys_errlist is already defined" >&5 if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *s = sys_errlist0; ; return 0; } EOF -if { (eval echo configure:3683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_needs_sys_errlist="no" else @@ -3701,16 +3755,16 @@ EOF fi echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 -echo "configure:3705: checking for libresolv _dns_ttl_ hack" >&5 +echo "configure:3759: checking for libresolv _dns_ttl_ hack" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF diff --git a/configure.in b/configure.in index c8066c8103..59351b7094 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.92 1998/01/02 21:49:41 wessels Exp $ +dnl $Id: configure.in,v 1.93 1998/01/04 00:17:52 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.92 $)dnl +AC_REVISION($Revision: 1.93 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -373,7 +373,6 @@ AC_CHECK_FUNCS(\ memmove \ mktime \ mstats \ - poll \ random \ regcomp \ regexec \ @@ -397,8 +396,16 @@ AC_CHECK_FUNCS(\ case "$host" in [alpha-dec-osf3.*]) # John Kay (jkay@nlanr.net) 19970818 - echo "Disabling poll() for $host..." - ac_cv_func_poll="no" + echo "skipping poll() check for $host..." + ac_cv_func_poll='no' + ;; + [*-hp-hpux*.*]) + # Duane Wessels + echo "skipping poll() check for $host..." + ac_cv_func_poll='no' + ;; + *) + AC_CHECK_FUNC(poll) ;; esac diff --git a/include/autoconf.h.in b/include/autoconf.h.in index 560dfe1133..d8bfa53b1c 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -164,9 +164,6 @@ /* Define if you have the mstats function. */ #undef HAVE_MSTATS -/* Define if you have the poll function. */ -#undef HAVE_POLL - /* Define if you have the random function. */ #undef HAVE_RANDOM