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

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -27,6 +27,10 @@
#include <pwd.h>
#include <grp.h>
/* O_BINARY is needed for Cygwin but undefined elsewhere */
#ifndef O_BINARY
#define O_BINARY 0
#endif
#include "xorriso.h"
#include "xorriso_private.h"
@ -64,7 +68,7 @@ int Xorriso_compare_2_contents(struct XorrisO *xorriso, char *common_adr,
respt= xorriso->result_line;
fd1= open(disk_adr, O_RDONLY);
fd1= open(disk_adr, O_RDONLY | O_BINARY);
if(fd1==-1) {
sprintf(respt, "- %s (DISK) : cannot open() : %s\n",
disk_adr, strerror(errno));