Module Name: src Committed By: pgoyette Date: Sun Sep 13 21:46:23 UTC 2009
Modified Files: src/usr.bin/netstat: if.c Log Message: Use PRIu64 for printf'ing stuff. Fixes build breakage on part-amd64 introduced in rev 1.64 (and reverts a partial fix provided in rev 1.65) To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/usr.bin/netstat/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/netstat/if.c diff -u src/usr.bin/netstat/if.c:1.65 src/usr.bin/netstat/if.c:1.66 --- src/usr.bin/netstat/if.c:1.65 Sun Sep 13 19:04:29 2009 +++ src/usr.bin/netstat/if.c Sun Sep 13 21:46:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.65 2009/09/13 19:04:29 elad Exp $ */ +/* $NetBSD: if.c,v 1.66 2009/09/13 21:46:23 pgoyette Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else -__RCSID("$NetBSD: if.c,v 1.65 2009/09/13 19:04:29 elad Exp $"); +__RCSID("$NetBSD: if.c,v 1.66 2009/09/13 21:46:23 pgoyette Exp $"); #endif #endif /* not lint */ @@ -216,7 +216,7 @@ continue; } - printf("%-5s %-5qu ", name, ifd->ifi_mtu); + printf("%-5s %-5" PRIu64, name, ifd->ifi_mtu); print_addr(rti_info[RTAX_IFP], rti_info, ifd); break; @@ -234,7 +234,7 @@ get_rtaddrs(ifam->ifam_addrs, sa, rti_info); - printf("%-5s %-5qu ", name, ifd->ifi_mtu); + printf("%-5s %-5" PRIu64, name, ifd->ifi_mtu); print_addr(rti_info[RTAX_IFA], rti_info, ifd); break; } @@ -589,16 +589,16 @@ iftot_print(struct iftot *cur, struct iftot *old) { if (bflag) - printf("%10llu %8.8s %10llu %5.5s", - (unsigned long long)(cur->ift_ib - old->ift_ib), " ", - (unsigned long long)(cur->ift_ob - old->ift_ob), " "); + printf("%10" PRIu64 "%8.8s %10" PRIu64 "%5.5s", + cur->ift_ib - old->ift_ib, " ", + cur->ift_ob - old->ift_ob, " "); else - printf("%8llu %5llu %8llu %5llu %5llu", - (unsigned long long)(cur->ift_ip - old->ift_ip), - (unsigned long long)(cur->ift_ie - old->ift_ie), - (unsigned long long)(cur->ift_op - old->ift_op), - (unsigned long long)(cur->ift_oe - old->ift_oe), - (unsigned long long)(cur->ift_co - old->ift_co)); + printf("%8" PRIu64 "%5" PRIu64 "%8" PRIu64 "%5" PRIu64 "%5" PRIu64, + cur->ift_ip - old->ift_ip, + cur->ift_ie - old->ift_ie, + cur->ift_op - old->ift_op, + cur->ift_oe - old->ift_oe, + cur->ift_co - old->ift_co); if (dflag) printf(" %5llu", /* XXX ifnet.if_snd.ifq_drops - ip->ift_dr); */ @@ -609,16 +609,16 @@ iftot_print_sum(struct iftot *cur, struct iftot *old) { if (bflag) - printf(" %10llu %8.8s %10llu %5.5s", - (unsigned long long)(cur->ift_ib - old->ift_ib), " ", - (unsigned long long)(cur->ift_ob - old->ift_ob), " "); + printf(" %10" PRIu64 "%8.8s %10" PRIu64 "%5.5s", + cur->ift_ib - old->ift_ib, " ", + cur->ift_ob - old->ift_ob, " "); else - printf(" %8llu %5llu %8llu %5llu %5llu", - (unsigned long long)(cur->ift_ip - old->ift_ip), - (unsigned long long)(cur->ift_ie - old->ift_ie), - (unsigned long long)(cur->ift_op - old->ift_op), - (unsigned long long)(cur->ift_oe - old->ift_oe), - (unsigned long long)(cur->ift_co - old->ift_co)); + printf(" %8" PRIu64 "%5" PRIu64 "%8" PRIu64 "%5" PRIu64 "%5" PRIu64, + cur->ift_ip - old->ift_ip, + cur->ift_ie - old->ift_ie, + cur->ift_op - old->ift_op, + cur->ift_oe - old->ift_oe, + cur->ift_co - old->ift_co); if (dflag) printf(" %5llu", (unsigned long long)(cur->ift_dr - old->ift_dr));