Bug 103492 - top from procps in rawhide isn't portable to Windows XP 64bit edition
top from procps in rawhide isn't portable to Windows XP 64bit edition
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: procps (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-01 02:53 EDT by Mike A. Harris
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-29 07:47:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike A. Harris 2003-09-01 02:53:26 EDT
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)
Comment 1 Arjan van de Ven 2003-09-01 02:55:23 EDT
on amd64 long long is 128 bits iirc
Comment 2 Mike A. Harris 2003-09-01 03:25:20 EDT
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
Comment 3 Daniel Walsh 2004-03-25 10:41:23 EST
We have upgraded to procps-3.1.15  Is that better?
Comment 4 Daniel Walsh 2004-03-29 07:47:13 EST
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.


Note You need to log in before you can comment on or make changes to this bug.