/* Serial number. */\r
t = ns_get32(rdata); rdata += NS_INT32SZ;\r
T(addstr("\t\t\t\t\t", 5, &buf, &buflen));\r
- len = SPRINTF((tmp, "%lu", t));\r
+ len = SPRINTF((tmp, "%Lu", t));\r
T(addstr(tmp, len, &buf, &buflen));\r
T(spaced = addtab(len, 16, spaced, &buf, &buflen));\r
T(addstr("; serial\n", 9, &buf, &buflen));\r
/* Priority. */\r
t = ns_get16(rdata);\r
rdata += NS_INT16SZ;\r
- len = SPRINTF((tmp, "%u ", t));\r
+ len = SPRINTF((tmp, "%u ", (unsigned int)t));\r
T(addstr(tmp, len, &buf, &buflen));\r
\r
/* Target. */\r
/* Priority. */\r
t = ns_get16(rdata);\r
rdata += NS_INT16SZ;\r
- len = SPRINTF((tmp, "%u ", t));\r
+ len = SPRINTF((tmp, "%u ", (unsigned int)t));\r
T(addstr(tmp, len, &buf, &buflen));\r
\r
/* Name1. */\r
/* Order, Precedence. */\r
order = ns_get16(rdata); rdata += NS_INT16SZ;\r
preference = ns_get16(rdata); rdata += NS_INT16SZ;\r
- len = SPRINTF((t, "%u %u ", order, preference));\r
+ len = SPRINTF((t, "%u %u ", (unsigned int)order, (unsigned int)preference));\r
T(addstr(t, len, &buf, &buflen));\r
\r
/* Flags. */\r
priority = ns_get16(rdata); rdata += NS_INT16SZ;\r
weight = ns_get16(rdata); rdata += NS_INT16SZ;\r
port = ns_get16(rdata); rdata += NS_INT16SZ;\r
- len = SPRINTF((t, "%u %u %u ", priority, weight, port));\r
+ len = SPRINTF((t, "%u %u %u ", (unsigned int)priority, (unsigned int)weight, (unsigned int)port));\r
T(addstr(t, len, &buf, &buflen));\r
\r
/* Server. */\r
protocol = *rdata++;\r
algorithm = *rdata++;\r
len = SPRINTF((tmp, "0x%04x %u %u",\r
- keyflags, protocol, algorithm));\r
+ (unsigned int)keyflags, (unsigned int)protocol, (unsigned int)algorithm));\r
T(addstr(tmp, len, &buf, &buflen));\r
\r
/* Public key data. */\r
algorithm = *rdata++;\r
labels = *rdata++;\r
t = ns_get32(rdata); rdata += NS_INT32SZ;\r
- len = SPRINTF((tmp, " %s %d %lu ",\r
- p_type((int)type), algorithm, t));\r
+ len = SPRINTF((tmp, " %s %d %Lu ",\r
+ p_type((int)type), (int)algorithm, t));\r
T(addstr(tmp, len, &buf, &buflen));\r
if (labels != (u_int)dn_count_labels(name))\r
goto formerr;\r
\r
/* Signature Footprint. */\r
footprint = ns_get16(rdata); rdata += NS_INT16SZ;\r
- len = SPRINTF((tmp, "%u ", footprint));\r
+ len = SPRINTF((tmp, "%u ", (unsigned int)footprint));\r
T(addstr(tmp, len, &buf, &buflen));\r
\r
/* Signer's name. */\r
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || rcode)\r
fprintf(file,\r
";; ->>HEADER<<- opcode: %s, status: %s, id: %d\n",\r
- _res_opcodes[opcode], _res_resultcodes[rcode], id);\r
+ _res_opcodes[opcode], _res_resultcodes[rcode], (int)id);\r
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX))\r
putc(';', file);\r
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD2)) {\r
case RES_DNSRCH: return "dnsrch";\r
case RES_INSECURE1: return "insecure1";\r
case RES_INSECURE2: return "insecure2";\r
- default: sprintf(nbuf, "?0x%lx?", (u_long)option);\r
+ default: sprintf(nbuf, "?0x%Lx?", (u_long)option);\r
return (nbuf);\r
}\r
}\r
#endif\r
\r
#ifdef NOPOLL /* libc_r doesn't wrap poll yet() */\r
-static int use_poll = 0;\r
#else\r
#include <poll.h>\r
static int use_poll = 1; /* adapt to poll() syscall availability */\r
((_res.pfcode & RES_PRF_REPLY) &&\r
(_res.pfcode & RES_PRF_HEAD1)),\r
(stdout, ";; got answer:\n"));\r
- DprintQ((_res.options & RES_DEBUG) ||\r
- (_res.pfcode & RES_PRF_REPLY),\r
- (stdout, ""),\r
- ans, (resplen>anssiz)?anssiz:resplen);\r
+ if((_res.options & RES_DEBUG) ||\r
+ (_res.pfcode & RES_PRF_REPLY)) {\r
+ __fp_nquery(ans, (resplen>anssiz)?anssiz:resplen, stdout);\r
+ }\r
/*\r
* If using virtual circuits, we assume that the first server\r
* is preferred over the rest (i.e. it is on the local\r