statx struct's stx_size pointer compatibility with uint64_t/size_t
Florian Weimer
fweimer@redhat.com
Wed Jan 8 13:21:00 GMT 2020
* David Howells:
> Florian Weimer <fweimer@redhat.com> wrote:
>
>> 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)
>
> Do Linux's __uXX types predate stdint.h by a few years?
Yes, certainly __u64 predates widespread compiler support for long long.
>> and whether the kernel definition can be changed at this point
>
> Changing it would require an awful lot of printf format overhaul.
Yes, we probably should add __glibc_u64 etc. types with the same
definition as in the kernel. For struct statx, it does not matter, but
<linux/types.h> is not namespace-clean, and that may be a problem in
other contexts. Using __glibc_u64 etc. types consistently seems
preferable.
Thanks,
Florian
More information about the Libc-help
mailing list