3 ms·
the whole LP64 vs LLP64 'issue' is a massive red herring. even in the most despicable code bases this is relatively quick and easy to 'fix', its just one of th
by jheriko 12y ago
the whole LP64 vs LLP64 'issue' is a massive red herring.
even in the most despicable code bases this is relatively quick and easy to 'fix', its just one of those things that on the face of it looks like a lot of work, and is genuinely a brainless chore of find and replace with care.
its worth doing right anyway for plenty of reasons beyond portability, like readability and maintainability.
using long on its own imo is a code smell. except for android (and maybe linux, i can't remember otoh) long long is 64-bit and int is 32. but more generally you can macro it away or use some standard size type header and do the replacements to fix it.
the real problems i've seen with 64-bit portability are from bad serialisation code, where struct padding breaks things, and hacks that rely on pointer casts to ints etc. those are less easy because you can't find/replace them and so it requires thought, not just care, to remove those issues safely.