Fix empty enum typedefs.
Disable DOS specific #pragmas.
Fix implicit function declarations.
Include appropriate headers and provide prototypes.