[master] 7d2c77a Add all the stuff I thought would be in 4c356d698b7abc59195989bcddcbcb210cc6c096
Poul-Henning Kamp
phk at FreeBSD.org
Wed Oct 25 21:28:07 UTC 2017
commit 7d2c77ac73f6553ee0820d25ffe7ee750dfd5cdc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Oct 25 19:56:40 2017 +0000
Add all the stuff I thought would be in 4c356d698b7abc59195989bcddcbcb210cc6c096
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 95ff511..419ae51 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -39,7 +39,6 @@
#include <math.h>
#include <pthread.h>
#include <stdarg.h>
-#include <stdint.h>
#include <sys/types.h>
#include "vdef.h"
diff --git a/bin/varnishd/cache/cache_busyobj.c b/bin/varnishd/cache/cache_busyobj.c
index 1bd002e..b18f867 100644
--- a/bin/varnishd/cache/cache_busyobj.c
+++ b/bin/varnishd/cache/cache_busyobj.c
@@ -32,7 +32,6 @@
#include "config.h"
-#include <stddef.h>
#include <stdlib.h>
#include "cache_varnishd.h"
diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c
index 9c4dac8..36bf2b3 100644
--- a/bin/varnishd/cache/cache_http.c
+++ b/bin/varnishd/cache/cache_http.c
@@ -31,7 +31,6 @@
#include "config.h"
-#include <stddef.h>
#include "cache_varnishd.h"
#include <stdio.h>
diff --git a/bin/varnishd/cache/cache_mempool.c b/bin/varnishd/cache/cache_mempool.c
index f2cc1c8..6c150bd 100644
--- a/bin/varnishd/cache/cache_mempool.c
+++ b/bin/varnishd/cache/cache_mempool.c
@@ -30,7 +30,6 @@
#include "config.h"
-#include <stddef.h>
#include "cache_varnishd.h"
#include <stdio.h>
diff --git a/bin/varnishd/common/common_vsc.c b/bin/varnishd/common/common_vsc.c
index 1ce53cd..9379f2d 100644
--- a/bin/varnishd/common/common_vsc.c
+++ b/bin/varnishd/common/common_vsc.c
@@ -31,18 +31,18 @@
#include <errno.h>
#include <stdarg.h>
-#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "vdef.h"
+#include "vrt.h"
+
#include "miniobj.h"
#include "vas.h"
#include "vend.h"
#include "vgz.h"
#include "vmb.h"
-#include "vrt.h"
#include "vsmw.h"
#include "vqueue.h"
#include "vapi/vsc_int.h"
diff --git a/bin/varnishd/storage/storage_persistent_subr.c b/bin/varnishd/storage/storage_persistent_subr.c
index aedb02b..2e15c3f 100644
--- a/bin/varnishd/storage/storage_persistent_subr.c
+++ b/bin/varnishd/storage/storage_persistent_subr.c
@@ -35,7 +35,6 @@
#include "config.h"
-#include <stddef.h>
#include "cache/cache_varnishd.h"
#include "common/heritage.h"
diff --git a/include/vrt.h b/include/vrt.h
index 6a07e8c..5b79a80 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -89,6 +89,9 @@
/***********************************************************************/
+#include <stddef.h> // NULL, size_t
+#include <stdint.h> // [u]int%d_t
+
struct VCL_conf;
struct busyobj;
struct director;
diff --git a/lib/libvarnishapi/vsl_glob_test.c b/lib/libvarnishapi/vsl_glob_test.c
index ca0b901..bf09d0b 100644
--- a/lib/libvarnishapi/vsl_glob_test.c
+++ b/lib/libvarnishapi/vsl_glob_test.c
@@ -41,7 +41,7 @@
#include "vas.h"
#ifndef FNM_CASEFOLD
-#define FNM_CASEFOLD FNM_IGNORECASE
+# define FNM_CASEFOLD FNM_IGNORECASE
#endif
static void
@@ -53,7 +53,7 @@ cb(int tag, void *priv)
}
static int
-tst_one(const char *p)
+tst_one_glob(const char *p)
{
int i;
@@ -69,18 +69,23 @@ main(int argc, char * const *argv)
int i, j;
if (argc == 1) {
- i = tst_one("Req*");
+ i = tst_one_glob("Req*");
assert(i == 10);
- j = tst_one("reQ*");
+ j = tst_one_glob("reQ*");
assert(i == j);
- assert(tst_one("*Header") > 0);
- assert(tst_one("Req*eader") == 1);
- assert(tst_one("*") > 0);
- assert(tst_one("a*b*c") == -3);
- assert(tst_one("**") == -3);
- assert(tst_one("_") == -1);
- assert(tst_one("") == -1);
+ assert(tst_one_glob("*Header") > 0);
+ assert(tst_one_glob("Req*eader") == 1);
+ assert(tst_one_glob("xyz*y") == -1);
+ assert(tst_one_glob("*") > 0);
+ assert(tst_one_glob("a*b*c") == -3);
+ assert(tst_one_glob("**") == -3);
+ assert(tst_one_glob("_") == -1);
+ assert(tst_one_glob("") == -1);
assert(VSL_Glob2Tags("", 0, cb, NULL) == -1);
+
+ assert(VSL_List2Tags("Req*,Resp*",-1,cb,NULL) > 0);
+ assert(VSL_List2Tags(",,,",-1,cb,NULL) == -1);
+ assert(VSL_List2Tags("xyzzy,,xyzzy",-1,cb,NULL) == -1);
return (0);
}
if (argc != 2) {
diff --git a/lib/libvcc/vsctool.py b/lib/libvcc/vsctool.py
index c0507ea..7acc7a5 100644
--- a/lib/libvcc/vsctool.py
+++ b/lib/libvcc/vsctool.py
@@ -172,10 +172,7 @@ class vscset(object):
fo = open(fon, "w")
genhdr(fo, self.name)
fo.write('#include "config.h"\n')
- fo.write('#include <stddef.h>\n')
fo.write('#include <stdarg.h>\n')
- fo.write('#include <stdio.h>\n')
- fo.write('#include <stdint.h>\n')
fo.write('#include "vdef.h"\n')
fo.write('#include "vas.h"\n')
fo.write('#include "vrt.h"\n')
diff --git a/lib/libvmod_blob/base64.c b/lib/libvmod_blob/base64.c
index f7a8c06..2017029 100644
--- a/lib/libvmod_blob/base64.c
+++ b/lib/libvmod_blob/base64.c
@@ -28,7 +28,6 @@
#include "config.h"
#include <errno.h>
-#include <stdint.h>
#include "base64.h"
diff --git a/lib/libvmod_blob/id.c b/lib/libvmod_blob/id.c
index 34bb34b..d10e642 100644
--- a/lib/libvmod_blob/id.c
+++ b/lib/libvmod_blob/id.c
@@ -29,7 +29,6 @@
#include "config.h"
#include <string.h>
#include <errno.h>
-#include <stdint.h>
#include "vmod_blob.h"
diff --git a/lib/libvmod_blob/vmod_blob.c b/lib/libvmod_blob/vmod_blob.c
index 030140f..8beb982 100644
--- a/lib/libvmod_blob/vmod_blob.c
+++ b/lib/libvmod_blob/vmod_blob.c
@@ -28,10 +28,8 @@
#include "config.h"
#include <errno.h>
-#include <pthread.h>
#include <string.h>
-#include "vdef.h"
#include "cache/cache.h"
#include "vcc_if.h"
diff --git a/lib/libvmod_blob/wb.c b/lib/libvmod_blob/wb.c
index e16c421..d56b061 100644
--- a/lib/libvmod_blob/wb.c
+++ b/lib/libvmod_blob/wb.c
@@ -28,7 +28,6 @@
#include <string.h>
-#include "vdef.h"
#include "cache/cache.h"
#include "wb.h"
More information about the varnish-commit
mailing list