ret = 0;
if (verbose) {
- BIO_printf(bio_err, "bytes read :%8"PRIu64"\n", BIO_number_read(in));
- BIO_printf(bio_err, "bytes written:%8"PRIu64"\n", BIO_number_written(out));
+ BIO_printf(bio_err, "bytes read :%8"BIO_PRI64"u\n", BIO_number_read(in));
+ BIO_printf(bio_err, "bytes written:%8"BIO_PRI64"u\n", BIO_number_written(out));
}
end:
ERR_print_errors(bio_err);
int ilen = (int) outlen;
if (outlen < len || ilen < 0 || outlen != (size_t)ilen) {
- BIO_printf(bio_err, "%s: %" PRIu64 "-byte buffer too large to hexencode\n",
+ BIO_printf(bio_err, "%s: %"BIO_PRI64"u-byte buffer too large to hexencode\n",
opt_getprog(), (uint64_t)len);
exit(1);
}
#endif
BIO_printf(bio,
- "---\nSSL handshake has read %" PRIu64
- " bytes and written %" PRIu64 " bytes\n",
+ "---\nSSL handshake has read %"BIO_PRI64"u"
+ " bytes and written %"BIO_PRI64"u bytes\n",
BIO_number_read(SSL_get_rbio(s)),
BIO_number_written(SSL_get_wbio(s)));
}
int indent, const ASN1_PCTX *pctx)
{
if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED)
- return BIO_printf(out, "%jd\n", *(int64_t *)pval);
- return BIO_printf(out, "%ju\n", *(uint64_t *)pval);
+ return BIO_printf(out, "%"BIO_PRI64"d\n", *(int64_t *)pval);
+ return BIO_printf(out, "%"BIO_PRI64"u\n", *(uint64_t *)pval);
}
/* 32-bit variants */
# endif
/*
- * We need a format operator for some client tools for uint64_t. If inttypes.h
- * isn't available or did not define it, just go with hard-coded.
+ * BIO_printf format modifier for [u]int64_t.
*/
-# if defined(OPENSSL_SYS_UEFI)
-# define PRIu64 "Lu"
-# endif
-# ifndef PRIu64
-# ifdef SIXTY_FOUR_BIT_LONG
-# define PRIu64 "lu"
-# else
-# define PRIu64 "llu"
-# endif
+# if defined(__LP64__) || (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__==8)
+# define BIO_PRI64 "l" /* 'll' does work "universally", but 'l' is
+ * here to shut -Wformat warnings in LP64... */
+# else
+# define BIO_PRI64 "ll"
# endif
# if !defined(NDEBUG) && !defined(OPENSSL_NO_STDIO)