This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Default linux __xstat gives 16-bit st_uid:s, while i386 __xstat gives 32 bits
- To: libc-alpha at sources dot redhat dot com
- Subject: Default linux __xstat gives 16-bit st_uid:s, while i386 __xstat gives 32 bits
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Tue, 10 Apr 2001 14:45:17 +0200
That is, while the "i386-specific" linux version uses the stat64
syscall when available, the default linux version uses stat.
Assuming the target has a kernel stat definition as in
linux/kernel_stat.h and the stat64 struct as in
sysdeps/unix/sysv/linux/bits/stat.h, this will make st_uid and
st_gid be passed back effectively truncated to 16 bits (really:
"unsigned short"), while "struct stat" as defined by glibc has
them as 32 bits (really: "unsigned int").
To wit, is there a reason why the default
sysdeps/unix/sysv/linux/xstat.c does not do as in
sysdeps/unix/sysv/linux/i386/xstat.c and use the stat64 kernel
call when it is available?
If there is, I suggest it be stated in
sysdeps/unix/sysv/linux/xstat.c to avoid confusing others. :-)
brgds, H-P