This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]