typo fix
obsolete code removed
warnings/errors added when on perlio=stdio/Win32