This is the mail archive of the libc-alpha@cygnus.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]

Re: [Various] struct stat


> 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


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