Putting this in bugzilla at Alex's request: When compiling rawhide procps-2.0.13-8 on AMD64, and presumeably other 64bit architectures, the following compiler warnings are spit out. gcc -O2 -g -pipe -D_GNU_SOURCE -O2 -Wall -Wstrict-prototypes -Wshadow -I/usr/src/build/299867-x86_64/BUILD/procps-2.0.13 -I/usr/include/ncurses -fwritable-strings -c top.c top.c: In function `do_stats': top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 2) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 4) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 5) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 7) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 8) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 10) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 11) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 13) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 14) top.c:1699: warning: long long unsigned int format, long unsigned int arg (arg 16) I'm not sure if this is in the stock source code or if it is due to a patch we're applying, never checked. On the majority of 64bit systems out there, "long" and "long long" are both 64bit, so this probably won't cause any problems on architectures we support currently. I dunno if long is 32bit or 64 bit on sparc or other platforms, but we don't support them anyway. long is however 32bit on Win64, so top won't be portable to Windows XP 64bit edition unless this bug is fixed. ;o)
on amd64 long long is 128 bits iirc
pts/0 mharris@thor:~$ uname -a Linux thor.perf.redhat.com 2.4.21-1.1931.2.393.entsmp #1 SMP Wed Aug 13 21:26:37 EDT 2003 x86_64 x86_64 x86_64 GNU/Linux pts/0 mharris@thor:~$ cat src/types.c #include <stdio.h> int main(void) { printf("sizeof(char)=%d\n", sizeof(char)); printf("sizeof(short)=%d\n", sizeof(short)); printf("sizeof(int)=%d\n", sizeof(int)); printf("sizeof(long)=%d\n", sizeof(long)); printf("sizeof(long long)=%d\n", sizeof(long long)); return 0; } pts/0 mharris@thor:~$ types sizeof(char)=1 sizeof(short)=2 sizeof(int)=4 sizeof(long)=8 sizeof(long long)=8
We have upgraded to procps-3.1.15 Is that better?
Comments from upstream: The top.c code was completely replaced. You should expect numerous warnings though; I enable nearly everything I can. On my system gcc's own headers produce warnings.