[Various] struct stat
Martin v. Loewis
martin@mira.isdn.cs.tu-berlin.de
Thu Apr 1 00:00:00 GMT 1999
> There's a discussion on linux-kernel about glibc's definition of field
> st_dev in struct stat for compilers other than gcc. Perhaps somebody
> likes to comment.
It seems that glibc is in error; Matthew Wilcox' quote clearly
indicates that dev_t should be an arithmetic type.
This apparently relates to FAQ entry 2.4, which suggests to report
such a case as a bug.
The best fix I can see is to define __dev_t as __uint64_t, and to
always define __uint64_t (for __GNUC__, still use
__extension__). Then, if there are bug reports that a certain compiler
used on Linux does not support long long, explicitly fall back to
__u_quad_t for that compiler, perhaps with a #warning.
Regards,
Martin
More information about the Libc-alpha
mailing list