Default linux __xstat gives 16-bit st_uid:s, while i386 __xstat gives 32 bits

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Tue Apr 10 05:46:00 GMT 2001


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



More information about the Libc-alpha mailing list