need to open files in binary mode on windows.
disable some compiler warnings.