statx struct's stx_size pointer compatibility with uint64_t/size_t
Florian Weimer
fweimer@redhat.com
Wed Dec 18 11:51:00 GMT 2019
* Dominique Martinet:
> This makes sense to me to avoid multiplying header files for the
> different arches, so if anything I would be tempted to ask 'why is
> stdint.h uint64_t defined with just long'?
It's not a compiler-provided header. When it was added to glibc in the
90s, I don't think long long support was universal among 64-bit
compilers, and you could not just drop the type (which might have been
acceptable on 32-bit architectures).
Anyway, looking at this, it looks like we should define struct statx
with unsigned long long int in our copy instead of uint64_t. I filed
bug 25292 to track this. I guess it's just another thing to keep in
mind when adding system call support to glibc headers.
Thanks,
Florian
More information about the Libc-alpha
mailing list