Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.