Before replacing io.h with linux-style fs readers
Some platform-dependent fixes.