This is the mail archive of the libc-help@sourceware.org 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]
Other format: [Raw text]

Re: statx struct's stx_size pointer compatibility with uint64_t/size_t


* Dominique Martinet:

> What would be the "recommended" way of doing this?
> Any chance the field could change to be uint64_t-compatible in the
> future? Not sure what that implies regarding e.g. backwards
> compatibility though...

This is a tricky subject.  We already have a copy of the type with
uint64_t fields in the installed glibc headers, but this is only used if
the kernel definition is not available.

We do not want to duplicate kernel headers too much because it causes
problems if both glibc headers and kernel headers are included in the
same translation unit.  That in turn makes it difficult to use new
kernel features by only updating the kernel headers.

I do not know why the kernel definition of __u64 does not follow that of
uint64_t in <stdint.h> (or why we even have that __u64 type), and
whether the kernel definition can be changed at this point.  We can fix
this issue with preprocessor magic, but I am not entirely sure if this
is a good idea.

If you want, you could bring this up on some kernel lists (at least
linux-api), and Cc: libc-alpha, or can do that for you.

Thanks,
Florian


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