portability enhancements, allow 32-bit platform