Equipped all non-system-dependent open(2) calls with O_BINARY

This commit is contained in:
2014-11-26 16:47:40 +00:00
parent 33fee4725c
commit 2c838f7175
8 changed files with 54 additions and 20 deletions

View File

@ -34,6 +34,12 @@
#endif
#endif
/* O_BINARY is needed for Cygwin but undefined elsewhere */
#ifndef O_BINARY
#define O_BINARY 0
#endif
#ifdef Xorriso_standalonE
#ifdef Xorriso_with_libjtE
@ -2025,7 +2031,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
if(xorriso->fs >= 64)
fd= burn_os_open_track_src(track_source, O_RDONLY, 0);
else
fd= open(track_source, O_RDONLY);
fd= open(track_source, O_RDONLY | O_BINARY);
if(fd>=0)
if(fstat(fd,&stbuf)!=-1)
if((stbuf.st_mode&S_IFMT)==S_IFREG)