From: wessels <> Date: Sat, 21 Dec 1996 04:07:34 +0000 (+0000) Subject: test for fchmod() X-Git-Tag: SQUID_3_0_PRE1~5258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ac29a5bb799ce33cf11c2d5f8e12aaf3b1195a3;p=thirdparty%2Fsquid.git test for fchmod() --- diff --git a/configure b/configure index 8860aba0ef..857f175d0e 100755 --- a/configure +++ b/configure @@ -514,7 +514,7 @@ fi -# From configure.in Revision: 1.60 +# From configure.in Revision: 1.61 ac_aux_dir= for ac_dir in aux $srcdir/aux; do if test -f $ac_dir/install-sh; then @@ -2559,6 +2559,7 @@ esac for ac_func in \ bcopy \ + fchmod \ getdtablesize \ getrusage \ getspnam \ @@ -2594,7 +2595,7 @@ 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; }; then +if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2669,7 +2670,7 @@ 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; }; then +if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2719,7 +2720,7 @@ if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -2771,7 +2772,7 @@ main() { } EOF -{ (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_MAXFD=`cat conftestval` else @@ -2790,7 +2791,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -2809,7 +2810,7 @@ main () } EOF -{ (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_UDP_SO_SNDBUF=`cat conftestval` else @@ -2828,7 +2829,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -2847,7 +2848,7 @@ main () } EOF -{ (eval echo configure:2851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_UDP_SO_RCVBUF=`cat conftestval` else @@ -2866,7 +2867,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -2885,7 +2886,7 @@ main () } EOF -{ (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_TCP_SO_SNDBUF=`cat conftestval` else @@ -2904,7 +2905,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -2923,7 +2924,7 @@ main () } EOF -{ (eval echo configure:2927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_TCP_SO_RCVBUF=`cat conftestval` else @@ -2939,7 +2940,7 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } @@ -2947,7 +2948,7 @@ int t() { char *s = sys_errlist[0]; ; return 0; } EOF -if { (eval echo configure:2951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2963,7 +2964,7 @@ rm -f conftest* echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF diff --git a/configure.in b/configure.in index e0f99219b5..b16c6fe311 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.61 1996/12/06 17:55:09 wessels Exp $ +dnl $Id: configure.in,v 1.62 1996/12/20 21:07:34 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.61 $)dnl +AC_REVISION($Revision: 1.62 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -288,6 +288,7 @@ esac dnl Check for library functions AC_CHECK_FUNCS(\ bcopy \ + fchmod \ getdtablesize \ getrusage \ getspnam \ diff --git a/include/autoconf.h.in b/include/autoconf.h.in index 135e6e6cb9..dfbd5bb77e 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -85,6 +85,9 @@ /* Define if you have the bcopy function. */ #undef HAVE_BCOPY +/* Define if you have the fchmod function. */ +#undef HAVE_FCHMOD + /* Define if you have the getdtablesize function. */ #undef HAVE_GETDTABLESIZE diff --git a/src/store.cc b/src/store.cc index 2cc2db76be..d0a77c51d9 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.184 1996/12/19 23:13:32 wessels Exp $ + * $Id: store.cc,v 1.185 1996/12/20 21:07:36 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -2589,8 +2589,10 @@ storeWriteCleanLog(void) debug(50, 0, "storeWriteCleanLog: %s: %s\n", tmp_filename, xstrerror()); return 0; } +#if HAVE_FCHMOD if (stat(swaplog_file, &sb) == 0) fchmod(fileno(fp), sb.st_mode); +#endif for (e = storeGetFirst(); e; e = storeGetNext()) { if (e->swap_file_number < 0) continue;