do build posix tools buildable on 64-bit host
change prototypes for better portability