rl2: use fixed-width integer types where appropriate