Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31346 )
Change subject: libpayload/sys/types.h: Add definition for off_t ......................................................................
Patch Set 3:
Patch Set 3:
I don't understand how this information can help during programming? ;)
Isn't it always helpful to know what size the types you're using are?
It is helpful to know the minimum size (which is tricky in case of `ssize_t` and `off_t`) but knowing the exact size and taking it into account leads to unportable code. If you need exact sizes, just use the stdint types?
I mean, sometimes it doesn't matter, but sometimes it does. When I see an ssize_t I know immediately how many bytes it must have on every architecture. When I see a 'long' (or some variation of it), I need to start digging to be sure.
In that case you already consider unportable code, don't you? If we see a `long` somewhere where 32 bits aren't enough, sure we can start digging to be sure if it's ok in that particular case. But shouldn't we fix the code (to be portable) instead?