>>105581052
D's solution of just making ints guaranteed 32 bits etc works pretty well.