Re: [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 17, 2009, 16:58 UTC
- Message-ID
- <alpine.DEB.1.00.0908171856290.4991@intel-tinevez-2-302>
- 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 <lznuaa@gmail.com>
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