#endif
-#include "heap.h"
#include "util.h"
/*
diff -u -r -N squid-3.0.STABLE12/lib/libTrie/configure squid-3.0.STABLE13/lib/libTrie/configure
--- squid-3.0.STABLE12/lib/libTrie/configure 2009-01-21 14:59:07.000000000 +1300
+++ squid-3.0.STABLE13/lib/libTrie/configure 2009-02-03 14:36:20.000000000 +1300
@@ -731,6 +731,7 @@
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_optimizations
enable_inline
enable_dependency_tracking
enable_maintainer_mode
@@ -1373,14 +1374,21 @@
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-inline Don't compile trivial methods as inline. Squid
- is coded with much of the code able to be inlined.< Inlining is good for production builds, but not
- good for development. During development, use
- --disable-inline to reduce compilation times and
- allow incremental builds to be quick. For
- production builds, or load tests, use
- --enable-inline to have squid make all trivial
- methods inlinable by the compiler.
+ --disable-optimizations Don't compile Squid with compiler optimizations
+ enabled. Optimization is good for production builds,
+ but not good for debugging. During development, use
+ --disable-optimizations to reduce compilation times
+ and allow easier debugging. This option implicitly
+ also enabled --disable-inline
+ --disable-inline Don't compile trivial methods as inline. Squid is
+ coded with much of the code able to be inlined.
+ Inlining is good for production builds, but not good
+ for development. During development, use
+ --disable-inline to reduce compilation times and
+ allow incremental builds to be quick. For production
+ builds, or load tests, use --enable-inline to have
+ squid make all trivial methods inlinable by the
+ compiler.
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
@@ -1880,11 +1888,25 @@
SquidInline="yes"
+
+# Check whether --enable-optimizations was given.
+if test "${enable_optimizations+set}" = set; then
+ enableval=$enable_optimizations; if test "$enableval" = "no" ; then
+ { $as_echo "$as_me:$LINENO: Disabling compiler optimizations (-O flag)" >&5
+$as_echo "$as_me: Disabling compiler optimizations (-O flag)" >&6;}
+ CFLAGS="`echo $CFLAGS | sed -e 's/-O[0-9]*//'`"
+ CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[0-9]*//'`"
+ SquidInline="no"
+ fi
+
+fi
+
+
# Check whether --enable-inline was given.
if test "${enable_inline+set}" = set; then
enableval=$enable_inline; if test "$enableval" = "no" ; then
- SquidInline="no"
- fi
+ SquidInline="no"
+ fi
fi
@@ -1901,6 +1923,8 @@
_ACEOF
else
+ { $as_echo "$as_me:$LINENO: Inlining optimization disabled" >&5
+$as_echo "$as_me: Inlining optimization disabled" >&6;}
cat >>confdefs.h <<\_ACEOF
#define _SQUID_INLINE_ /**/
@@ -1908,6 +1932,7 @@
fi
+
# Checks for programs.
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
diff -u -r -N squid-3.0.STABLE12/lib/libTrie/configure.in squid-3.0.STABLE13/lib/libTrie/configure.in
--- squid-3.0.STABLE12/lib/libTrie/configure.in 2009-01-21 14:59:07.000000000 +1300
+++ squid-3.0.STABLE13/lib/libTrie/configure.in 2009-02-03 14:36:20.000000000 +1300
@@ -5,27 +5,48 @@
AC_CONFIG_AUX_DIR(cfgaux)
SquidInline="yes"
+
+AC_ARG_ENABLE(optimizations,
+ AC_HELP_STRING([--disable-optimizations],
+ [Don't compile Squid with compiler optimizations enabled.
+ Optimization is good for production builds, but not
+ good for debugging. During development, use
+ --disable-optimizations to reduce compilation times
+ and allow easier debugging. This option implicitly
+ also enabled --disable-inline]),
+[ if test "$enableval" = "no" ; then
+ AC_MSG_NOTICE([Disabling compiler optimizations (-O flag)])
+ CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
+ CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[[0-9]]*//'`"
+ SquidInline="no"
+ fi
+])
+
AC_ARG_ENABLE(inline,
- [ --disable-inline Don't compile trivial methods as inline. Squid
- is coded with much of the code able to be inlined.< Inlining is good for production builds, but not
- good for development. During development, use
- --disable-inline to reduce compilation times and
- allow incremental builds to be quick. For
- production builds, or load tests, use
- --enable-inline to have squid make all trivial
- methods inlinable by the compiler.],
- [ if test "$enableval" = "no" ; then
- SquidInline="no"
- fi
- ])
+ AC_HELP_STRING([--disable-inline],
+ [Don't compile trivial methods as inline. Squid
+ is coded with much of the code able to be inlined.
+ Inlining is good for production builds, but not
+ good for development. During development, use
+ --disable-inline to reduce compilation times and
+ allow incremental builds to be quick. For
+ production builds, or load tests, use
+ --enable-inline to have squid make all trivial
+ methods inlinable by the compiler.]),
+[ if test "$enableval" = "no" ; then
+ SquidInline="no"
+ fi
+])
if test "$SquidInline" = "yes" ; then
- AC_DEFINE(_SQUID_INLINE_, inline, [Keyword used by squid for inlining methods])
- AC_DEFINE(_USE_INLINE_,, [Include inline methods into header file])
+ AC_DEFINE(_SQUID_INLINE_, inline, [Keyword used by squid for inlining methods])
+ AC_DEFINE(_USE_INLINE_,, [Include inline methods into header file])
else
- AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods])
+ AC_MSG_NOTICE([Inlining optimization disabled])
+ AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods])
fi
+
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
diff -u -r -N squid-3.0.STABLE12/lib/libTrie/include/Trie.h squid-3.0.STABLE13/lib/libTrie/include/Trie.h
--- squid-3.0.STABLE12/lib/libTrie/include/Trie.h 2009-01-21 14:59:07.000000000 +1300
+++ squid-3.0.STABLE13/lib/libTrie/include/Trie.h 2009-02-03 14:36:20.000000000 +1300
@@ -82,8 +82,7 @@
* present or cannot be added.
*/
- bool add
- (char const *, size_t, void *);
+ bool add(char const *, size_t, void *);
private:
TrieNode *head;
diff -u -r -N squid-3.0.STABLE12/lib/libTrie/src/Trie.cc squid-3.0.STABLE13/lib/libTrie/src/Trie.cc
--- squid-3.0.STABLE12/lib/libTrie/src/Trie.cc 2009-01-21 14:59:07.000000000 +1300
+++ squid-3.0.STABLE13/lib/libTrie/src/Trie.cc 2009-02-03 14:36:21.000000000 +1300
@@ -24,6 +24,10 @@
#include "TrieNode.h"
#include "TrieCharTransform.h"
+#ifndef _USE_INLINE_
+#include "Trie.cci"
+#endif
+
Trie::Trie (TrieCharTransform *aTransform) : head (0) , transform (aTransform)
{}
@@ -76,7 +80,3 @@
return ((Trie *)aTrie)->add
(aString, theLength, privatedata);
}
-
-#ifndef _USE_INLINE_
-#include "Trie.cci"
-#endif
diff -u -r -N squid-3.0.STABLE12/RELEASENOTES.html squid-3.0.STABLE13/RELEASENOTES.html
--- squid-3.0.STABLE12/RELEASENOTES.html 2009-01-21 15:00:19.000000000 +1300
+++ squid-3.0.STABLE13/RELEASENOTES.html 2009-02-03 14:37:18.000000000 +1300
@@ -1,11 +1,11 @@
-
- Squid 3.0.STABLE12 release notes
+
+ Squid 3.0.STABLE13 release notes
-Squid 3.0.STABLE12 release notes
+Squid 3.0.STABLE13 release notes
Squid Developers
@@ -15,7 +15,7 @@
-The Squid Team are pleased to announce the release of Squid-3.0.STABLE12.
+The Squid Team are pleased to announce the release of Squid-3.0.STABLE13.
This new release is available for download from
http://www.squid-cache.org/Versions/v3/3.0/ or the
mirrors.
diff -u -r -N squid-3.0.STABLE12/src/cache_cf.cc squid-3.0.STABLE13/src/cache_cf.cc
--- squid-3.0.STABLE12/src/cache_cf.cc 2009-01-21 14:59:09.000000000 +1300
+++ squid-3.0.STABLE13/src/cache_cf.cc 2009-02-03 14:36:22.000000000 +1300
@@ -3362,6 +3362,7 @@
while (*definitions) {
logformat *format = *definitions;
*definitions = format->next;
+ safe_free(format->name);
accessLogFreeLogFormat(&format->format);
xfree(format);
}
diff -u -r -N squid-3.0.STABLE12/src/cf.data.pre squid-3.0.STABLE13/src/cf.data.pre
--- squid-3.0.STABLE12/src/cf.data.pre 2009-01-21 14:59:09.000000000 +1300
+++ squid-3.0.STABLE13/src/cf.data.pre 2009-02-03 14:36:22.000000000 +1300
@@ -3215,7 +3215,7 @@
By default, Squid will immediately close client connections when
read(2) returns "no more data to read."
- Change this option to 'off' and Squid will keep open connections
+ Change this option to 'on' and Squid will keep open connections
until a read(2) or write(2) on the socket returns an error.
This may show some benefits for reverse proxies. But if not
it is recommended to leave OFF.
diff -u -r -N squid-3.0.STABLE12/src/HttpMsg.cc squid-3.0.STABLE13/src/HttpMsg.cc
--- squid-3.0.STABLE12/src/HttpMsg.cc 2009-01-21 14:59:08.000000000 +1300
+++ squid-3.0.STABLE13/src/HttpMsg.cc 2009-02-03 14:36:21.000000000 +1300
@@ -463,7 +463,7 @@
{
int i = 0;
int retcode = 0;
- int maj = -1, min = -1;
+ unsigned int maj = 0, min = 0;
int last_whitespace = -1, line_end = -1;
debugs(74, 5, "httpParserParseReqLine: parsing " << hmsg->buf);
@@ -568,10 +568,14 @@
/* next should be 1 or more digits */
maj = 0;
- for (; i < hmsg->req_end && (isdigit(hmsg->buf[i])); i++) {
+ for (; i < hmsg->req_end && (isdigit(hmsg->buf[i])) && maj < 65536; i++) {
maj = maj * 10;
maj = maj + (hmsg->buf[i]) - '0';
}
+ if (maj >= 65536) {
+ retcode = -1;
+ goto finish;
+ }
if (i >= hmsg->req_end) {
retcode = 0;
goto finish;
@@ -590,10 +594,14 @@
/* next should be one or more digits */
i++;
min = 0;
- for (; i < hmsg->req_end && (isdigit(hmsg->buf[i])); i++) {
+ for (; i < hmsg->req_end && (isdigit(hmsg->buf[i])) && min < 65536; i++) {
min = min * 10;
min = min + (hmsg->buf[i]) - '0';
}
+ if (min >= 65536) {
+ retcode = -1;
+ goto finish;
+ }
/* Find whitespace, end of version */
hmsg->v_end = i;
@@ -605,8 +613,6 @@
* Rightio - we have all the schtuff. Return true; we've got enough.
*/
retcode = 1;
- assert(maj != -1);
- assert(min != -1);
finish:
hmsg->v_maj = maj;
diff -u -r -N squid-3.0.STABLE12/src/Makefile.am squid-3.0.STABLE13/src/Makefile.am
--- squid-3.0.STABLE12/src/Makefile.am 2009-01-21 14:59:08.000000000 +1300
+++ squid-3.0.STABLE13/src/Makefile.am 2009-02-03 14:36:22.000000000 +1300
@@ -887,7 +887,6 @@
ufsdump_LDADD = \
libsquid.la \
libauth.la \
- -L../lib \
@XTRA_OBJS@ \
@REPL_OBJS@ \
@STORE_OBJS@ \
@@ -897,7 +896,7 @@
@SNMPLIB@ \
@ICAP_LIBS@ \
@SSLLIB@ \
- -lmiscutil \
+ -L$(top_builddir)/lib -lmiscutil \
@XTRA_LIBS@ \
@EPOLL_LIBS@ \
@MINGW_LIBS@
diff -u -r -N squid-3.0.STABLE12/src/Makefile.in squid-3.0.STABLE13/src/Makefile.in
--- squid-3.0.STABLE12/src/Makefile.in 2009-01-21 14:59:08.000000000 +1300
+++ squid-3.0.STABLE13/src/Makefile.in 2009-02-03 14:36:22.000000000 +1300
@@ -2530,7 +2530,6 @@
ufsdump_LDADD = \
libsquid.la \
libauth.la \
- -L../lib \
@XTRA_OBJS@ \
@REPL_OBJS@ \
@STORE_OBJS@ \
@@ -2540,7 +2539,7 @@
@SNMPLIB@ \
@ICAP_LIBS@ \
@SSLLIB@ \
- -lmiscutil \
+ -L$(top_builddir)/lib -lmiscutil \
@XTRA_LIBS@ \
@EPOLL_LIBS@ \
@MINGW_LIBS@