From: wessels <> Date: Sat, 4 Jan 1997 05:59:08 +0000 (+0000) Subject: From: Tethpub Znek X-Git-Tag: SQUID_3_0_PRE1~5241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95cf2361703bd3e09e349f7063b7131fe0e2b6a2;p=thirdparty%2Fsquid.git From: Tethpub Znek Subject: Fixes for squid-1.1.2 under NeXTSTEP 3.3 - fcntl() needs 3 args - strftime needs %H:%M:%S instead of %T - mode_t not defined - don't include --- diff --git a/configure b/configure index 857f175d0e..4897531627 100755 --- a/configure +++ b/configure @@ -514,7 +514,7 @@ fi -# From configure.in Revision: 1.61 +# From configure.in Revision: 1.62 ac_aux_dir= for ac_dir in aux $srcdir/aux; do if test -f $ac_dir/install-sh; then @@ -2062,6 +2062,37 @@ EOF fi +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mode_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t u_short +EOF + +fi + echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 ac_lib_var=`echo nsl'_'main | tr './+\055' '__p_'` @@ -2071,7 +2102,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2111,7 +2142,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2151,7 +2182,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnumalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2200,7 +2231,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2243,7 +2274,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2283,7 +2314,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lregex $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2317,7 +2348,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2350,7 +2381,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l44bsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2398,7 +2429,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2439,7 +2470,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2479,7 +2510,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lshadow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2595,7 +2626,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:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2670,7 +2701,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:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2720,7 +2751,7 @@ if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -2772,7 +2803,7 @@ main() { } EOF -{ (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then SQUID_MAXFD=`cat conftestval` else @@ -2791,7 +2822,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -2810,7 +2841,7 @@ main () } EOF -{ (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2845: \"$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 @@ -2829,7 +2860,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -2848,7 +2879,7 @@ main () } EOF -{ (eval echo configure:2852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2883: \"$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 @@ -2867,7 +2898,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -2886,7 +2917,7 @@ main () } EOF -{ (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2921: \"$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 @@ -2905,7 +2936,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -2924,7 +2955,7 @@ main () } EOF -{ (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2959: \"$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 @@ -2940,7 +2971,7 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } @@ -2948,7 +2979,7 @@ int t() { char *s = sys_errlist[0]; ; return 0; } EOF -if { (eval echo configure:2952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2964,7 +2995,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:3007: \"$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 b16c6fe311..899656f088 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.62 1996/12/20 21:07:34 wessels Exp $ +dnl $Id: configure.in,v 1.63 1997/01/03 22:59:08 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.62 $)dnl +AC_REVISION($Revision: 1.63 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -210,6 +210,7 @@ AC_FUNC_ALLOCA AC_CHECK_TYPE(pid_t, int) AC_CHECK_TYPE(size_t, int) AC_CHECK_TYPE(off_t, int) +AC_CHECK_TYPE(mode_t, u_short) dnl Check for needed libraries AC_CHECK_LIB(nsl, main) diff --git a/include/autoconf.h.in b/include/autoconf.h.in index dfbd5bb77e..6d7a91a4a1 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -16,6 +16,9 @@ /* Define if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H +/* Define to `int' if doesn't define. */ +#undef mode_t + /* Define to `long' if doesn't define. */ #undef off_t diff --git a/src/comm.cc b/src/comm.cc index 2f63d60f0f..4a42006469 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.124 1996/12/20 23:45:38 wessels Exp $ + * $Id: comm.cc,v 1.125 1997/01/03 22:59:15 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1200,7 +1200,8 @@ int commSetNonBlocking(int fd) { int flags; - if ((flags = fcntl(fd, F_GETFL)) < 0) { + int dummy=0; + if ((flags = fcntl(fd, F_GETFL, dummy)) < 0) { debug(50, 0, "FD %d: fcntl F_GETFL: %s\n", fd, xstrerror()); return COMM_ERROR; } diff --git a/src/debug.cc b/src/debug.cc index ef38efb224..499adad93f 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1,5 +1,5 @@ /* - * $Id: debug.cc,v 1.38 1996/11/15 07:51:07 wessels Exp $ + * $Id: debug.cc,v 1.39 1997/01/03 22:59:15 wessels Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived @@ -289,7 +289,7 @@ accessLogTime(time_t t) static time_t last_t = 0; if (t != last_t) { tm = localtime(&t); - strftime(buf, 127, "%y/%m/%d %T", tm); + strftime(buf, 127, "%y/%m/%d %H:%M:%S", tm); last_t = t; } return buf; diff --git a/src/squid.h b/src/squid.h index f2c8c20570..92f96a0cdb 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.88 1997/01/03 22:45:16 wessels Exp $ + * $Id: squid.h,v 1.89 1997/01/03 22:59:17 wessels Exp $ * * AUTHOR: Duane Wessels * @@ -245,7 +245,7 @@ typedef unsigned long u_num32; #include "ansiproto.h" -#if HAVE_REGEX_H +#if HAVE_REGEX_H && !defined(_SQUID_NEXT_) #include #else /* HAVE_REGEX_H */ #include "GNUregex.h"