summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-09-14 08:32:20 +0000
committerdfr <dfr@FreeBSD.org>1998-09-14 08:32:20 +0000
commit788959f35b591c711084be858e5a1b815067fa50 (patch)
treef445ff26e4335d091585e87869d75d05b8ff1c4e /bin/ps/print.c
parentdd529a7ea9097f1384219ac629af33aa8e48a25e (diff)
downloadFreeBSD-src-788959f35b591c711084be858e5a1b815067fa50.zip
FreeBSD-src-788959f35b591c711084be858e5a1b815067fa50.tar.gz
Portability fixes when sizeof(int) != sizeof(long).
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 97ce8f3..09fbf8e 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#endif
static const char rcsid[] =
- "$Id: print.c,v 1.30 1998/06/28 18:26:18 bde Exp $";
+ "$Id: print.c,v 1.31 1998/06/28 21:05:48 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -400,8 +400,8 @@ wchan(k, ve)
(void)printf("%-*.*s", v->width, v->width,
KI_EPROC(k)->e_wmesg);
else
- (void)printf("%-*x", v->width,
- (int)KI_PROC(k)->p_wchan &~ KERNBASE);
+ (void)printf("%-*lx", v->width,
+ (long)KI_PROC(k)->p_wchan &~ KERNBASE);
} else
(void)printf("%-*s", v->width, "-");
}
@@ -655,6 +655,12 @@ printval(bp, v)
case USHORT:
(void)printf(ofmt, v->width, *(u_short *)bp);
break;
+ case INT:
+ (void)printf(ofmt, v->width, *(int *)bp);
+ break;
+ case UINT:
+ (void)printf(ofmt, v->width, *(u_int *)bp);
+ break;
case LONG:
(void)printf(ofmt, v->width, *(long *)bp);
break;
OpenPOWER on IntegriCloud