Resync with master.

This commit is contained in:
Oliver Jowett 2014-10-01 12:44:07 +01:00
commit e008f0fc3f
5 changed files with 19 additions and 9 deletions

View file

@ -867,7 +867,13 @@ int main(int argc, char **argv) {
} else {
if (Modes.filename[0] == '-' && Modes.filename[1] == '\0') {
Modes.fd = STDIN_FILENO;
} else if ((Modes.fd = open(Modes.filename,O_RDONLY)) == -1) {
} else if ((Modes.fd = open(Modes.filename,
#ifdef _WIN32
(O_RDONLY | O_BINARY)
#else
(O_RDONLY)
#endif
)) == -1) {
perror("Opening data file");
exit(1);
}