Commit 7d2c77ac authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add all the stuff I thought would be in 4c356d69

parent 55e56b36
......@@ -39,7 +39,6 @@
#include <math.h>
#include <pthread.h>
#include <stdarg.h>
#include <stdint.h>
#include <sys/types.h>
#include "vdef.h"
......
......@@ -32,7 +32,6 @@
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include "cache_varnishd.h"
......
......@@ -31,7 +31,6 @@
#include "config.h"
#include <stddef.h>
#include "cache_varnishd.h"
#include <stdio.h>
......
......@@ -30,7 +30,6 @@
#include "config.h"
#include <stddef.h>
#include "cache_varnishd.h"
#include <stdio.h>
......
......@@ -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"
......
......@@ -35,7 +35,6 @@
#include "config.h"
#include <stddef.h>
#include "cache/cache_varnishd.h"
#include "common/heritage.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;
......
......@@ -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) {
......
......@@ -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')
......
......@@ -28,7 +28,6 @@
#include "config.h"
#include <errno.h>
#include <stdint.h>
#include "base64.h"
......
......@@ -29,7 +29,6 @@
#include "config.h"
#include <string.h>
#include <errno.h>
#include <stdint.h>
#include "vmod_blob.h"
......
......@@ -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"
......
......@@ -28,7 +28,6 @@
#include <string.h>
#include "vdef.h"
#include "cache/cache.h"
#include "wb.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment