While investigating the case of some packages responsible for
uninstallability on the s390x
architecture, I stumbled upon one
FTBFS on a single architecture, reported as
#673590 (<insert some nice words
about software shipping with a decent testsuite>).
Given the int
versus size_t
question was asked, I grabbed this old
(it’s UNIX!) reference:
64-bit and Data Size Neutrality.
Among other things, it describes the “everything is 32-bit” to “64-bit is becoming the new standard” slow conversion process, where keeping compatibility with existing applications was a high priority. It has a nice description of so-called C data models, making it possible to refer to them quickly: LP32 and ILP32 in the 32-bit world; ILP64, LLP64, and LP64 in the 64-bit world. I won’t go into detail here, this page has a nice table and lots of explanations about pros and cons for those.
(On a personal note, I discovered those on xorg-devel@
when I saw
patches floating around, which were about optimizing data sizes for
this or that data model, by picking the right types.)
While standards may be boring, this page makes it really easy to understand which data types to use, to ensure the best 32/64-bit compatibility possible. It’s even full of dos and don’ts. See the second half (Porting Issues) for details.