r2568 - in branches/1.1: . bin bin/varnishadm bin/varnishd bin/varnishhist bin/varnishlog bin/varnishncsa bin/varnishreplay bin/varnishstat bin/varnishtop include lib/libvarnish lib/libvarnishapi lib/libvarnishcompat lib/libvcl

des at projects.linpro.no des at projects.linpro.no
Sat Mar 8 15:12:52 CET 2008


Author: des
Date: 2008-03-08 15:12:52 +0100 (Sat, 08 Mar 2008)
New Revision: 2568

Modified:
   branches/1.1/
   branches/1.1/autogen.des
   branches/1.1/bin/Makefile.am
   branches/1.1/bin/varnishadm/Makefile.am
   branches/1.1/bin/varnishadm/varnishadm.c
   branches/1.1/bin/varnishd/Makefile.am
   branches/1.1/bin/varnishd/cache_acceptor.c
   branches/1.1/bin/varnishd/cache_acceptor_epoll.c
   branches/1.1/bin/varnishd/cache_acceptor_kqueue.c
   branches/1.1/bin/varnishd/cache_acceptor_poll.c
   branches/1.1/bin/varnishd/cache_backend.c
   branches/1.1/bin/varnishd/cache_ban.c
   branches/1.1/bin/varnishd/cache_center.c
   branches/1.1/bin/varnishd/cache_cli.c
   branches/1.1/bin/varnishd/cache_expire.c
   branches/1.1/bin/varnishd/cache_fetch.c
   branches/1.1/bin/varnishd/cache_hash.c
   branches/1.1/bin/varnishd/cache_http.c
   branches/1.1/bin/varnishd/cache_main.c
   branches/1.1/bin/varnishd/cache_pipe.c
   branches/1.1/bin/varnishd/cache_pool.c
   branches/1.1/bin/varnishd/cache_response.c
   branches/1.1/bin/varnishd/cache_session.c
   branches/1.1/bin/varnishd/cache_synthetic.c
   branches/1.1/bin/varnishd/cache_vary.c
   branches/1.1/bin/varnishd/cache_vcl.c
   branches/1.1/bin/varnishd/cache_vrt.c
   branches/1.1/bin/varnishd/cache_vrt_acl.c
   branches/1.1/bin/varnishd/cache_vrt_re.c
   branches/1.1/bin/varnishd/cache_ws.c
   branches/1.1/bin/varnishd/hash_classic.c
   branches/1.1/bin/varnishd/hash_simple_list.c
   branches/1.1/bin/varnishd/mgt_child.c
   branches/1.1/bin/varnishd/mgt_cli.c
   branches/1.1/bin/varnishd/mgt_event.c
   branches/1.1/bin/varnishd/mgt_param.c
   branches/1.1/bin/varnishd/mgt_vcc.c
   branches/1.1/bin/varnishd/rfc2616.c
   branches/1.1/bin/varnishd/shmlog.c
   branches/1.1/bin/varnishd/stevedore.c
   branches/1.1/bin/varnishd/storage_file.c
   branches/1.1/bin/varnishd/storage_malloc.c
   branches/1.1/bin/varnishd/tcp.c
   branches/1.1/bin/varnishd/varnishd.1
   branches/1.1/bin/varnishd/varnishd.c
   branches/1.1/bin/varnishhist/Makefile.am
   branches/1.1/bin/varnishhist/varnishhist.c
   branches/1.1/bin/varnishlog/Makefile.am
   branches/1.1/bin/varnishlog/varnishlog.c
   branches/1.1/bin/varnishncsa/Makefile.am
   branches/1.1/bin/varnishncsa/varnishncsa.c
   branches/1.1/bin/varnishreplay/Makefile.am
   branches/1.1/bin/varnishreplay/varnishreplay.c
   branches/1.1/bin/varnishstat/Makefile.am
   branches/1.1/bin/varnishstat/varnishstat.c
   branches/1.1/bin/varnishtop/Makefile.am
   branches/1.1/bin/varnishtop/varnishtop.c
   branches/1.1/configure.ac
   branches/1.1/include/binary_heap.h
   branches/1.1/lib/libvarnish/Makefile.am
   branches/1.1/lib/libvarnish/argv.c
   branches/1.1/lib/libvarnish/assert.c
   branches/1.1/lib/libvarnish/binary_heap.c
   branches/1.1/lib/libvarnish/cli.c
   branches/1.1/lib/libvarnish/cli_common.c
   branches/1.1/lib/libvarnish/crc32.c
   branches/1.1/lib/libvarnish/flopen.c
   branches/1.1/lib/libvarnish/time.c
   branches/1.1/lib/libvarnish/version.c
   branches/1.1/lib/libvarnish/vpf.c
   branches/1.1/lib/libvarnish/vsb.c
   branches/1.1/lib/libvarnish/vss.c
   branches/1.1/lib/libvarnishapi/Makefile.am
   branches/1.1/lib/libvarnishapi/base64.c
   branches/1.1/lib/libvarnishapi/instance.c
   branches/1.1/lib/libvarnishapi/shmlog.c
   branches/1.1/lib/libvarnishcompat/Makefile.am
   branches/1.1/lib/libvarnishcompat/asprintf.c
   branches/1.1/lib/libvarnishcompat/daemon.c
   branches/1.1/lib/libvarnishcompat/setproctitle.c
   branches/1.1/lib/libvarnishcompat/srandomdev.c
   branches/1.1/lib/libvarnishcompat/strlcat.c
   branches/1.1/lib/libvarnishcompat/strlcpy.c
   branches/1.1/lib/libvarnishcompat/strndup.c
   branches/1.1/lib/libvarnishcompat/vasprintf.c
   branches/1.1/lib/libvarnishcompat/vis.c
   branches/1.1/lib/libvcl/Makefile.am
   branches/1.1/lib/libvcl/vcc_acl.c
   branches/1.1/lib/libvcl/vcc_action.c
   branches/1.1/lib/libvcl/vcc_backend.c
   branches/1.1/lib/libvcl/vcc_compile.c
   branches/1.1/lib/libvcl/vcc_fixed_token.c
   branches/1.1/lib/libvcl/vcc_gen_fixed_token.tcl
   branches/1.1/lib/libvcl/vcc_gen_obj.tcl
   branches/1.1/lib/libvcl/vcc_obj.c
   branches/1.1/lib/libvcl/vcc_parse.c
   branches/1.1/lib/libvcl/vcc_string.c
   branches/1.1/lib/libvcl/vcc_token.c
   branches/1.1/lib/libvcl/vcc_var.c
   branches/1.1/lib/libvcl/vcc_xref.c
Log:
Merged revisions 2323,2325-2327,2337,2358,2362-2364,2366,2374,2376-2378,2380-2382,2384-2386,2404,2426,2432-2434,2453-2456,2458-2461,2467,2495-2499,2503-2505,2522-2524,2545,2563-2565 via svnmerge from 
svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache

........
  r2337 | phk | 2008-01-08 15:35:09 +0100 (Tue, 08 Jan 2008) | 4 lines
  
  Don't even look for senfile, it doesn't work for what we need on
  any of the platforms right now.
........
  r2382 | des | 2008-01-23 21:23:20 +0100 (Wed, 23 Jan 2008) | 13 lines
  
  Improve readability, such as it is.
  
  Allow the user to disable specific acceptor mechanisms (e.g. do not
  use epoll even though it is available).
  
  Don't look for kqueue on systems where we know it doesn't work.
  
  Bail if no acceptor mechanism was found.
  
  Bail if no curses or ncurses was found.
  
  Warn the user if SO_{RCV,SND}TIMEO are non-functional.
........
  r2404 | phk | 2008-01-30 11:02:19 +0100 (Wed, 30 Jan 2008) | 4 lines
  
  Make sure we get the right assert() macro.
  
  Constification.
........
  r2453 | des | 2008-02-13 14:05:36 +0100 (Wed, 13 Feb 2008) | 4 lines
  
  Some source files (especially in libraries) have embedded test
  programs.  Add a configure option and a corresponding automake
  conditional to enable these tests.
........
  r2454 | des | 2008-02-13 14:29:40 +0100 (Wed, 13 Feb 2008) | 2 lines
  
  Rewrite str2bytes, add unit test
........
  r2455 | des | 2008-02-13 14:55:39 +0100 (Wed, 13 Feb 2008) | 2 lines
  
  Use #include "config.h" instead of -include config.h
........
  r2456 | des | 2008-02-13 15:58:48 +0100 (Wed, 13 Feb 2008) | 2 lines
  
  Disable tools that require curses if no curses library was found.
........
  r2458 | des | 2008-02-13 18:12:59 +0100 (Wed, 13 Feb 2008) | 2 lines
  
  Enable tests + allow overrides from command line.
........
  r2459 | des | 2008-02-13 18:19:52 +0100 (Wed, 13 Feb 2008) | 2 lines
  
  Never mind trying to avoid libm, we already use it anyway.
........
  r2460 | des | 2008-02-13 18:25:52 +0100 (Wed, 13 Feb 2008) | 2 lines
  
  Forgot config.h here
........
  r2461 | des | 2008-02-13 18:25:57 +0100 (Wed, 13 Feb 2008) | 2 lines
  
  Regenerate
........
  r2467 | phk | 2008-02-15 11:01:19 +0100 (Fri, 15 Feb 2008) | 2 lines
  
  remove the undocumented and unimplemented dump.pool command
........
  r2565 | des | 2008-03-08 14:47:56 +0100 (Sat, 08 Mar 2008) | 2 lines
  
  dump.pool was removed a while ago.
........



Property changes on: branches/1.1
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2091,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2304-2327,2357-2359,2361-2364,2366,2374-2381,2383-2386,2414-2415,2421-2422,2426,2432-2434,2444-2445,2447,2457,2492-2494,2500-2502,2520-2521
   + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2091,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2304-2327,2337,2357-2359,2361-2364,2366,2374-2386,2404,2414-2415,2421-2422,2426,2432-2434,2444-2445,2447,2453-2461,2467,2492-2505,2520-2524,2545,2563-2565

Modified: branches/1.1/autogen.des
===================================================================
--- branches/1.1/autogen.des	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/autogen.des	2008-03-08 14:12:52 UTC (rev 2568)
@@ -18,6 +18,8 @@
     --enable-diagnostics \
     --enable-extra-developer-warnings \
     --enable-stack-protector \
+    --enable-tests \
     --enable-werror \
     --prefix=/opt/varnish \
-    --mandir=/opt/varnish/man
+    --mandir=/opt/varnish/man \
+    "$@"

Modified: branches/1.1/bin/Makefile.am
===================================================================
--- branches/1.1/bin/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -1,4 +1,7 @@
 # $Id$
 
-SUBDIRS = varnishadm varnishd varnishhist varnishlog varnishncsa \
-	varnishreplay varnishstat varnishtop
+SUBDIRS = varnishadm varnishd varnishlog varnishncsa varnishreplay
+
+if HAVE_CURSES
+SUBDIRS += varnishhist varnishstat varnishtop
+endif

Modified: branches/1.1/bin/varnishadm/Makefile.am
===================================================================
--- branches/1.1/bin/varnishadm/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishadm/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -8,8 +8,6 @@
 
 varnishadm_SOURCES = \
 	varnishadm.c
-	
-varnishadm_CFLAGS = -include config.h
 
 varnishadm_LDADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \

Modified: branches/1.1/bin/varnishadm/varnishadm.c
===================================================================
--- branches/1.1/bin/varnishadm/varnishadm.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishadm/varnishadm.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>

Modified: branches/1.1/bin/varnishd/Makefile.am
===================================================================
--- branches/1.1/bin/varnishd/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -60,7 +60,7 @@
 	steps.h \
 	stevedore.h
 
-varnishd_CFLAGS = -include config.h \
+varnishd_CFLAGS = \
         -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"'
 
 varnishd_LDFLAGS = -export-dynamic

Modified: branches/1.1/bin/varnishd/cache_acceptor.c
===================================================================
--- branches/1.1/bin/varnishd/cache_acceptor.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_acceptor.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -33,6 +33,8 @@
  * write the session pointer to a pipe which the event engine monitors.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <errno.h>
 #include <poll.h>

Modified: branches/1.1/bin/varnishd/cache_acceptor_epoll.c
===================================================================
--- branches/1.1/bin/varnishd/cache_acceptor_epoll.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_acceptor_epoll.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * write the session pointer to a pipe which the event engine monitors.
  */
 
+#include "config.h"
+
 #if defined(HAVE_EPOLL_CTL)
 
 #include <stdio.h>

Modified: branches/1.1/bin/varnishd/cache_acceptor_kqueue.c
===================================================================
--- branches/1.1/bin/varnishd/cache_acceptor_kqueue.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_acceptor_kqueue.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -33,6 +33,8 @@
  * write the session pointer to a pipe which the event engine monitors.
  */
 
+#include "config.h"
+
 #if defined(HAVE_KQUEUE)
 
 #include <stdio.h>

Modified: branches/1.1/bin/varnishd/cache_acceptor_poll.c
===================================================================
--- branches/1.1/bin/varnishd/cache_acceptor_poll.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_acceptor_poll.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -33,6 +33,8 @@
  * write the session pointer to a pipe which the event engine monitors.
  */
 
+#include "config.h"
+
 #if defined(HAVE_POLL)
 
 #include <stdio.h>

Modified: branches/1.1/bin/varnishd/cache_backend.c
===================================================================
--- branches/1.1/bin/varnishd/cache_backend.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_backend.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -35,19 +35,21 @@
  * XXX: drops to zero we should zap them.
  */
 
-#include <sys/types.h>
+#include "config.h"
+
+#include <sys/ioctl.h>
+#include <sys/select.h>
 #include <sys/socket.h>
 
-#include <netdb.h>
-#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <poll.h>
-#include <sys/select.h>
-#include <sys/ioctl.h>
 
+#include <netinet/in.h>
+#include <netdb.h>
+
 #include "heritage.h"
 #include "shmlog.h"
 #include "cache.h"

Modified: branches/1.1/bin/varnishd/cache_ban.c
===================================================================
--- branches/1.1/bin/varnishd/cache_ban.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_ban.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * Ban processing
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 
 #include <stdlib.h>

Modified: branches/1.1/bin/varnishd/cache_center.c
===================================================================
--- branches/1.1/bin/varnishd/cache_center.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_center.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -56,6 +56,8 @@
 DOT start -> recv [style=bold,color=green,weight=4]
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <errno.h>
 #include <math.h>

Modified: branches/1.1/bin/varnishd/cache_cli.c
===================================================================
--- branches/1.1/bin/varnishd/cache_cli.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_cli.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -72,10 +74,6 @@
 	{ CLI_VCL_DISCARD,	cli_func_config_discard },
 	{ CLI_VCL_USE,		cli_func_config_use },
 
-	/* Undocumented */
-	{ "dump.pool", "dump.pool",
-	    "\tDump the worker thread pool state\n",
-	    0, 0, cli_func_dump_pool },
 	{ NULL }
 };
 

Modified: branches/1.1/bin/varnishd/cache_expire.c
===================================================================
--- branches/1.1/bin/varnishd/cache_expire.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_expire.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -38,6 +38,8 @@
  * XXX: are ready.
  */
 
+#include "config.h"
+
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>

Modified: branches/1.1/bin/varnishd/cache_fetch.c
===================================================================
--- branches/1.1/bin/varnishd/cache_fetch.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_fetch.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <ctype.h>
 #include <inttypes.h>

Modified: branches/1.1/bin/varnishd/cache_hash.c
===================================================================
--- branches/1.1/bin/varnishd/cache_hash.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_hash.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -52,6 +52,8 @@
  * not busy only once.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

Modified: branches/1.1/bin/varnishd/cache_http.c
===================================================================
--- branches/1.1/bin/varnishd/cache_http.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_http.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * HTTP request storage and manipulation
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <errno.h>
 #include <unistd.h>

Modified: branches/1.1/bin/varnishd/cache_main.c
===================================================================
--- branches/1.1/bin/varnishd/cache_main.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_main.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>

Modified: branches/1.1/bin/varnishd/cache_pipe.c
===================================================================
--- branches/1.1/bin/varnishd/cache_pipe.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_pipe.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * XXX: charge bytes to srcaddr
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>

Modified: branches/1.1/bin/varnishd/cache_pool.c
===================================================================
--- branches/1.1/bin/varnishd/cache_pool.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_pool.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * XXX: automatic thread-pool size adaptation.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/uio.h>
 
@@ -432,14 +434,3 @@
 	AZ(pthread_create(&tp, NULL, wrk_reaperthread, NULL));
 	AZ(pthread_detach(tp));
 }
-
-/*--------------------------------------------------------------------*/
-
-void
-cli_func_dump_pool(struct cli *cli, char **av, void *priv)
-{
-
-	(void)cli;
-	(void)av;
-	(void)priv;
-}

Modified: branches/1.1/bin/varnishd/cache_response.c
===================================================================
--- branches/1.1/bin/varnishd/cache_response.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_response.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/time.h>
 

Modified: branches/1.1/bin/varnishd/cache_session.c
===================================================================
--- branches/1.1/bin/varnishd/cache_session.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_session.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -48,6 +48,8 @@
  * XXX: we still have to do the source-addr lookup.
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>

Modified: branches/1.1/bin/varnishd/cache_synthetic.c
===================================================================
--- branches/1.1/bin/varnishd/cache_synthetic.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_synthetic.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -28,6 +28,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/time.h>
 

Modified: branches/1.1/bin/varnishd/cache_vary.c
===================================================================
--- branches/1.1/bin/varnishd/cache_vary.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_vary.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -54,6 +54,8 @@
  *      '\0'
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>

Modified: branches/1.1/bin/varnishd/cache_vcl.c
===================================================================
--- branches/1.1/bin/varnishd/cache_vcl.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_vcl.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -33,6 +33,8 @@
  * The interface *from* the compiled VCL code is in cache_vrt.c.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>

Modified: branches/1.1/bin/varnishd/cache_vrt.c
===================================================================
--- branches/1.1/bin/varnishd/cache_vrt.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_vrt.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * Runtime support for compiled VCL programs
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/socket.h>
 

Modified: branches/1.1/bin/varnishd/cache_vrt_acl.c
===================================================================
--- branches/1.1/bin/varnishd/cache_vrt_acl.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_vrt_acl.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -34,6 +34,8 @@
  * XXX: a refresh facility.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 
 #include <stdio.h>

Modified: branches/1.1/bin/varnishd/cache_vrt_re.c
===================================================================
--- branches/1.1/bin/varnishd/cache_vrt_re.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_vrt_re.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * Runtime support for compiled VCL programs, regexps
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 
 #include <stdio.h>

Modified: branches/1.1/bin/varnishd/cache_ws.c
===================================================================
--- branches/1.1/bin/varnishd/cache_ws.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/cache_ws.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -30,6 +30,8 @@
  *
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/uio.h>
 

Modified: branches/1.1/bin/varnishd/hash_classic.c
===================================================================
--- branches/1.1/bin/varnishd/hash_classic.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/hash_classic.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * A classic bucketed hash
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

Modified: branches/1.1/bin/varnishd/hash_simple_list.c
===================================================================
--- branches/1.1/bin/varnishd/hash_simple_list.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/hash_simple_list.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * This is the reference hash(/lookup) implementation
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 
 #include <stdio.h>

Modified: branches/1.1/bin/varnishd/mgt_child.c
===================================================================
--- branches/1.1/bin/varnishd/mgt_child.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/mgt_child.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * The mechanics of handling the child process
  */
 
+#include "config.h"
+
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>

Modified: branches/1.1/bin/varnishd/mgt_cli.c
===================================================================
--- branches/1.1/bin/varnishd/mgt_cli.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/mgt_cli.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * The management process' CLI handling
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 
 #include <stdarg.h>

Modified: branches/1.1/bin/varnishd/mgt_event.c
===================================================================
--- branches/1.1/bin/varnishd/mgt_event.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/mgt_event.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <errno.h>
 #include <poll.h>

Modified: branches/1.1/bin/varnishd/mgt_param.c
===================================================================
--- branches/1.1/bin/varnishd/mgt_param.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/mgt_param.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 

Modified: branches/1.1/bin/varnishd/mgt_vcc.c
===================================================================
--- branches/1.1/bin/varnishd/mgt_vcc.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/mgt_vcc.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * VCL compiler stuff
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 
 #include <dlfcn.h>

Modified: branches/1.1/bin/varnishd/rfc2616.c
===================================================================
--- branches/1.1/bin/varnishd/rfc2616.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/rfc2616.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 
 #include <stdio.h>

Modified: branches/1.1/bin/varnishd/shmlog.c
===================================================================
--- branches/1.1/bin/varnishd/shmlog.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/shmlog.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>

Modified: branches/1.1/bin/varnishd/stevedore.c
===================================================================
--- branches/1.1/bin/varnishd/stevedore.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/stevedore.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -28,6 +28,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include "cache.h"
 
 struct storage *

Modified: branches/1.1/bin/varnishd/storage_file.c
===================================================================
--- branches/1.1/bin/varnishd/storage_file.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/storage_file.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * Storage method based on mmap'ed file
  */
 
+#include "config.h"
+
 #include <sys/param.h>
 #include <sys/mman.h>
 #include <sys/socket.h>

Modified: branches/1.1/bin/varnishd/storage_malloc.c
===================================================================
--- branches/1.1/bin/varnishd/storage_malloc.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/storage_malloc.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * Storage method based on malloc(3)
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 
 #include <stdlib.h>

Modified: branches/1.1/bin/varnishd/tcp.c
===================================================================
--- branches/1.1/bin/varnishd/tcp.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/tcp.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/socket.h>
 

Modified: branches/1.1/bin/varnishd/varnishd.1
===================================================================
--- branches/1.1/bin/varnishd/varnishd.1	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/varnishd.1	2008-03-08 14:12:52 UTC (rev 2568)
@@ -28,7 +28,7 @@
 .\"
 .\" $Id$
 .\"
-.Dd July 5, 2007
+.Dd March 8, 2008
 .Dt VARNISHD 1
 .Os
 .Sh NAME
@@ -287,7 +287,6 @@
 address and port.
 The following commands are available:
 .Bl -tag -width 4n
-.It Cm dump.pool
 .It Cm help
 Display a list of available commands.
 .It Cm param.set Ar param Ar value

Modified: branches/1.1/bin/varnishd/varnishd.c
===================================================================
--- branches/1.1/bin/varnishd/varnishd.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishd/varnishd.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * The management process and CLI handling
  */
 
+#include "config.h"
+
 #include <sys/stat.h>
 
 #include <ctype.h>

Modified: branches/1.1/bin/varnishhist/Makefile.am
===================================================================
--- branches/1.1/bin/varnishhist/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishhist/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -8,8 +8,6 @@
 
 varnishhist_SOURCES = varnishhist.c
 
-varnishhist_CFLAGS = -include config.h
-
 varnishhist_LDADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \
 	$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \

Modified: branches/1.1/bin/varnishhist/varnishhist.c
===================================================================
--- branches/1.1/bin/varnishhist/varnishhist.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishhist/varnishhist.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -32,6 +32,8 @@
  * Log tailer for Varnish
  */
 
+#include "config.h"
+
 #include <curses.h>
 #include <errno.h>
 #include <limits.h>

Modified: branches/1.1/bin/varnishlog/Makefile.am
===================================================================
--- branches/1.1/bin/varnishlog/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishlog/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -8,8 +8,6 @@
 
 varnishlog_SOURCES = varnishlog.c
 
-varnishlog_CFLAGS = -include config.h
-
 varnishlog_LDADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \
 	$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \

Modified: branches/1.1/bin/varnishlog/varnishlog.c
===================================================================
--- branches/1.1/bin/varnishlog/varnishlog.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishlog/varnishlog.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * Log tailer for Varnish
  */
 
+#include "config.h"
+
 #include <errno.h>
 #include <fcntl.h>
 #include <regex.h>

Modified: branches/1.1/bin/varnishncsa/Makefile.am
===================================================================
--- branches/1.1/bin/varnishncsa/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishncsa/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -8,8 +8,6 @@
 
 varnishncsa_SOURCES = varnishncsa.c
 
-varnishncsa_CFLAGS = -include config.h
-
 varnishncsa_LDADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \
 	$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \

Modified: branches/1.1/bin/varnishncsa/varnishncsa.c
===================================================================
--- branches/1.1/bin/varnishncsa/varnishncsa.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishncsa/varnishncsa.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -59,6 +59,8 @@
  *		- Maybe rotate/compress log
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <errno.h>
 #include <signal.h>

Modified: branches/1.1/bin/varnishreplay/Makefile.am
===================================================================
--- branches/1.1/bin/varnishreplay/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishreplay/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -8,8 +8,6 @@
 
 varnishreplay_SOURCES = \
 	varnishreplay.c
-	
-varnishreplay_CFLAGS = -include config.h
 
 varnishreplay_LDADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \

Modified: branches/1.1/bin/varnishreplay/varnishreplay.c
===================================================================
--- branches/1.1/bin/varnishreplay/varnishreplay.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishreplay/varnishreplay.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -28,6 +28,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>

Modified: branches/1.1/bin/varnishstat/Makefile.am
===================================================================
--- branches/1.1/bin/varnishstat/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishstat/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -8,8 +8,6 @@
 
 varnishstat_SOURCES = varnishstat.c
 
-varnishstat_CFLAGS = -include config.h
-
 varnishstat_LDADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \
 	$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \

Modified: branches/1.1/bin/varnishstat/varnishstat.c
===================================================================
--- branches/1.1/bin/varnishstat/varnishstat.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishstat/varnishstat.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -32,6 +32,8 @@
  * Log tailer for Varnish
  */
 
+#include "config.h"
+
 #include <sys/time.h>
 
 #include <curses.h>

Modified: branches/1.1/bin/varnishtop/Makefile.am
===================================================================
--- branches/1.1/bin/varnishtop/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishtop/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -8,8 +8,6 @@
 
 varnishtop_SOURCES = varnishtop.c
 
-varnishtop_CFLAGS = -include config.h
-
 varnishtop_LDADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \
 	$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \

Modified: branches/1.1/bin/varnishtop/varnishtop.c
===================================================================
--- branches/1.1/bin/varnishtop/varnishtop.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/bin/varnishtop/varnishtop.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -32,6 +32,8 @@
  * Log tailer for Varnish
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <curses.h>
 #include <errno.h>

Modified: branches/1.1/configure.ac
===================================================================
--- branches/1.1/configure.ac	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/configure.ac	2008-03-08 14:12:52 UTC (rev 2568)
@@ -38,10 +38,15 @@
 
 save_LIBS="${LIBS}"
 LIBS=""
-AC_SEARCH_LIBS(initscr, [curses ncurses])
+AC_SEARCH_LIBS(initscr, [curses ncurses],
+	[have_curses=yes], [have_curses=no])
 CURSES_LIBS="${LIBS}"
 LIBS="${save_LIBS}"
 AC_SUBST(CURSES_LIBS)
+if test "$have_curses" = no; then
+	AC_MSG_WARN([curses not found; some tools will not be built])
+fi
+AM_CONDITIONAL([HAVE_CURSES], [test x$have_curses = xyes])
 
 save_LIBS="${LIBS}"
 LIBS=""
@@ -93,15 +98,18 @@
 AC_CHECK_FUNCS([socket])
 AC_CHECK_FUNCS([strptime])
 
-# This one is tricky, there are multiple versions
-case $host in
-*-*-freebsd*|*-*-linux*)
-	AC_CHECK_FUNCS([sendfile])
- 	;;
-*)
-	AC_MSG_WARN([won't look for sendfile() on $host])
-	;;
-esac
+# Don't look for sendfile at all, none of them work
+# anyway. (don't tell when done with passed mem-range)
+#
+## This one is tricky, there are multiple versions
+#case $host in
+#*-*-freebsd*|*-*-linux*)
+#	AC_CHECK_FUNCS([sendfile])
+# 	;;
+#*)
+#	AC_MSG_WARN([won't look for sendfile() on $host])
+#	;;
+#esac
 
 # These functions are provided by libcompat on platforms where they
 # are not available
@@ -118,12 +126,71 @@
 AC_CHECK_FUNCS([clock_gettime])
 LIBS="${save_LIBS}"
 
-# Check which mechanism to use for the acceptor
-AC_CHECK_FUNCS([kqueue])
-AC_CHECK_FUNCS([epoll_ctl])
-AC_CHECK_FUNCS([poll])
+# Check which mechanism to use for the acceptor.  We look for kqueue
+# only on platforms on which we know that it works, because there are
+# platforms where a simple AC_CHECK_FUNCS([kqueue]) would succeed but
+# the build would fail.  We also allow the user to disable mechanisms
+# he doesn't want to use.
 
-# Solaris defines SO_{RCV,SND}TIMEO, but does not implement them
+# --enable-kqueue
+AC_ARG_ENABLE(kqueue,
+    AS_HELP_STRING([--enable-kqueue],
+	[use kqueue if available (default is YES)]),
+    ,
+    [enable_kqueue=yes])
+
+if test "$enable_kqueue" = yes; then
+	case $host in
+	*-*-freebsd*)
+		AC_CHECK_FUNCS([kqueue])
+		;;
+	*-*-bsd*)
+		# No other BSD has a sufficiently recent implementation
+		AC_MSG_WARN([won't look for kqueue() on $host])
+		ac_cv_func_kqueue=no
+		;;
+	esac
+else
+	ac_cv_func_kqueue=no
+fi
+
+# --enable-epoll
+AC_ARG_ENABLE(epoll,
+    AS_HELP_STRING([--enable-epoll],
+	[use epoll if available (default is YES)]),
+    ,
+    [enable_epoll=yes])
+
+if test "$enable_epoll" = yes; then
+	AC_CHECK_FUNCS([epoll_ctl])
+else
+	ac_cv_func_epoll_ctl=no
+fi
+
+# --enable-poll
+AC_ARG_ENABLE(poll,
+    AS_HELP_STRING([--enable-poll],
+	[use poll if available (default is YES)]),
+    ,
+    [enable_poll=yes])
+
+if test "$enable_poll" = yes; then
+	AC_CHECK_FUNCS([poll])
+else
+	ac_cv_func_poll=no
+fi
+
+if test "$ac_cv_func_kqueue" != yes &&
+   test "$ac_cv_func_epoll_ctl" != yes &&
+   test "$ac_cv_func_poll" != yes; then
+	AC_MSG_ERROR([no usable acceptor mechanism])
+fi
+
+# Solaris defines SO_{RCV,SND}TIMEO, but does not implement them.
+# Varnish will build and run without these, but connections will not
+# time out, which may leave Varnish vulnerable to denail-of-service
+# attacks which would not be possible on other platforms.
+
 AC_CACHE_CHECK([whether SO_RCVTIMEO works],
   [ac_cv_so_rcvtimeo_works],
   [AC_RUN_IFELSE(
@@ -162,6 +229,11 @@
    AC_DEFINE([SO_SNDTIMEO_WORKS], [1], [Define if SO_SNDTIMEO works])
 fi
 
+if test "$ac_cv_so_rcvtimeo_works" = no ||
+   test "$ac_cv_so_sndtimeo_works" = no; then
+	AC_MSG_WARN([connection timeouts will not work])
+fi
+
 # Run-time directory
 VARNISH_STATE_DIR='${localstatedir}/varnish'
 AC_SUBST(VARNISH_STATE_DIR)
@@ -175,21 +247,37 @@
 # Additional flags for GCC 4
 EXTRA_DEVELOPER_CFLAGS="-Wextra -Wno-missing-field-initializers -Wno-sign-compare"
 
+# --enable-developer-warnings
 AC_ARG_ENABLE(developer-warnings,
 	AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
 	CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}")
+
+# --enable-debugging-symbols
 AC_ARG_ENABLE(debugging-symbols,
 	AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
 	CFLAGS="${CFLAGS} -O0 -g -fno-inline")
+
+# --enable-diagnostics
 AC_ARG_ENABLE(diagnostics,
 	AS_HELP_STRING([--enable-diagnostics],[enable run-time diagnostics (default is NO)]),
 	CFLAGS="${CFLAGS} -DDIAGNOSTICS")
+
+# --enable-extra-developer-warnings
 AC_ARG_ENABLE(extra-developer-warnings,
 	AS_HELP_STRING([--enable-extra-developer-warnings],[enable even stricter warnings (default is NO)]),
 	CFLAGS="${CFLAGS} ${EXTRA_DEVELOPER_CFLAGS}")
+
+# --enable-stack-protector
 AC_ARG_ENABLE(stack-protector,
 	AS_HELP_STRING([--enable-stack-protector],[enable stack protector (default is NO)]),
 	CFLAGS="${CFLAGS} -fstack-protector-all")
+
+# --enable-tests
+AC_ARG_ENABLE(tests,
+	AS_HELP_STRING([--enable-tests],[build test programs (default is NO)]))
+AM_CONDITIONAL([ENABLE_TESTS], [test x$enable_tests = xyes])
+
+# --enable-werror
 AC_ARG_ENABLE(werror,
 	AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
 	CFLAGS="${CFLAGS} -Werror")

Modified: branches/1.1/include/binary_heap.h
===================================================================
--- branches/1.1/include/binary_heap.h	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/include/binary_heap.h	2008-03-08 14:12:52 UTC (rev 2568)
@@ -69,7 +69,7 @@
 	 * The root item has 'idx' zero
 	 */
 
-void *binheap_root(struct binheap *);
+void *binheap_root(const struct binheap *);
 	/*
 	 * Return the root item
 	 */

Modified: branches/1.1/lib/libvarnish/Makefile.am
===================================================================
--- branches/1.1/lib/libvarnish/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -18,6 +18,4 @@
 	vsb.c \
 	vss.c
 
-libvarnish_la_CFLAGS = -include config.h
-
-libvarnish_la_LIBADD = ${RT_LIBS}
+libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM}

Modified: branches/1.1/lib/libvarnish/argv.c
===================================================================
--- branches/1.1/lib/libvarnish/argv.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/argv.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -38,6 +38,8 @@
  *
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <stdlib.h>
 #include <stdio.h>

Modified: branches/1.1/lib/libvarnish/assert.c
===================================================================
--- branches/1.1/lib/libvarnish/assert.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/assert.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>

Modified: branches/1.1/lib/libvarnish/binary_heap.c
===================================================================
--- branches/1.1/lib/libvarnish/binary_heap.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/binary_heap.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -36,11 +36,13 @@
  * XXX: the array is not scaled back when items are deleted.
  */
 
-#include <assert.h>
+#include "config.h"
+
 #include <unistd.h>
 #include <stdlib.h>
 
 #include "binary_heap.h"
+#include "libvarnish.h"
 
 /* Private definitions -----------------------------------------------*/
 
@@ -66,7 +68,7 @@
 /* Implementation ----------------------------------------------------*/
 
 static void
-binheap_update(struct binheap *bh, unsigned u)
+binheap_update(const struct binheap *bh, unsigned u)
 {
 	assert(bh->magic == BINHEAP_MAGIC);
 	assert(u < bh->next);
@@ -97,7 +99,7 @@
 }
 
 static void
-binhead_swap(struct binheap *bh, unsigned u, unsigned v)
+binhead_swap(const struct binheap *bh, unsigned u, unsigned v)
 {
 	void *p;
 
@@ -112,7 +114,7 @@
 }
 
 static unsigned
-binheap_trickleup(struct binheap *bh, unsigned u)
+binheap_trickleup(const struct binheap *bh, unsigned u)
 {
 	unsigned v;
 
@@ -129,7 +131,7 @@
 }
 
 static void
-binheap_trickledown(struct binheap *bh, unsigned u)
+binheap_trickledown(const struct binheap *bh, unsigned u)
 {
 	unsigned v1, v2;
 
@@ -182,11 +184,11 @@
 	u = bh->next++;
 	bh->array[u] = p;
 	binheap_update(bh, u);
-	binheap_trickleup(bh, u);
+	(void)binheap_trickleup(bh, u);
 }
 
 void *
-binheap_root(struct binheap *bh)
+binheap_root(const struct binheap *bh)
 {
 
 	assert(bh != NULL);

Modified: branches/1.1/lib/libvarnish/cli.c
===================================================================
--- branches/1.1/lib/libvarnish/cli.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/cli.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * Stuff for handling the CLI protocol
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <string.h>
 #include <stdio.h>

Modified: branches/1.1/lib/libvarnish/cli_common.c
===================================================================
--- branches/1.1/lib/libvarnish/cli_common.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/cli_common.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/uio.h>
 

Modified: branches/1.1/lib/libvarnish/crc32.c
===================================================================
--- branches/1.1/lib/libvarnish/crc32.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/crc32.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * This CRC32 implementation is in the public domain.
  */
 
+#include "config.h"
+
 #include "libvarnish.h"
 
 /*--------------------------------------------------------------------*/

Modified: branches/1.1/lib/libvarnish/flopen.c
===================================================================
--- branches/1.1/lib/libvarnish/flopen.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/flopen.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $FreeBSD: src/lib/libutil/flopen.c,v 1.7 2007/05/23 12:09:33 des Exp $
  */
 
+#include "config.h"
+
 #include <sys/file.h>
 #include <sys/stat.h>
 

Modified: branches/1.1/lib/libvarnish/time.c
===================================================================
--- branches/1.1/lib/libvarnish/time.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/time.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -46,6 +46,8 @@
  *
  */
 
+#include "config.h"
+
 #include <sys/time.h>
 
 #include <stdio.h>

Modified: branches/1.1/lib/libvarnish/version.c
===================================================================
--- branches/1.1/lib/libvarnish/version.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/version.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * Display a standardized version message.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 
 #include "libvarnish.h"

Modified: branches/1.1/lib/libvarnish/vpf.c
===================================================================
--- branches/1.1/lib/libvarnish/vpf.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/vpf.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -28,6 +28,8 @@
  * $FreeBSD: src/lib/libutil/pidfile.c,v 1.5 2007/05/11 11:10:05 des Exp $
  */
 
+#include "config.h"
+
 #include <sys/param.h>
 #include <sys/file.h>
 #include <sys/stat.h>

Modified: branches/1.1/lib/libvarnish/vsb.c
===================================================================
--- branches/1.1/lib/libvarnish/vsb.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/vsb.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $FreeBSD: src/sys/kern/subr_sbuf.c,v 1.30 2005/12/23 11:49:53 phk Exp $
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <stdarg.h>
 #include <stdio.h>

Modified: branches/1.1/lib/libvarnish/vss.c
===================================================================
--- branches/1.1/lib/libvarnish/vss.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnish/vss.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -30,6 +30,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/socket.h>
 

Modified: branches/1.1/lib/libvarnishapi/Makefile.am
===================================================================
--- branches/1.1/lib/libvarnishapi/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishapi/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -9,5 +9,5 @@
 	instance.c \
 	shmlog.c
 
-libvarnishapi_la_CFLAGS = -include config.h \
+libvarnishapi_la_CFLAGS = \
 	-DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"'

Modified: branches/1.1/lib/libvarnishapi/base64.c
===================================================================
--- branches/1.1/lib/libvarnishapi/base64.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishapi/base64.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -6,6 +6,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <stdint.h>
 #include "varnishapi.h"

Modified: branches/1.1/lib/libvarnishapi/instance.c
===================================================================
--- branches/1.1/lib/libvarnishapi/instance.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishapi/instance.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -28,6 +28,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <errno.h>
 #include <stdio.h>
 #include <unistd.h>

Modified: branches/1.1/lib/libvarnishapi/shmlog.c
===================================================================
--- branches/1.1/lib/libvarnishapi/shmlog.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishapi/shmlog.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,9 @@
  * $Id$
  */
 
+#include "config.h"
+
+#include <sys/types.h>
 #include <sys/mman.h>
 
 #include <assert.h>

Modified: branches/1.1/lib/libvarnishcompat/Makefile.am
===================================================================
--- branches/1.1/lib/libvarnishcompat/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -14,5 +14,3 @@
 	strlcpy.c \
 	strndup.c \
 	vis.c
-
-libvarnishcompat_la_CFLAGS = -include config.h

Modified: branches/1.1/lib/libvarnishcompat/asprintf.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/asprintf.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/asprintf.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -30,6 +30,8 @@
  *
  */
 
+#include "config.h"
+
 #ifndef HAVE_ASPRINTF
 
 #include <stdarg.h>

Modified: branches/1.1/lib/libvarnishcompat/daemon.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/daemon.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/daemon.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * $FreeBSD: src/lib/libc/gen/daemon.c,v 1.8 2007/01/09 00:27:53 imp Exp $
  */
 
+#include "config.h"
+
 #ifndef HAVE_DAEMON
 
 #include <errno.h>

Modified: branches/1.1/lib/libvarnishcompat/setproctitle.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/setproctitle.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/setproctitle.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #ifndef HAVE_SETPROCTITLE
 
 #include <stdarg.h>

Modified: branches/1.1/lib/libvarnishcompat/srandomdev.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/srandomdev.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/srandomdev.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #ifndef HAVE_SRANDOMDEV
 
 #include <sys/time.h>

Modified: branches/1.1/lib/libvarnishcompat/strlcat.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/strlcat.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/strlcat.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -17,6 +17,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #ifndef HAVE_STRLCAT
 
 #include <sys/types.h>

Modified: branches/1.1/lib/libvarnishcompat/strlcpy.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/strlcpy.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/strlcpy.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -17,6 +17,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #ifndef HAVE_STRLCPY
 
 #include <sys/types.h>

Modified: branches/1.1/lib/libvarnishcompat/strndup.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/strndup.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/strndup.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -30,6 +30,8 @@
  *
  */
 
+#include "config.h"
+
 #ifndef HAVE_STRNDUP
 
 #include <stdlib.h>

Modified: branches/1.1/lib/libvarnishcompat/vasprintf.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/vasprintf.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/vasprintf.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -30,6 +30,8 @@
  *
  */
 
+#include "config.h"
+
 #ifndef HAVE_VASPRINTF
 
 #include <stdarg.h>

Modified: branches/1.1/lib/libvarnishcompat/vis.c
===================================================================
--- branches/1.1/lib/libvarnishcompat/vis.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvarnishcompat/vis.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -31,6 +31,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #if !defined(HAVE_VIS) || !defined(HAVE_STRVIS) || !defined(HAVE_STRVISX)
 
 #include <sys/types.h>

Modified: branches/1.1/lib/libvcl/Makefile.am
===================================================================
--- branches/1.1/lib/libvcl/Makefile.am	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/Makefile.am	2008-03-08 14:12:52 UTC (rev 2568)
@@ -20,5 +20,3 @@
 	vcc_token.c \
 	vcc_var.c \
 	vcc_xref.c
-
-libvcl_la_CFLAGS = -include config.h

Modified: branches/1.1/lib/libvcl/vcc_acl.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_acl.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_acl.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 

Modified: branches/1.1/lib/libvcl/vcc_action.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_action.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_action.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 
 #include "vsb.h"

Modified: branches/1.1/lib/libvcl/vcc_backend.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_backend.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_backend.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/socket.h>
 

Modified: branches/1.1/lib/libvcl/vcc_compile.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_compile.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_compile.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -60,6 +60,10 @@
  *	and all the rest...
  */
 
+#include "config.h"
+
+#include <sys/stat.h>
+
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -69,8 +73,6 @@
 #include <string.h>
 #include <unistd.h>
 
-#include <sys/stat.h>
-
 #include "vsb.h"
 #include "vqueue.h"
 

Modified: branches/1.1/lib/libvcl/vcc_fixed_token.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_fixed_token.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_fixed_token.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -6,6 +6,7 @@
  * Edit vcc_gen_fixed_token.tcl instead
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <ctype.h>
 #include "vcc_priv.h"

Modified: branches/1.1/lib/libvcl/vcc_gen_fixed_token.tcl
===================================================================
--- branches/1.1/lib/libvcl/vcc_gen_fixed_token.tcl	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_gen_fixed_token.tcl	2008-03-08 14:12:52 UTC (rev 2568)
@@ -215,6 +215,7 @@
 set foh [open "vcc_token_defs.h" w]
 warns $foh
 
+puts $fo "#include \"config.h\""
 puts $fo "#include <stdio.h>"
 puts $fo "#include <ctype.h>"
 puts $fo "#include \"vcc_priv.h\""

Modified: branches/1.1/lib/libvcl/vcc_gen_obj.tcl
===================================================================
--- branches/1.1/lib/libvcl/vcc_gen_obj.tcl	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_gen_obj.tcl	2008-03-08 14:12:52 UTC (rev 2568)
@@ -253,6 +253,7 @@
 	puts $fo "\t{ NULL }"
 }
 
+puts $fo "#include \"config.h\""
 puts $fo "#include <stdio.h>"
 puts $fo "#include \"vcc_compile.h\""
 puts $fo ""

Modified: branches/1.1/lib/libvcl/vcc_obj.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_obj.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_obj.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -6,6 +6,7 @@
  * Edit vcc_gen_obj.tcl instead
  */
 
+#include "config.h"
 #include <stdio.h>
 #include "vcc_compile.h"
 

Modified: branches/1.1/lib/libvcl/vcc_parse.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_parse.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_parse.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <string.h>
 

Modified: branches/1.1/lib/libvcl/vcc_string.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_string.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_string.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <string.h>
 

Modified: branches/1.1/lib/libvcl/vcc_token.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_token.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_token.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>

Modified: branches/1.1/lib/libvcl/vcc_var.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_var.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_var.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -29,6 +29,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <string.h>
 

Modified: branches/1.1/lib/libvcl/vcc_xref.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_xref.c	2008-03-08 14:01:28 UTC (rev 2567)
+++ branches/1.1/lib/libvcl/vcc_xref.c	2008-03-08 14:12:52 UTC (rev 2568)
@@ -39,6 +39,8 @@
  * they are called.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 
 #include "vsb.h"




More information about the varnish-commit mailing list