Module Name: src Committed By: mrg Date: Fri Sep 23 07:31:39 UTC 2011
Modified Files: src/usr.bin/fstat: fstat.c Log Message: apply some (uintptr_t) so that printing printers works on i386 (likely all 32 bit.) To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/usr.bin/fstat/fstat.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/fstat/fstat.c diff -u src/usr.bin/fstat/fstat.c:1.93 src/usr.bin/fstat/fstat.c:1.94 --- src/usr.bin/fstat/fstat.c:1.93 Thu Sep 22 17:27:50 2011 +++ src/usr.bin/fstat/fstat.c Fri Sep 23 07:31:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.93 2011/09/22 17:27:50 christos Exp $ */ +/* $NetBSD: fstat.c,v 1.94 2011/09/23 07:31:39 mrg Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95"; #else -__RCSID("$NetBSD: fstat.c,v 1.93 2011/09/22 17:27:50 christos Exp $"); +__RCSID("$NetBSD: fstat.c,v 1.94 2011/09/23 07:31:39 mrg Exp $"); #endif #endif /* not lint */ @@ -1032,14 +1032,14 @@ default: /* print protocol number and socket address */ snprintf(fbuf, sizeof(fbuf), " %d %jx", proto.pr_protocol, - (uintmax_t)sock); + (uintmax_t)(uintptr_t)sock); break; } if (fbuf[0] || lbuf[0]) printf(" %s%s%s", fbuf, (fbuf[0] && lbuf[0]) ? " <-> " : "", lbuf); else if (so.so_pcb) - printf(" %jx", (uintmax_t)so.so_pcb); + printf(" %jx", (uintmax_t)(uintptr_t)so.so_pcb); (void)printf("\n"); return; bad: