[PATCH] top.c: compile error on gcc 2.95
Rich Felker
dalias at aerifal.cx
Fri May 19 01:55:22 UTC 2006
not sure if gcc 2.95 compatibility is desired or not, but if so, this
patch removes the non-beginning-of-function declaration from top.c so
that it compiles.
rich
-------------- next part --------------
Index: procps/top.c
===================================================================
--- procps/top.c (revision 15108)
+++ procps/top.c (working copy)
@@ -338,12 +338,13 @@
while (count--) {
div_t pmem = div( (s->rss*pmem_scale) >> pmem_shift, 10);
int col = scr_width+1;
+ USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE(div_t pcpu;)
if (s->rss >= 100*1024)
sprintf(rss_str_buf, "%6ldM", s->rss/1024);
else
sprintf(rss_str_buf, "%7ld", s->rss);
- USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE(div_t pcpu = div((s->pcpu*pcpu_scale) >> pcpu_shift, 10));
+ USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE(pcpu = div((s->pcpu*pcpu_scale) >> pcpu_shift, 10));
col -= printf("\n%5d %-8s %s %s%6d%3u.%c" \
USE_FEATURE_TOP_CPU_USAGE_PERCENTAGE("%3u.%c") " ",
s->pid, s->user, s->state, rss_str_buf, s->ppid,
More information about the busybox
mailing list