Change constant names and fix function prototypes.