Module Name: src Committed By: dsl Date: Sat Feb 6 10:50:52 UTC 2010
Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: packet-parse.c validate.c Log Message: Fix printf formats on amd64 (and probably other 64bit systems). To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c cvs rdiff -u -r1.26 -r1.27 \ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.28 src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.29 --- src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.28 Sat Feb 6 02:24:33 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c Sat Feb 6 10:50:52 2010 @@ -58,7 +58,7 @@ #if defined(__NetBSD__) __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: packet-parse.c,v 1.28 2010/02/06 02:24:33 agc Exp $"); +__RCSID("$NetBSD: packet-parse.c,v 1.29 2010/02/06 10:50:52 dsl Exp $"); #endif #ifdef HAVE_OPENSSL_CAST_H @@ -2076,7 +2076,7 @@ pkt.u.sig.info.v4_hashlen = stream->readinfo.alength - pkt.u.sig.v4_hashstart; if (__ops_get_debug_level(__FILE__)) { - fprintf(stderr, "v4_hashlen=%d\n", pkt.u.sig.info.v4_hashlen); + fprintf(stderr, "v4_hashlen=%zd\n", pkt.u.sig.info.v4_hashlen); } /* copy hashed subpackets */ Index: src/crypto/external/bsd/netpgp/dist/src/lib/validate.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.26 src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.27 --- src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.26 Sat Feb 6 02:24:33 2010 +++ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c Sat Feb 6 10:50:52 2010 @@ -54,7 +54,7 @@ #if defined(__NetBSD__) __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: validate.c,v 1.26 2010/02/06 02:24:33 agc Exp $"); +__RCSID("$NetBSD: validate.c,v 1.27 2010/02/06 10:50:52 dsl Exp $"); #endif #include <sys/types.h> @@ -204,7 +204,7 @@ case OPS_V4: if (__ops_get_debug_level(__FILE__)) { - (void) fprintf(stderr, "v4_hashlen %u\n", + (void) fprintf(stderr, "v4_hashlen %zu\n", sig->info.v4_hashlen); hexdump(stderr, sig->info.v4_hashed, sig->info.v4_hashlen, " "); @@ -594,26 +594,26 @@ fmtsecs(int64_t n, char *buf, size_t size) { if (n > 365 * 24 * 60 * 60) { - (void) snprintf(buf, size, "%lld years", n / (365 * 24 * 60 * 60)); + (void) snprintf(buf, size, "%" PRId64 " years", n / (365 * 24 * 60 * 60)); return buf; } if (n > 30 * 24 * 60 * 60) { - (void) snprintf(buf, size, "%lld months", n / (30 * 24 * 60 * 60)); + (void) snprintf(buf, size, "%" PRId64 " months", n / (30 * 24 * 60 * 60)); return buf; } if (n > 24 * 60 * 60) { - (void) snprintf(buf, size, "%lld days", n / (24 * 60 * 60)); + (void) snprintf(buf, size, "%" PRId64 " days", n / (24 * 60 * 60)); return buf; } if (n > 60 * 60) { - (void) snprintf(buf, size, "%lld hours", n / (60 * 60)); + (void) snprintf(buf, size, "%" PRId64 " hours", n / (60 * 60)); return buf; } if (n > 60) { - (void) snprintf(buf, size, "%lld minutes", n / 60); + (void) snprintf(buf, size, "%" PRId64 " minutes", n / 60); return buf; } - (void) snprintf(buf, size, "%lld seconds", n); + (void) snprintf(buf, size, "%" PRId64 " seconds", n); return buf; }