29 Mar
2014
29 Mar
'14
1:41 p.m.
It sounds like the admins had done a 32-bit gcc install on the 64-bit server I was using, which would explain the 32-bit long size I was seeing. I guess they wanted it to run 64-bit apps, but wanted anything built on it to run on 32-bit platforms. Or perhaps they just messed up the gcc install. Tom John Aspinall writes:
Speaking as someone who does this as his "day job", Joerg is right about longs, on 64 bit platforms, being 64 bits, except on Windows. The fairly standard compiler flag for this is "LP64", or some nearby variant (it's "_LP64" on gcc). LP64 is just shorthand for "longs and pointers are 64 bits". It also makes a good search string for more than you ever wanted to know on this subject. - John Aspinall