Fixes so that it compiles again 12 years after.

Mainly, the EOF macro was no more recognized. Changed EOF to -1.
Even if officially EOF is just a negative number, it's much safer
than to rely on a stupid macro. What if a bozo #defines EOF differently?

Also, more 'ioxxxx' had to be changed to 'std::ioxxxx' (see migstream)