# Re: \[PATCH\] uapi: Make \_\_{u,s}64 match {u,}int64\_t in userspace

- From: David Howells \<dhowells@redhat.com\>
- Date: 2021-11-23 16:47:40 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2021/11/1583049
- Thread: https://ratatoskr.run/linux-api/2021/11/1581823/t.md

```text
Cyril Hrubis [ref] wrote:

> This changes the __u64 and __s64 in userspace on 64bit platforms from
> long long (unsigned) int to just long (unsigned) int in order to match
> the uint64_t and int64_t size in userspace.

Can you guarantee this won't break anything in userspace?  Granted the types
*ought* to be the same size, but anyone who's written code on the basis that
these are "(unsigned) long long int" may suddenly get a bunch of warnings
where they didn't before from the C compiler.  Anyone using C++, say, may find
their code no longer compiles because overloaded function matching no longer
finds a correct match.

Also, whilst your point about PRIu64 and PRId64 modifiers in printf() is a
good one, it doesn't help someone whose compiler doesn't support that (I don't
know if anyone's likely to encounter such these days).  At the moment, I think
a user can assume that %llu will work correctly both on 32-bit and 64-bit on
all arches, but you're definitely breaking that assumption.

David

```
