by jhallenworld · 9y ago · 0 comments
off_t for file offsets
ptrdiff_t for memory offsets (vs. size_t for unsigned)
int for return flags
A problem with this is that printf does not have sizes to match these.
That said, the code bases that target both 64- and 8-bit architectures probably aren't that many and both our points are insignificant in those other 99.9% of cases.
For size_t: "%zu"
There's no format for off_t, though. The best you can do is to typecast it to intmax_t, and then use "%jd".