From de292aa1dd1942e151ff034fcb88504a86742f97 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sun, 3 Aug 2014 14:02:04 -0400 Subject: resolve-host: make arg_type an int We are using it also to store _DNS_TYPE_INVALID, so it should be signed. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 45d2e58bf5..ce8f2472ee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1189,7 +1189,7 @@ src/resolve/dns_type-list.txt: src/resolve/dns-type.h $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@ src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt - $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(uint16_t type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@ + $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@ src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@ -- cgit v1.2.3-54-g00ecf