[master] 5d3d3eeaf Make vcc typenames available in lower-case as well
Poul-Henning Kamp
phk at FreeBSD.org
Fri May 17 08:14:11 UTC 2019
commit 5d3d3eeaf9650c2e69fa7dfb18071e6c6b280067
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu May 16 08:25:52 2019 +0000
Make vcc typenames available in lower-case as well
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index 8da81c378..7e7723ed4 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -793,7 +793,7 @@ file_header(ft)
lint_start(ft)
for vcltype in sorted(vcltypes.keys()):
- ft.write("VCC_TYPE(" + vcltype + ")\n")
+ ft.write("VCC_TYPE(" + vcltype + ", " + vcltype.lower() +")\n")
ft.write("#undef VCC_TYPE\n")
lint_end(ft)
ft.close()
diff --git a/lib/libvcc/vcc_compile.h b/lib/libvcc/vcc_compile.h
index ff9fee700..1a3c778d9 100644
--- a/lib/libvcc/vcc_compile.h
+++ b/lib/libvcc/vcc_compile.h
@@ -106,7 +106,7 @@ struct type {
int stringform;
};
-#define VCC_TYPE(foo) extern const struct type foo[1];
+#define VCC_TYPE(UC, lc) extern const struct type UC[1];
#include "tbl/vcc_types.h"
/*---------------------------------------------------------------------*/
diff --git a/lib/libvcc/vcc_types.c b/lib/libvcc/vcc_types.c
index 2d9208c64..3611dcef5 100644
--- a/lib/libvcc/vcc_types.c
+++ b/lib/libvcc/vcc_types.c
@@ -178,7 +178,7 @@ vcc_type_t
VCC_Type(const char *p)
{
-#define VCC_TYPE(foo) if (!strcmp(p, #foo)) return (foo);
+#define VCC_TYPE(UC, lc) if (!strcmp(p, #UC)) return (UC);
#include "tbl/vcc_types.h"
return (NULL);
}
More information about the varnish-commit
mailing list