]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From: Tethpub Znek <znek@zappa.free.de>
authorwessels <>
Sat, 4 Jan 1997 05:59:08 +0000 (05:59 +0000)
committerwessels <>
Sat, 4 Jan 1997 05:59:08 +0000 (05:59 +0000)
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 <regex.h>

configure
configure.in
include/autoconf.h.in
src/comm.cc
src/debug.cc
src/squid.h

index 857f175d0e8b35769e7eee4531c4bf3ff646a47e..48975316278499661ec983b9c7fc7ad18a219674 100755 (executable)
--- 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 <<EOF
+#line 2071 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#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 <<EOF
-#line 2075 "configure"
+#line 2106 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -2079,7 +2110,7 @@ int t() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2083: \"$ac_link\") 1>&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 <<EOF
-#line 2115 "configure"
+#line 2146 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -2119,7 +2150,7 @@ int t() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&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 <<EOF
-#line 2155 "configure"
+#line 2186 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -2159,7 +2190,7 @@ int t() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2163: \"$ac_link\") 1>&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 <<EOF
-#line 2204 "configure"
+#line 2235 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -2208,7 +2239,7 @@ int t() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2212: \"$ac_link\") 1>&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 <<EOF
-#line 2247 "configure"
+#line 2278 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -2251,7 +2282,7 @@ int t() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2255: \"$ac_link\") 1>&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 <<EOF
-#line 2287 "configure"
+#line 2318 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -2291,7 +2322,7 @@ int t() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2295: \"$ac_link\") 1>&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 <<EOF
-#line 2321 "configure"
+#line 2352 "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
@@ -2329,7 +2360,7 @@ int t() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:2333: \"$ac_link\") 1>&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 <<EOF
-#line 2354 "configure"
+#line 2385 "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
@@ -2362,7 +2393,7 @@ int t() {
 inet_aton()
 ; return 0; }
 EOF
-if { (eval echo configure:2366: \"$ac_link\") 1>&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 <<EOF
-#line 2402 "configure"
+#line 2433 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -2406,7 +2437,7 @@ int t() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2410: \"$ac_link\") 1>&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 <<EOF
-#line 2443 "configure"
+#line 2474 "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
@@ -2451,7 +2482,7 @@ int t() {
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:2455: \"$ac_link\") 1>&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 <<EOF
-#line 2483 "configure"
+#line 2514 "configure"
 #include "confdefs.h"
 
 int main() { return 0; }
@@ -2487,7 +2518,7 @@ int t() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2491: \"$ac_link\") 1>&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 <<EOF
-#line 2599 "configure"
+#line 2630 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2619,7 +2650,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2623: \"$ac_link\") 1>&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 <<EOF
-#line 2674 "configure"
+#line 2705 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2694,7 +2725,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2698: \"$ac_link\") 1>&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 <<EOF
-#line 2724 "configure"
+#line 2755 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -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 <<EOF
-#line 2795 "configure"
+#line 2826 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -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 <<EOF
-#line 2833 "configure"
+#line 2864 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -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 <<EOF
-#line 2871 "configure"
+#line 2902 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -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 <<EOF
-#line 2909 "configure"
+#line 2940 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -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 <<EOF
-#line 2944 "configure"
+#line 2975 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 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 <<EOF
-#line 2968 "configure"
+#line 2999 "configure"
 #include "confdefs.h"
 extern int _dns_ttl_;
 int main() { return 0; }
@@ -2972,7 +3003,7 @@ int t() {
 return _dns_ttl_;
 ; return 0; }
 EOF
-if { (eval echo configure:2976: \"$ac_link\") 1>&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
index b16c6fe31169c30fb349010673ee73e85dd8153c..899656f08844f667f7a1cae37415d1032db3f7a5 100644 (file)
@@ -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)
index dfbd5bb77e42d5d3b330383cc3c3c9a179c96906..6d7a91a4a14237e6438a1ea3669f50cfae5e43aa 100644 (file)
@@ -16,6 +16,9 @@
 /* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
 #undef HAVE_ALLOCA_H
 
+/* Define to `int' if <sys/types.h> doesn't define.  */
+#undef mode_t
+
 /* Define to `long' if <sys/types.h> doesn't define.  */
 #undef off_t
 
index 2f63d60f0f8193466af605903012f3b0e7989298..4a42006469b105dbac718fffa86812003eb445ac 100644 (file)
@@ -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;
     }
index ef38efb224880637a00b3e3300ca580c64f4ac51..499adad93f867d0cbac7b6af911249026ee29165 100644 (file)
@@ -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;
index f2c8c20570678251f10bd9e5861356d39fd60315..92f96a0cdbb51d4658b57b65ff60816b5f988454 100644 (file)
@@ -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 <regex.h>
 #else /* HAVE_REGEX_H */
 #include "GNUregex.h"