From: Johannes Schindelin Date: Mon, 17 Aug 2009 16:58:33 GMT Subject: Re: [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c Message-ID: In-Reply-To: <1250525103-5184-2-git-send-email-lznuaa@gmail.com> Hi, On Tue, 18 Aug 2009, Frank Li wrote: > Windows will convert CR\LF and union code at text mode. > Git doesn't like this. Add O_BINARY flag to open function > > Signed-off-by: Frank Li How about this instead? mingw.c: Use the O_BINARY flag to open files On Windows, non-text files must be opened using the O_BINARY flag. MinGW does this for us automatically, but Microsoft Visual C++ does not. Also, Johannes said that this would be a nice cleanup. BTW what about fopen()? Patch is obviously good. Ciao, Dscho