]> err.no Git - varnish/commitdiff
Add VCL_MET_${METHOD} bitmap defines
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 25 Jun 2007 07:04:13 +0000 (07:04 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 25 Jun 2007 07:04:13 +0000 (07:04 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1550 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/include/vcl_returns.h
varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl

index 6bc0e6069a054b6f064a24a40f6a9f39a6b31bf2..009cc3fb5f064f18b0d6ab52f27e3a116da7f936 100644 (file)
@@ -41,5 +41,15 @@ VCL_MET_MAC(hit,HIT,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_DELIVER))
 VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_INSERT))
 VCL_MET_MAC(timeout,TIMEOUT,(VCL_RET_FETCH|VCL_RET_DISCARD))
 VCL_MET_MAC(discard,DISCARD,(VCL_RET_DISCARD|VCL_RET_PASS))
+#else
+#define VCL_MET_RECV   (1 << 0)
+#define VCL_MET_PIPE   (1 << 1)
+#define VCL_MET_PASS   (1 << 2)
+#define VCL_MET_HASH   (1 << 3)
+#define VCL_MET_MISS   (1 << 4)
+#define VCL_MET_HIT    (1 << 5)
+#define VCL_MET_FETCH  (1 << 6)
+#define VCL_MET_TIMEOUT        (1 << 7)
+#define VCL_MET_DISCARD        (1 << 8)
 #endif
 #define N_METHODS 9
index 2ec2fa823d4478533d8bdd434f4c17e4ad022c1b..8c2d69771ef4ddd737fc84c7a3efcd50c62adcdd 100755 (executable)
@@ -192,6 +192,12 @@ foreach m $methods {
        puts $for ")"
        incr u
 }
+puts $for "#else"
+set u 0
+foreach m $methods {
+       puts $for "#define VCL_MET_[string toupper [lindex $m 0]]\t(1 << $u)"
+       incr u
+}
 puts $for "#endif"
 puts $for "#define N_METHODS $u"
 close $for