Amos Jeffries [Mon, 23 Feb 2009 11:05:52 +0000 (00:05 +1300)]
Author: frencesco chemolli <kinkie@squid-cache.org>
testBed: add parallel make capability to build testing
This small patch to the test-suite system allows for parallel-make in
the test-suite (only on Linux). This will allow for shorter build-test
times on multicpu/multicore systems.
Amos Jeffries [Mon, 23 Feb 2009 09:41:36 +0000 (22:41 +1300)]
Author: Mark Nottingham <mnot@pobox.com>
Bug 2599: Idempotent start
As discussed on squid-dev, Squid shouldn't return a shell error when:
- starting squid, if it's already running
- stopping squid, if it isn't running
This is to make writing scripts that control squid easier.
Note that it should still notify the user, and should not affect other
operations (e.g., kill, rotate, parse).
Alex Rousskov [Thu, 19 Feb 2009 20:28:48 +0000 (13:28 -0700)]
Fixed default -I options: there are no headers in $(top_builddir)/lib/ but
there is autoconf.h in $(top_builddir)/include/
Fixed hard-coded OBJS dependencies: autoconf.h is in $(top_builddir)/include/
The bug apparently did not bother anyobody too much, adding to my suspicion
that we do not really need these hard-coded OBJS dependencies.
Alex Rousskov [Thu, 19 Feb 2009 19:00:01 +0000 (12:00 -0700)]
SourceLayout: src/base, take 0 with tweaks
Added src/base directory for fundamental, commonly-used code pieces that are
not large enough to warrant their own directories. Currently base/ contains
the beginning of AsyncCalls hierarchy, which may eventually get its own
directory.
Removed src/ip from the top-level SUBDIRS list. Made cf_gen compile without
libip.
Started building makefile includes, to be used in subdir makefiles:
src/Common.am and src/TestHeaders.am.
Alex Rousskov [Thu, 19 Feb 2009 18:19:37 +0000 (11:19 -0700)]
Moved header testing from Common.am to TestHeaders.am. Not all makefiles
using Common.am will use a standardized header test, at least for now.
We have makefiles that test headers in subdirectories, for example.
Alex Rousskov [Thu, 19 Feb 2009 07:16:14 +0000 (00:16 -0700)]
Added src/base directory for fundamental, commonly-used code pieces that are
not large enough to warrant their own directories. Currently base/ contains
the beginning of AsyncCalls hierarchy, which may eventually get its own
directory.
Reduced cf_gen dependencies so that it can be built before subdirectories,
as, apparently, required by BUILT_SOURCES.
Moved some libraries that are used by virtually all executables to COMMON_LIBS.
The list will probably grow as we try to reduce the insane complexity of the
current Makefile.am.
Alex Rousskov [Thu, 19 Feb 2009 07:15:47 +0000 (00:15 -0700)]
Added src/base directory for fundamental, commonly-used code pieces that are
not large enough to warrant their own directories. Currently base/ contains
the beginning of AsyncCalls hierarchy, which may eventually get its own
directory.
Alex Rousskov [Thu, 19 Feb 2009 07:14:08 +0000 (00:14 -0700)]
Copied common Makefile.am stuff seen in a few Makefile.ams to a single
Makefile "header". This avoids evil code duplication. This file should be
included by most Makefile.ams inside src/. Needs more work as some of the
copied code is questionable and more code can probably be extracted here. See
XXXs.
TODO: The .h dependency test script part seems pretty universal, but if
many subdirs need to customize it, we may want to put it into a separate
Makefile "header".
Alex Rousskov [Thu, 19 Feb 2009 07:11:38 +0000 (00:11 -0700)]
Removed src/ip from the top-level SUBDIRS list. That directory is not
a top-level subdirectory and it is already listed in src/Makefile.am.
The commit message introducing the change talked about libip being a "POD
library". I do not know what that is, but, hopefully, we do not really need to
make this kind of exceptions for any src/ libraries.
Amos Jeffries [Wed, 18 Feb 2009 10:58:53 +0000 (23:58 +1300)]
Author: Francesco Chemolli <kinkie@squid-cache.org>
String NG : basic SquidString updates pt 2
- finished the analysis of raw buffer exporting, divided among c-sting
and raw-buf access clients
- general sanitization
- reversal of some wrongly-renamed variables and comments
- implementation of SQUIDSTRINGPRINT and SQUIDSTRINGPH (placeholder) macros and
psize() function for printf-style calls
- implementation of, and migration to, String::size_type and String::npos
- de-inlining of pos(), rpos(), find() and rfind() calls
- implementation and use of a proper substr() call
Amos Jeffries [Wed, 18 Feb 2009 09:45:46 +0000 (22:45 +1300)]
SourceLayout: setup libcompat.la for portability primitives
This library forms an underlayer which intends to be seamless for the rest
of Squid.
For code to be eligible for inclusion at this lowest layer it must be
emulating or wrapping a piece of OS-provided API for use on other OS
where it is not provided.
Shared code which is unique to Squid is not portability.
API mappings which are OS-specific are all defined for their particular
OS in the os/* files.
API mappings which are provided by multiple OS or support libraries
are mapped in compat/*
Emulators are acceptable, though the aim should be to inline or template
most of the code so only .h are really needed.
Fixed typo in DelayTaggedBucket::stats.
Added comments.
String.cci doesn't need to include squid.h, config.h is enough
In errorpage.cc there is no need to drop to char* land, we can work with String.
An access checklist required for each service set, so we need only one
AccessRule object for each adaptation service set
This patch:
- When parses a adaptation_access line checks if an AccessRule object exist
for the service set and if yes append the access checklist to this object else
creates a new AccessRule object for this service set
- The AccessRule constructor takes as argument now the reference service set
name (groupId)
- The new Adaptation::FindRuleByGroupId method created. This method returns
the AccessRule object for a service set using its name (groupId)
Implemented String.psize() (for printf())
Changed String storage size from 'unsigned short int' to size_t
Implemented String.rfind()
Implemented String.substr() and related tests
Made String.set() private, it's ready to be removed unless there's any dissent
Converted ftp.cc to use rfind in place of rpos
Amos Jeffries [Mon, 9 Feb 2009 05:33:18 +0000 (18:33 +1300)]
Bug 419: Hop by Hop headers MUST NOT be forwarded (attempt 2)
This attempt builds on Henriks re-work of the client-request to
server-request cloning done since the last attempt was made at closing
this bug.
Adds all RFC 2616 listed Hop-by-hop headers to the clone selection test
as 'ignore' cases unless otherwise handled already.
The test for whether they exist in Connection: is moved to the default
case as an inline. Which reduces the code a fair bit and prevents the
side case where a specially handled header gets ignored because the
client explicitly added it to Connection: when it did not have to.
This method sets up a background default of not passing the hop-by-hop
headers while allowing any code which explicitly sets or copies the
headers across to operate as before without interference.
Amos Jeffries [Sun, 8 Feb 2009 03:26:04 +0000 (16:26 +1300)]
TestBed: add slave tester script
This is draft #2 of the multi-machine script. I have it running locally.
As an intermediary step to kick wider testing until we get something
better going. This script can be run by cron and sends an email to
noc@squid-cache.org detailing the local system OS, CPU, and build results.
Requires:
sendmail or mailer providing sendmail API
bzr with checkout of (trunk, SQUID_3_1, or SQUID_3_0)
Amos Jeffries [Sun, 8 Feb 2009 00:02:47 +0000 (13:02 +1300)]
Author: Francesco Chemolli <kinkie@squid-cache.org>
Cleanups: Remove code handling K&R-style varargs.
It should be a safe enough bet that any C++ compiler can handle STDC-style varargs.
This patch removes all the (mostly spaghetti) code which used to handle K&R-style varargs calls.
Amos Jeffries [Fri, 6 Feb 2009 07:54:05 +0000 (20:54 +1300)]
Author: Francesco Chemolli <kinkie@squid-cache.org>
String NG : fixes initial merge, take 2
Compared to the retired first attempt it:
- fixes the issues Tsantilas Christos found out about
- implements String::find
- some more users analyzed and fixed.