]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Created USE_GNUREGEX define to fix forcing GNU regex on Solaris and NeXTStep.
authorwessels <>
Wed, 8 Jan 1997 03:05:31 +0000 (03:05 +0000)
committerwessels <>
Wed, 8 Jan 1997 03:05:31 +0000 (03:05 +0000)
ChangeLog
configure
configure.in
include/autoconf.h.in
src/debug.cc
src/squid.h

index a642e7adee10485691374aa2a03b77e1aa477121..908ed034ae23a834a8a7f56efb487eebb6677a0f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+       - Created USE_GNUREGEX define to fix forcing GNU regex on 
+         Solaris and NeXTStep.
+
 Changes to squid-1.1.3 (January 7, 1997):
 
        - Changed inet_addr("X") to inet_addr("255.255.255.255")
index 48975316278499661ec983b9c7fc7ad18a219674..69f897b38f6e77b718bc7764635b9400c12da6b8 100755 (executable)
--- a/configure
+++ b/configure
@@ -514,7 +514,7 @@ fi
 
 
 
-# From configure.in Revision: 1.62 
+# From configure.in Revision: 1.63 
 ac_aux_dir=
 for ac_dir in aux $srcdir/aux; do
   if test -f $ac_dir/install-sh; then
@@ -2675,19 +2675,26 @@ done
 
 echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6
 if test "$ac_cv_func_regcomp" = "no" ; then
-       COMPILE_GNUREGEX="yes"
+       USE_GNUREGEX="yes"
 else
-       COMPILE_GNUREGEX="no"
+       USE_GNUREGEX="no"
 fi
 case "$host" in
        *-sun-solaris2.[0-4])
-       COMPILE_GNUREGEX="yes"
-       ;;
+               USE_GNUREGEX="yes"
+               ;;
+       *-next-nextstep*)
+               USE_GNUREGEX="yes"
+               ;;
 esac
-echo "$ac_t""$COMPILE_GNUREGEX" 1>&6
-if test "$COMPILE_GNUREGEX" = "yes"; then
+echo "$ac_t""$USE_GNUREGEX" 1>&6
+if test "$USE_GNUREGEX" = "yes"; then
        REGEXLIB="-lregex"
        LIBREGEX="libregex.a"
+       cat >> confdefs.h <<\EOF
+#define USE_GNUREGEX 1
+EOF
+
 fi
 
 
@@ -2701,7 +2708,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 2705 "configure"
+#line 2712 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2725,7 +2732,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:2736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2751,7 +2758,7 @@ if test "$cross_compiling" = yes; then
   SQUID_MAXFD=256
 else
 cat > conftest.$ac_ext <<EOF
-#line 2755 "configure"
+#line 2762 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -2803,7 +2810,7 @@ main() {
 }
 
 EOF
-{ (eval echo configure:2807: \"$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_MAXFD=`cat conftestval`
 else
@@ -2822,7 +2829,7 @@ if test "$cross_compiling" = yes; then
   SQUID_UDP_SO_SNDBUF=16384
 else
 cat > conftest.$ac_ext <<EOF
-#line 2826 "configure"
+#line 2833 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2841,7 +2848,7 @@ main ()
 }
 
 EOF
-{ (eval echo configure:2845: \"$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_SNDBUF=`cat conftestval`
 else
@@ -2860,7 +2867,7 @@ if test "$cross_compiling" = yes; then
   SQUID_UDP_SO_RCVBUF=16384
 else
 cat > conftest.$ac_ext <<EOF
-#line 2864 "configure"
+#line 2871 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2879,7 +2886,7 @@ main ()
 }
 
 EOF
-{ (eval echo configure:2883: \"$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_UDP_SO_RCVBUF=`cat conftestval`
 else
@@ -2898,7 +2905,7 @@ if test "$cross_compiling" = yes; then
   SQUID_TCP_SO_SNDBUF=16384
 else
 cat > conftest.$ac_ext <<EOF
-#line 2902 "configure"
+#line 2909 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2917,7 +2924,7 @@ main ()
 }
 
 EOF
-{ (eval echo configure:2921: \"$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_SNDBUF=`cat conftestval`
 else
@@ -2936,7 +2943,7 @@ if test "$cross_compiling" = yes; then
   SQUID_TCP_SO_RCVBUF=16384
 else
 cat > conftest.$ac_ext <<EOF
-#line 2940 "configure"
+#line 2947 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -2955,7 +2962,7 @@ main ()
 }
 
 EOF
-{ (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+{ (eval echo configure:2966: \"$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
@@ -2971,7 +2978,7 @@ EOF
 
 echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
 cat > conftest.$ac_ext <<EOF
-#line 2975 "configure"
+#line 2982 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() { return 0; }
@@ -2979,7 +2986,7 @@ int t() {
 char *s = sys_errlist[0];
 ; return 0; }
 EOF
-if { (eval echo configure:2983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -2995,7 +3002,7 @@ rm -f conftest*
 
 echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6
 cat > conftest.$ac_ext <<EOF
-#line 2999 "configure"
+#line 3006 "configure"
 #include "confdefs.h"
 extern int _dns_ttl_;
 int main() { return 0; }
@@ -3003,7 +3010,7 @@ int t() {
 return _dns_ttl_;
 ; return 0; }
 EOF
-if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+if { (eval echo configure:3014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 cat >> confdefs.h <<\EOF
index 899656f08844f667f7a1cae37415d1032db3f7a5..dd0c49b1642755e49ef2a9163809be6823723f1a 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.63 1997/01/03 22:59:08 wessels Exp $
+dnl  $Id: configure.in,v 1.64 1997/01/07 20:05:33 wessels Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.63 $)dnl
+AC_REVISION($Revision: 1.64 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(aux)
 
@@ -322,19 +322,23 @@ AC_CHECK_FUNCS(\
 
 AC_MSG_CHECKING(if GNUregex needs to be compiled)
 if test "$ac_cv_func_regcomp" = "no" ; then
-       COMPILE_GNUREGEX="yes"
+       USE_GNUREGEX="yes"
 else
-       COMPILE_GNUREGEX="no"
+       USE_GNUREGEX="no"
 fi
 case "$host" in
        [*-sun-solaris2.[0-4]])
-       COMPILE_GNUREGEX="yes"
-       ;;
+               USE_GNUREGEX="yes"
+               ;;
+       [*-next-nextstep*])
+               USE_GNUREGEX="yes"
+               ;;
 esac
-AC_MSG_RESULT($COMPILE_GNUREGEX)
-if test "$COMPILE_GNUREGEX" = "yes"; then
+AC_MSG_RESULT($USE_GNUREGEX)
+if test "$USE_GNUREGEX" = "yes"; then
        REGEXLIB="-lregex"
        LIBREGEX="libregex.a"
+       AC_DEFINE(USE_GNUREGEX)
 fi
 AC_SUBST(REGEXLIB)
 AC_SUBST(LIBREGEX)
index 6d7a91a4a14237e6438a1ea3669f50cfae5e43aa..88ea178d7521b9247bcf1a289f69e5a75420af10 100644 (file)
@@ -79,6 +79,9 @@
 /* Define if your compiler supports prototyping */
 #undef HAVE_ANSI_PROTOTYPES
 
+/* Define if we should use GNU regex */
+#undef USE_GNUREGEX
+
 /* The number of bytes in a int.  */
 #undef SIZEOF_INT
 
index 499adad93f867d0cbac7b6af911249026ee29165..d8dbeacc9dbf14d647e39b6fbfa39b65ab4ba145 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: debug.cc,v 1.39 1997/01/03 22:59:15 wessels Exp $
+ * $Id: debug.cc,v 1.40 1997/01/07 20:05:42 wessels Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
 
 #include "squid.h"
 
-const char *volatile _db_file = __FILE__;
-volatile int _db_line = 0;
-
 FILE *debug_log = NULL;
 static char *debug_log_file = NULL;
 static const char *const w_space = " \t\n\r";
@@ -137,34 +134,26 @@ _db_print(va_alist)
     LOCAL_ARRAY(char, tmpbuf, BUFSIZ);
 #endif
 
-    if (debug_log == NULL)
-       return;
-
 #ifdef __STDC__
+    if (level > debugLevels[section])
+       return;
     va_start(args, format);
 #else
     va_start(args);
     section = va_arg(args, int);
     level = va_arg(args, int);
-    format = va_arg(args, const char *);
-#endif
-
     if (level > debugLevels[section]) {
        va_end(args);
        return;
     }
-#ifdef LOG_FILE_AND_LINE
-    sprintf(f, "%s %-10.10s %4d| %s",
-       accessLogTime(squid_curtime),
-       _db_file,
-       _db_line,
-       format);
-#else
+    format = va_arg(args, const char *);
+#endif
+
+    if (debug_log == NULL)
+       return;
     sprintf(f, "%s| %s",
        accessLogTime(squid_curtime),
        format);
-#endif
-
 #if HAVE_SYSLOG
     /* level 0 go to syslog */
     if (level == 0 && opt_syslog_enable) {
@@ -174,7 +163,6 @@ _db_print(va_alist)
        syslog(LOG_ERR, "%s", tmpbuf);
     }
 #endif /* HAVE_SYSLOG */
-
     /* write to log file */
     vfprintf(debug_log, f, args);
     if (unbuffered_logs)
index 92f96a0cdbb51d4658b57b65ff60816b5f988454..50169674ab3126c0b286b0065cd3038978783e17 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.89 1997/01/03 22:59:17 wessels Exp $
+ * $Id: squid.h,v 1.90 1997/01/07 20:05:44 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -245,11 +245,11 @@ typedef unsigned long u_num32;
 
 #include "ansiproto.h"
 
-#if HAVE_REGEX_H && !defined(_SQUID_NEXT_)
-#include <regex.h>
-#else /* HAVE_REGEX_H */
+#ifdef USE_GNUREGEX
 #include "GNUregex.h"
-#endif /* HAVE_REGEX_H */
+#elif HAVE_REGEX_H
+#include <regex.h>
+#endif
 
 /*
  * So if FD_SETSIZE is less than SQUID_MAXFD we'd probably better