change line endings and fix for gcc