correct some prototypes for better portability