Using u_int64_t' instead of unsigned long' and `long' to avoid problems
1998-07-30 Martin Baulig <martin@home-of-linux.org> * include/glibtop/*.h: Using `u_int64_t' instead of `unsigned long' and `long' to avoid problems when client is on a 32bit system and the server on a 64bit system.
This commit is contained in:
committed by
Martin Baulig
parent
d18a6cf2ce
commit
902b6a8f16
@@ -69,8 +69,8 @@ glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid)
|
||||
/* parse these two strings separately, skipping the leading "(". */
|
||||
sscanf(tmp + 2, /* skip space after ')' too */
|
||||
"%*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u "
|
||||
"%*d %*d %*d %*d %*d %*d %*u %*u %*d %lu "
|
||||
"%lu %lu", &buf->vsize, &buf->rss, &buf->rss_rlim);
|
||||
"%*d %*d %*d %*d %*d %*d %*u %*u %*d %Lu "
|
||||
"%Lu %Lu", &buf->vsize, &buf->rss, &buf->rss_rlim);
|
||||
|
||||
fclose (f);
|
||||
|
||||
@@ -88,7 +88,7 @@ glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid)
|
||||
|
||||
input [nread] = 0;
|
||||
|
||||
sscanf (input, "%ld %ld %ld",
|
||||
sscanf (input, "%Lu %Lu %Lu",
|
||||
&buf->size, &buf->resident, &buf->share);
|
||||
|
||||
fclose (f);
|
||||
|
||||
Reference in New Issue
Block a user