[master] aec1b60 Fix VTIM test-code

Poul-Henning Kamp phk at FreeBSD.org
Mon Feb 23 09:51:08 CET 2015


commit aec1b609cf9c467ba86f1e4ca3a433f74dfdadfe
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Feb 23 08:50:59 2015 +0000

    Fix VTIM test-code

diff --git a/lib/libvarnish/vtim.c b/lib/libvarnish/vtim.c
index 28b5f13..f0f4d55 100644
--- a/lib/libvarnish/vtim.c
+++ b/lib/libvarnish/vtim.c
@@ -205,14 +205,14 @@ VTIM_timespec(double t)
 
 /*
  * Compile with:
- *  cc -o foo -DTEST_DRIVER -I../.. -I../../include time.c assert.c
- * (Solaris)
- *  cc -o foo -DTEST_DRIVER -I../.. -I../../include -lm time.c assert.c
+ *  cc -o foo -DTEST_DRIVER -I../.. -I../../include vtim.c vas.c -lm
  * Test with:
  *  env TZ=UTC ./foo
  *  env TZ=CET ./foo
  */
 
+#include <stdint.h>
+
 static void
 tst(const char *s, time_t good)
 {
@@ -281,7 +281,7 @@ main(int argc, char **argv)
 	time(&t);
 	memset(buf, 0x55, sizeof buf);
 	VTIM_format(t, buf);
-	printf("scan = %d <%s>\n", VTIM_parse(buf), buf);
+	printf("scan = %.3f <%s>\n", VTIM_parse(buf), buf);
 
 	/* Examples from RFC2616 section 3.3.1 */
 	tst("Sun, 06 Nov 1994 08:49:37 GMT", 784111777);



More information about the varnish-commit mailing list