From: wessels <> Date: Tue, 12 Jan 1999 03:34:14 +0000 (+0000) Subject: IRIX inline IO optimization ( -OPT:fast_io=ON) fubars this: X-Git-Tag: SQUID_3_0_PRE1~2435 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=635e6242db4ed619a611a269edec9b280690b109;p=thirdparty%2Fsquid.git IRIX inline IO optimization ( -OPT:fast_io=ON) fubars this: fprintf(fopen("foo", "w"), "%d", val); --- diff --git a/configure b/configure index 18b98a54b6..c78c93bf2d 100755 --- a/configure +++ b/configure @@ -587,7 +587,7 @@ fi -# From configure.in Revision: 1.160 +# From configure.in Revision: 1.161 ac_aux_dir= for ac_dir in cfgaux $srcdir/cfgaux; do if test -f $ac_dir/install-sh; then @@ -4212,12 +4212,13 @@ else #include #endif main() { - fprintf (fopen("conftestval", "w"), "%d\n", FD_SETSIZE); + FILE *fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", FD_SETSIZE); exit(0); } EOF -if { (eval echo configure:4221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -4236,12 +4237,12 @@ EOF echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6 -echo "configure:4240: checking Maximum number of filedescriptors we can open" >&5 +echo "configure:4241: checking Maximum number of filedescriptors we can open" >&5 if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -4250,6 +4251,7 @@ else #include #include main() { + FILE *fp; int i,j; #if __CYGWIN32__ /* getrlimit and sysconf returns bogous values on cygwin32. @@ -4295,12 +4297,13 @@ main() { i++; #endif #endif /* __CYGWIN32__ */ - fprintf (fopen("conftestval", "w"), "%d\n", i); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", i); exit(0); } EOF -if { (eval echo configure:4304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -4326,12 +4329,12 @@ if test "$SQUID_MAXFD" -lt 512 ; then fi echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6 -echo "configure:4330: checking Default UDP send buffer size" >&5 +echo "configure:4333: checking Default UDP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4341,16 +4344,18 @@ else #include main () { + FILE *fp; int fd,val=0,len=sizeof(int); if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1); if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1); if (val<=0) exit(1); - fprintf (fopen("conftestval", "w"), "%d\n", val); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", val); exit(0); } EOF -if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4359: \"$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 @@ -4369,12 +4374,12 @@ EOF echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6 -echo "configure:4373: checking Default UDP receive buffer size" >&5 +echo "configure:4378: checking Default UDP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4384,16 +4389,18 @@ else #include main () { + FILE *fp; int fd,val=0,len=sizeof(int); if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1); if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1); if (val <= 0) exit(1); - fprintf (fopen("conftestval", "w"), "%d\n", val); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", val); exit(0); } EOF -if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4404: \"$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 @@ -4412,12 +4419,12 @@ EOF echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6 -echo "configure:4416: checking Default TCP send buffer size" >&5 +echo "configure:4423: checking Default TCP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4427,16 +4434,18 @@ else #include main () { + FILE *fp; int fd,val=0,len=sizeof(int); if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1); if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1); if (val <= 0) exit(1); - fprintf (fopen("conftestval", "w"), "%d\n", val); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", val); exit(0); } EOF -if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4449: \"$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 @@ -4455,12 +4464,12 @@ EOF echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6 -echo "configure:4459: checking Default TCP receive buffer size" >&5 +echo "configure:4468: checking Default TCP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4470,16 +4479,18 @@ else #include main () { + FILE *fp; int fd,val=0,len=sizeof(int); if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1); if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1); if (val <= 0) exit(1); - fprintf (fopen("conftestval", "w"), "%d\n", val); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", val); exit(0); } EOF -if { (eval echo configure:4483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4494: \"$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 @@ -4498,19 +4509,19 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 -echo "configure:4502: checking if sys_errlist is already defined" >&5 +echo "configure:4513: 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:4514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_needs_sys_errlist="no" else @@ -4532,16 +4543,16 @@ EOF fi echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 -echo "configure:4536: checking for libresolv _dns_ttl_ hack" >&5 +echo "configure:4547: 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:4556: \"$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 @@ -4557,12 +4568,12 @@ fi rm -f conftest* echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6 -echo "configure:4561: checking if inet_ntoa() actually works" >&5 +echo "configure:4572: checking if inet_ntoa() actually works" >&5 if test "$cross_compiling" = yes; then INET_NTOA_RESULT="broken" else cat > conftest.$ac_ext < @@ -4572,14 +4583,16 @@ else #include main () { + FILE *fp; struct in_addr in; in.s_addr = inet_addr("1.2.3.4"); - fprintf (fopen("conftestval", "w"), "%s\n", inet_ntoa(in)); + fp = fopen("conftestval", "w"); + fprintf (fp, "%s\n", inet_ntoa(in)); exit(0); } EOF -if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then INET_NTOA_RESULT=`cat conftestval` else @@ -4603,9 +4616,9 @@ fi if test "$ac_cv_func_statvfs" = "yes" ; then echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6 -echo "configure:4607: checking for working statvfs() interface" >&5 +echo "configure:4620: checking for working statvfs() interface" >&5 cat > conftest.$ac_ext < @@ -4622,7 +4635,7 @@ statvfs("/tmp", &sfs); ; return 0; } EOF -if { (eval echo configure:4626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_func_statvfs=yes else @@ -4636,12 +4649,12 @@ echo "$ac_t""$ac_cv_func_statvfs" 1>&6 fi echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6 -echo "configure:4640: checking for _res.nsaddr_list" >&5 +echo "configure:4653: checking for _res.nsaddr_list" >&5 if eval "test \"`echo '$''{'ac_cv_have_res_nsaddr_list'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_nsaddr_list="yes" else @@ -4686,12 +4699,12 @@ fi if test $ac_cv_have_res_nsaddr_list = "no" ; then echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6 -echo "configure:4690: checking for _res.ns_list" >&5 +echo "configure:4703: checking for _res.ns_list" >&5 if eval "test \"`echo '$''{'ac_cv_have_res_ns_list'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_ns_list="yes" else diff --git a/configure.in b/configure.in index 9166e373fb..659ff484dd 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.161 1998/12/11 21:01:09 wessels Exp $ +dnl $Id: configure.in,v 1.162 1999/01/11 20:34:14 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.161 $)dnl +AC_REVISION($Revision: 1.162 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(cfgaux) @@ -1003,7 +1003,8 @@ AC_TRY_RUN([ #include #endif main() { - fprintf (fopen("conftestval", "w"), "%d\n", FD_SETSIZE); + FILE *fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", FD_SETSIZE); exit(0); } ], @@ -1022,6 +1023,7 @@ AC_TRY_RUN([ #include #include main() { + FILE *fp; int i,j; #if __CYGWIN32__ /* getrlimit and sysconf returns bogous values on cygwin32. @@ -1067,7 +1069,8 @@ main() { i++; #endif #endif /* __CYGWIN32__ */ - fprintf (fopen("conftestval", "w"), "%d\n", i); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", i); exit(0); } ], @@ -1094,11 +1097,13 @@ AC_TRY_RUN([ #include main () { + FILE *fp; int fd,val=0,len=sizeof(int); if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1); if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1); if (val<=0) exit(1); - fprintf (fopen("conftestval", "w"), "%d\n", val); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", val); exit(0); } ], @@ -1118,11 +1123,13 @@ AC_TRY_RUN([ #include main () { + FILE *fp; int fd,val=0,len=sizeof(int); if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1); if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1); if (val <= 0) exit(1); - fprintf (fopen("conftestval", "w"), "%d\n", val); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", val); exit(0); } ], @@ -1142,11 +1149,13 @@ AC_TRY_RUN([ #include main () { + FILE *fp; int fd,val=0,len=sizeof(int); if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1); if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1); if (val <= 0) exit(1); - fprintf (fopen("conftestval", "w"), "%d\n", val); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", val); exit(0); } ], @@ -1166,11 +1175,13 @@ AC_TRY_RUN([ #include main () { + FILE *fp; int fd,val=0,len=sizeof(int); if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1); if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1); if (val <= 0) exit(1); - fprintf (fopen("conftestval", "w"), "%d\n", val); + fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", val); exit(0); } ], @@ -1205,9 +1216,11 @@ AC_TRY_RUN([ #include main () { + FILE *fp; struct in_addr in; in.s_addr = inet_addr("1.2.3.4"); - fprintf (fopen("conftestval", "w"), "%s\n", inet_ntoa(in)); + fp = fopen("conftestval", "w"); + fprintf (fp, "%s\n", inet_ntoa(in)); exit(0); } ],