#include <stdlib.h>
#include <time.h>
#include <ctype.h>
+#include <inttypes.h>
#include <isc/app.h>
#include <isc/netaddr.h>
#endif
if (query->lookup->doing_xfr) {
printf(";; XFR size: %u records (messages %u, "
- "bytes %" ISC_PRINT_QUADFORMAT "u)\n",
+ "bytes %" PRIu64 ")\n",
query->rr_count, query->msg_count,
query->byte_count);
} else {
} else if (query->lookup->identify && !short_form) {
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
if (query->lookup->use_usec)
- printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
+ printf(";; Received %" PRIu64 " bytes "
"from %s(%s) in %ld us\n\n",
query->lookup->doing_xfr
? query->byte_count
: (isc_uint64_t)bytes,
fromtext, query->userarg, (long) diff);
else
- printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
+ printf(";; Received %" PRIu64 " bytes "
"from %s(%s) in %ld ms\n\n",
query->lookup->doing_xfr
? query->byte_count
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
ADD_STRING(buf, " from server ");
ADD_STRING(buf, query->servname);
- if (query->lookup->use_usec)
- snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u us.", diff);
- else
- snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u ms.", diff / 1000);
+ if (query->lookup->use_usec) {
+ snprintf(store, sizeof(store), " in %" PRIu64 " us.", diff);
+ } else {
+ snprintf(store, sizeof(store), " in %" PRIu64 " ms.", diff / 1000);
+ }
ADD_STRING(buf, store);
}
ADD_STRING(buf, "\n");
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+#include <inttypes.h>
#include <isc/app.h>
#include <isc/backtrace.h>
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"adjusted limit on open files from "
- "%" ISC_PRINT_QUADFORMAT "u to "
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 " to "
+ "%" PRIu64,
old_openfiles, named_g_initopenfiles);
}
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <inttypes.h>
#include <isc/aes.h>
#include <isc/app.h>
cfg_obj_log(obj2, named_g_lctx,
ISC_LOG_WARNING,
"'dnstap-output size "
- "%" ISC_PRINT_QUADFORMAT "u' "
+ "%" PRIu64 "' "
"is too large for this "
"system; reducing to %lu",
max_size, (unsigned long)SIZE_MAX);
cfg_obj_log(obj, named_g_lctx,
ISC_LOG_WARNING,
"'max-cache-size "
- "%" ISC_PRINT_QUADFORMAT "u' "
+ "%" PRIu64 "' "
"is too large for this "
"system; reducing to %lu",
value, (unsigned long)SIZE_MAX);
cfg_obj_log(obj, named_g_lctx,
ISC_LOG_INFO,
"'max-cache-size %d%%' "
- "- setting to %" ISC_PRINT_QUADFORMAT "uMB "
- "(out of %" ISC_PRINT_QUADFORMAT "uMB)",
+ "- setting to %" PRIu64 "MB "
+ "(out of %" PRIu64 "MB)",
max_cache_size_percent,
(isc_uint64_t)(max_cache_size / (1024*1024)),
totalphys / (1024*1024));
NAMED_LOGMODULE_SERVER,
result == ISC_R_SUCCESS ?
ISC_LOG_DEBUG(3) : ISC_LOG_WARNING,
- "set maximum %s to %" ISC_PRINT_QUADFORMAT "u: %s",
+ "set maximum %s to %" PRIu64 ": %s",
description, value, isc_result_totext(result));
}
cfg_obj_log(obj, named_g_lctx,
ISC_LOG_ERROR,
"'lmdb-mapsize "
- "%" ISC_PRINT_QUADFORMAT "d' "
+ "%" PRId64 "' "
"is too small",
mapsize);
return (ISC_R_FAILURE);
cfg_obj_log(obj, named_g_lctx,
ISC_LOG_ERROR,
"'lmdb-mapsize "
- "%" ISC_PRINT_QUADFORMAT "d' "
+ "%" PRId64 "' "
"is too large",
mapsize);
return (ISC_R_FAILURE);
if (result == ISC_R_SUCCESS && (isc_resourcevalue_t)maxsocks > nfiles) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
- "max open files (%" ISC_PRINT_QUADFORMAT "u)"
+ "max open files (%" PRIu64 ")"
" is smaller than max sockets (%u)",
nfiles, maxsocks);
}
#include <config.h>
+#include <inttypes.h>
+
#include <isc/buffer.h>
#include <isc/httpd.h>
#include <isc/json.h>
switch (dumparg.type) {
case isc_statsformat_file:
fp = arg;
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
value, desc[idx]);
break;
case isc_statsformat_xml:
ISC_XMLCHAR
"counter"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u", value));
+ "%" PRIu64, value));
TRY0(xmlTextWriterEndElement(writer));
/* </counter> */
ISC_XMLCHAR
desc[idx]));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u", value));
+ "%" PRIu64, value));
TRY0(xmlTextWriterEndElement(writer));
/* counter */
}
switch (dumparg->type) {
case isc_statsformat_file:
fp = dumparg->arg;
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n", val, typestr);
+ fprintf(fp, "%20" PRIu64 " %s\n", val, typestr);
break;
case isc_statsformat_xml:
#ifdef HAVE_LIBXML2
ISC_XMLCHAR typestr));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64,
val));
TRY0(xmlTextWriterEndElement(writer)); /* type */
switch (dumparg->type) {
case isc_statsformat_file:
fp = dumparg->arg;
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s%s%s\n", val,
+ fprintf(fp, "%20" PRIu64 " %s%s%s\n", val,
stale ? "#" : "", nxrrset ? "!" : "", typestr);
break;
case isc_statsformat_xml:
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counter"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64,
val));
TRY0(xmlTextWriterEndElement(writer)); /* counter */
switch (dumparg->type) {
case isc_statsformat_file:
fp = dumparg->arg;
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n", val, codebuf);
+ fprintf(fp, "%20" PRIu64 " %s\n", val, codebuf);
break;
case isc_statsformat_xml:
#ifdef HAVE_LIBXML2
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name",
ISC_XMLCHAR codebuf ));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64,
val));
TRY0(xmlTextWriterEndElement(writer)); /* counter */
#endif
switch (dumparg->type) {
case isc_statsformat_file:
fp = dumparg->arg;
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n", val, codebuf);
+ fprintf(fp, "%20" PRIu64 " %s\n", val, codebuf);
break;
case isc_statsformat_xml:
#ifdef HAVE_LIBXML2
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name",
ISC_XMLCHAR codebuf ));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64,
val));
TRY0(xmlTextWriterEndElement(writer)); /* counter */
#endif
#include <config.h>
+#include <inttypes.h>
+
#include <isc/buffer.h>
#include <isc/file.h>
#include <isc/mem.h>
cfg_obj_log(obj, named_g_lctx,
ISC_LOG_ERROR,
"'max-journal-size "
- "%" ISC_PRINT_QUADFORMAT "d' "
+ "%" PRId64 "' "
"is too large",
value);
RETERR(ISC_R_RANGE);
cfg_obj_log(obj, named_g_lctx,
ISC_LOG_ERROR,
"'max-journal-size "
- "%" ISC_PRINT_QUADFORMAT "d' "
+ "%" PRId64 "' "
"is too large",
value);
RETERR(ISC_R_RANGE);
ISC_PLATFORM_HAVESTATNSEC
ISC_PLATFORM_HAVESYSUNH
LIBCAP_LIBS
-ISC_PLATFORM_QUADFORMAT
DST_EXTRA_SRCS
DST_EXTRA_OBJS
USE_ISC_SPNEGO
-# Determine the printf format characters to use when printing
-# values of type isc_int64_t. This will normally be "ll", but where
-# the compiler treats "long long" as a alias for "long" and printf
-# doesn't know about "long long" use "l". Hopefully the sprintf
-# will produce a inconsistent result in the later case. If the compiler
-# fails due to seeing "%lld" we fall back to "l".
-#
-# Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
-# %ld even for (long long)/
-#
-# Win32 uses "%I64d", but that's defined elsewhere since we don't use
-# configure on Win32.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking printf format modifier for 64-bit integers" >&5
-$as_echo_n "checking printf format modifier for 64-bit integers... " >&6; }
-if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming target platform uses ll" >&5
-$as_echo "assuming target platform uses ll" >&6; }
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <stdio.h>
-main() {
- long long int j = 0;
- char buf[100];
- buf[0] = 0;
- sprintf(buf, "%lld", j);
- exit((sizeof(long long int) != sizeof(long int))? 0 :
- (strcmp(buf, "0") != 0));
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ll" >&5
-$as_echo "ll" >&6; }
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: l" >&5
-$as_echo "l" >&6; }
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-
-
#
# Security Stuff
#
AC_SUBST(DST_EXTRA_OBJS)
AC_SUBST(DST_EXTRA_SRCS)
-# Determine the printf format characters to use when printing
-# values of type isc_int64_t. This will normally be "ll", but where
-# the compiler treats "long long" as a alias for "long" and printf
-# doesn't know about "long long" use "l". Hopefully the sprintf
-# will produce a inconsistent result in the later case. If the compiler
-# fails due to seeing "%lld" we fall back to "l".
-#
-# Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
-# %ld even for (long long)/
-#
-# Win32 uses "%I64d", but that's defined elsewhere since we don't use
-# configure on Win32.
-#
-AC_MSG_CHECKING(printf format modifier for 64-bit integers)
-AC_TRY_RUN([
-#include <stdio.h>
-main() {
- long long int j = 0;
- char buf[100];
- buf[0] = 0;
- sprintf(buf, "%lld", j);
- exit((sizeof(long long int) != sizeof(long int))? 0 :
- (strcmp(buf, "0") != 0));
-}
-],
- [AC_MSG_RESULT(ll)
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
- [AC_MSG_RESULT(l)
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
- [AC_MSG_RESULT(assuming target platform uses ll)
- ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
-AC_SUBST(ISC_PLATFORM_QUADFORMAT)
-
-
#
# Security Stuff
#
*** DNS Performance Testing Tool
***/
+#include <inttypes.h>
+
#include <errno.h>
#include <math.h>
#include <pthread.h>
printf("Statistics:\n\n");
- printf(" %s sent: %" ISC_PRINT_QUADFORMAT "u\n",
+ printf(" %s sent: %" PRIu64 "\n",
units, stats->num_sent);
- printf(" %s completed: %" ISC_PRINT_QUADFORMAT "u (%.2lf%%)\n",
+ printf(" %s completed: %" PRIu64 " (%.2lf%%)\n",
units, stats->num_completed,
SAFE_DIV(100.0 * stats->num_completed, stats->num_sent));
- printf(" %s lost: %" ISC_PRINT_QUADFORMAT "u (%.2lf%%)\n",
+ printf(" %s lost: %" PRIu64 " (%.2lf%%)\n",
units, stats->num_timedout,
SAFE_DIV(100.0 * stats->num_timedout, stats->num_sent));
if (stats->num_interrupted > 0)
- printf(" %s interrupted: %" ISC_PRINT_QUADFORMAT "u "
+ printf(" %s interrupted: %" PRIu64 " "
"(%.2lf%%)\n",
units, stats->num_interrupted,
SAFE_DIV(100.0 * stats->num_interrupted,
first_rcode = ISC_FALSE;
else
printf(", ");
- printf("%s %" ISC_PRINT_QUADFORMAT "u (%.2lf%%)",
+ printf("%s %" PRIu64 " (%.2lf%%)",
perf_dns_rcode_strings[i], stats->rcodecounts[i],
(stats->rcodecounts[i] * 100.0) / stats->num_completed);
}
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <inttypes.h>
#include <sys/time.h>
printf("\nStatistics:\n\n");
- printf(" Queries sent: %" ISC_PRINT_QUADFORMAT "u\n",
+ printf(" Queries sent: %" PRIu64 "\n",
num_queries_sent);
- printf(" Queries completed: %" ISC_PRINT_QUADFORMAT "u\n",
+ printf(" Queries completed: %" PRIu64 "\n",
num_responses_received);
- printf(" Queries lost: %" ISC_PRINT_QUADFORMAT "u\n",
+ printf(" Queries lost: %" PRIu64 "\n",
num_queries_sent - num_responses_received);
printf(" Response codes: ");
first_rcode = ISC_TRUE;
first_rcode = ISC_FALSE;
else
printf(", ");
- printf("%s %" ISC_PRINT_QUADFORMAT "u (%.2lf%%)",
+ printf("%s %" PRIu64 " (%.2lf%%)",
perf_dns_rcode_strings[i], rcodecounts[i],
(rcodecounts[i] * 100.0) / num_responses_received);
}
#include <config.h>
#include <stdlib.h>
+#include <inttypes.h>
#include <isc/aes.h>
#include <isc/base64.h>
cfg_obj_log(obj, logctx,
ISC_LOG_ERROR,
"'lmdb-mapsize "
- "%" ISC_PRINT_QUADFORMAT "d' "
+ "%" PRId64 "' "
"is too small",
mapsize);
if (result == ISC_R_SUCCESS)
cfg_obj_log(obj, logctx,
ISC_LOG_ERROR,
"'lmdb-mapsize "
- "%" ISC_PRINT_QUADFORMAT "d' "
+ "%" PRId64 "' "
"is too large",
mapsize);
if (result == ISC_R_SUCCESS)
#include <config.h>
+#include <inttypes.h>
+
#include <isc/buffer.h>
#include <isc/log.h>
#include <isc/hash.h>
t = isc_time_microdiff(&bad->expire, &now);
t /= 1000;
fprintf(fp, "; %s/%s [ttl "
- "%" ISC_PLATFORM_QUADFORMAT "u]\n",
+ "%" PRIu64 "]\n",
namebuf, typebuf, t);
}
}
#include <config.h>
+#include <inttypes.h>
+
#include <isc/json.h>
#include <isc/mem.h>
#include <isc/print.h>
getcounters(cache->stats, isc_statsformat_file,
dns_cachestatscounter_max, indices, values);
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
values[dns_cachestatscounter_hits],
"cache hits");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
values[dns_cachestatscounter_misses],
"cache misses");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
values[dns_cachestatscounter_queryhits],
"cache hits (from query)");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
values[dns_cachestatscounter_querymisses],
"cache misses (from query)");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
values[dns_cachestatscounter_deletelru],
"cache records deleted due to memory exhaustion");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
values[dns_cachestatscounter_deletettl],
"cache records deleted due to TTL expiration");
fprintf(fp, "%20u %s\n", dns_db_nodecount(cache->db),
"cache database nodes");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
(isc_uint64_t) dns_db_hashsize(cache->db),
"cache database hash buckets");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
(isc_uint64_t) isc_mem_total(cache->mctx),
"cache tree memory total");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
(isc_uint64_t) isc_mem_inuse(cache->mctx),
"cache tree memory in use");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
(isc_uint64_t) isc_mem_maxinuse(cache->mctx),
"cache tree highest memory in use");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
(isc_uint64_t) isc_mem_total(cache->hmctx),
"cache heap memory total");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
(isc_uint64_t) isc_mem_inuse(cache->hmctx),
"cache heap memory in use");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20" PRIu64 " %s\n",
(isc_uint64_t) isc_mem_maxinuse(cache->hmctx),
"cache heap highest memory in use");
}
TRY0(xmlTextWriterWriteAttribute(writer,
ISC_XMLCHAR "name", ISC_XMLCHAR name));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
value));
TRY0(xmlTextWriterEndElement(writer)); /* counter */
#include <config.h>
#include <sys/stat.h>
-#ifdef HAVE_INTTYPES_H
#include <inttypes.h> /* uintptr_t */
-#endif
#include <isc/crc64.h>
#include <isc/file.h>
/* #define inline */
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h> /* uintptr_t */
-#endif
+#include <inttypes.h>
#include <isc/crc64.h>
#include <isc/event.h>
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_ZONE, ISC_LOG_DEBUG(3),
"rehash_gluetable(): "
- "resized glue table from %"ISC_PRINT_QUADFORMAT"u to "
- "%"ISC_PRINT_QUADFORMAT"u",
+ "resized glue table from %" PRIu64 " to "
+ "%" PRIu64,
(isc_uint64_t) oldsize,
(isc_uint64_t) version->glue_table_size);
#include <config.h>
#include <ctype.h>
+#include <inttypes.h>
#include <isc/counter.h>
#include <isc/log.h>
dns_name_format(&fctx->domain, domainbuf, sizeof(domainbuf));
isc_log_write(lctx, category, module, level,
"fetch completed at %s:%d for %s in "
- "%" ISC_PRINT_QUADFORMAT "u."
- "%06" ISC_PRINT_QUADFORMAT "u: %s/%s "
+ "%" PRIu64 "."
+ "%06" PRIu64 ": %s/%s "
"[domain:%s,referral:%u,restart:%u,qrysent:%u,"
"timeout:%u,lame:%u,quota:%u,neterr:%u,"
"badresp:%u,adberr:%u,findfail:%u,valfail:%u,"
#include <config.h>
+#include <inttypes.h>
+
#include <isc/buffer.h>
#include <isc/mem.h>
#include <isc/net.h>
set:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
DNS_RPZ_DEBUG_QUIET,
- "computed RPZ qname_skip_recurse mask=0x%llx",
+ "computed RPZ qname_skip_recurse mask=0x%" PRIx64,
(isc_uint64_t) mask);
rpzs->have.qname_skip_recurse = mask;
}
DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
"rpz: %s: new zone version came "
"too soon, deferring update for "
- "%llu seconds", dname, defer);
+ "%" PRIu64 " seconds", dname, defer);
isc_interval_set(&interval, (unsigned int)defer, 0);
dns_db_currentversion(zone->db, &zone->dbversion);
result = isc_timer_reset(zone->updatetimer,
DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
"rpz: %s: new zone version came "
"too soon, deferring update for "
- "%llu seconds", dname, defer);
+ "%" PRIu64 " seconds", dname, defer);
isc_interval_set(&interval, (unsigned int)defer, 0);
isc_timer_reset(rpz->updatetimer, isc_timertype_once,
NULL, &interval, ISC_TRUE);
#include <unistd.h>
#include <sys/mman.h>
-#ifdef HAVE_INTTYPES_H
#include <inttypes.h> /* uintptr_t */
-#endif
#include <dns/rbt.h>
#include <dns/fixedname.h>
#include <fcntl.h>
#include <unistd.h>
-#ifdef HAVE_INTTYPES_H
#include <inttypes.h> /* uintptr_t */
-#endif
#include <dns/rbt.h>
#include <dns/fixedname.h>
#include <atf-c.h>
#include <unistd.h>
+#include <inttypes.h>
#include <isc/mem.h>
#include <isc/print.h>
#include "dnstest.h"
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h> /* uintptr_t */
-#endif
-
#define TEST_ORIGIN "test"
/*
#include <config.h>
+#include <inttypes.h>
+
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/random.h>
persec = (xfr->nbytes * 1000) / msecs;
xfrin_log(xfr, ISC_LOG_INFO,
"Transfer completed: %d messages, %d records, "
- "%" ISC_PRINT_QUADFORMAT "u bytes, "
+ "%" PRIu64 " bytes, "
"%u.%03u secs (%u bytes/sec)",
xfr->nmsg, xfr->nrecs, xfr->nbytes,
(unsigned int) (msecs / 1000), (unsigned int) (msecs % 1000),
#include <config.h>
+#include <inttypes.h>
+#include <stdarg.h>
+
#include <isc/buffer.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
-#include <stdarg.h>
-
void
isc__buffer_init(isc_buffer_t *b, void *base, unsigned int length) {
/*
REQUIRE(ISC_BUFFER_VALID(b));
/* xxxwpk do it more low-level way ? */
- l = snprintf(buf, 21, "%" ISC_PRINT_QUADFORMAT "d", v);
+ l = snprintf(buf, 21, "%" PRId64, v);
RUNTIME_CHECK(l <= 21);
if (ISC_UNLIKELY(b->autore)) {
result = isc_buffer_reserve(&b, l);
***/
/*! \brief
- * The printf format string modifier to use with isc_uint64_t values.
- */
-@ISC_PLATFORM_QUADFORMAT@
/*
* If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined.
#include <isc/lang.h>
#include <isc/platform.h>
-/***
- *** Macros
- ***/
-#define ISC_PRINT_QUADFORMAT ISC_PLATFORM_QUADFORMAT
-
/***
*** Functions
***/
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
-
+#include <inttypes.h>
#include <limits.h>
#include <isc/bind9.h>
summary->total += ctx->total;
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "total"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
(isc_uint64_t)ctx->total));
TRY0(xmlTextWriterEndElement(writer)); /* total */
summary->inuse += ctx->inuse;
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "inuse"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
(isc_uint64_t)ctx->inuse));
TRY0(xmlTextWriterEndElement(writer)); /* inuse */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "maxinuse"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
(isc_uint64_t)ctx->maxinuse));
TRY0(xmlTextWriterEndElement(writer)); /* maxinuse */
summary->malloced += ctx->malloced;
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "malloced"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
(isc_uint64_t)ctx->malloced));
TRY0(xmlTextWriterEndElement(writer)); /* malloced */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "maxmalloced"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
(isc_uint64_t)ctx->maxmalloced));
TRY0(xmlTextWriterEndElement(writer)); /* maxmalloced */
summary->blocksize += ctx->basic_table_count *
NUM_BASIC_BLOCKS * ctx->mem_target;
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
(isc_uint64_t)
ctx->basic_table_count *
NUM_BASIC_BLOCKS *
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "hiwater"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
(isc_uint64_t)ctx->hi_water));
TRY0(xmlTextWriterEndElement(writer)); /* hiwater */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "lowater"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
(isc_uint64_t)ctx->lo_water));
TRY0(xmlTextWriterEndElement(writer)); /* lowater */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "TotalUse"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
summary.total));
TRY0(xmlTextWriterEndElement(writer)); /* TotalUse */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "InUse"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
summary.inuse));
TRY0(xmlTextWriterEndElement(writer)); /* InUse */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "Malloced"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
summary.malloced));
TRY0(xmlTextWriterEndElement(writer)); /* InUse */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "BlockSize"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
summary.blocksize));
TRY0(xmlTextWriterEndElement(writer)); /* BlockSize */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "ContextSize"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
summary.contextsize));
TRY0(xmlTextWriterEndElement(writer)); /* ContextSize */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "Lost"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%" PRIu64 "",
lost));
TRY0(xmlTextWriterEndElement(writer)); /* Lost */
*/
#include <config.h>
+
#include <stdlib.h>
+#include <inttypes.h>
#include <atf-c.h>
isc_test_end();
- printf("64-bit counter %"ISC_PRINT_QUADFORMAT"d, "
- "expected %"ISC_PRINT_QUADFORMAT"d\n",
+ printf("64-bit counter %" PRId64 ", "
+ "expected %" PRId64 "\n",
counter_64, EXPECTED_COUNT_64);
ATF_CHECK_EQ(counter_64, EXPECTED_COUNT_64);
(isc_uint64_t) r);
val |= ((isc_uint64_t) val << 32);
- printf("64-bit store 0x%"ISC_PRINT_QUADFORMAT"x, "
- "expected 0x%"ISC_PRINT_QUADFORMAT"x\n",
+ printf("64-bit store 0x%" PRIx64 ", "
+ "expected 0x%" PRIx64 "\n",
(isc_uint64_t) store_64, val);
ATF_CHECK_EQ((isc_uint64_t) store_64, val);
#include <stdio.h>
#include <string.h>
+#include <inttypes.h>
#include <isc/hash.h>
}
isc_crc64_final(&crc);
snprintf(str, sizeof(str),
- "0x%016" ISC_PRINT_QUADFORMAT "X", crc);
+ "0x%016" PRIX64, crc);
ATF_CHECK_STREQ(str, testcase->result);
testcase++;
#include <atf-c.h>
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h> /* uintptr_t */
-#endif
#include <stdlib.h>
#include <unistd.h>
+#include <inttypes.h>
#include <isc/condition.h>
#include <isc/mem.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h> /* uintptr_t */
-#endif
+#include <inttypes.h>
#include <isc/buffer.h>
#include <isc/bufferlist.h>
#define ISC_PLATFORM_NEEDPTON
#define ISC_PLATFORM_HAVESOCKADDRSTORAGE
-#define ISC_PLATFORM_QUADFORMAT "I64"
-
#define ISC_PLATFORM_NEEDSTRSEP
#define ISC_PLATFORM_NEEDSTRLCPY
#define ISC_PLATFORM_NEEDSTRLCAT
#include <config.h>
#include <stdlib.h>
+#include <inttypes.h>
#include <isc/buffer.h>
#include <isc/dir.h>
cfg_print_uint64(cfg_printer_t *pctx, const cfg_obj_t *obj) {
char buf[32];
- snprintf(buf, sizeof(buf), "%" ISC_PRINT_QUADFORMAT "u",
+ snprintf(buf, sizeof(buf), "%" PRIu64,
obj->value.uint64);
cfg_print_cstr(pctx, buf);
}
#include <config.h>
+#include <inttypes.h>
+
#include <isc/netaddr.h>
#include <isc/print.h>
#include <isc/serial.h>
if (result == ISC_R_SUCCESS && records > maxrecords) {
update_log(client, zone, ISC_LOG_ERROR,
"records in zone (%"
- ISC_PRINT_QUADFORMAT
- "u) exceeds max-records (%u)",
+ PRIu64
+ ") exceeds max-records (%u)",
records, maxrecords);
result = DNS_R_TOOMANYRECORDS;
goto failure;