summaryrefslogtreecommitdiff
path: root/filter/filec.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2004-10-12 08:37:25 +0200
committerTor Andersson <tor@ghostscript.com>2004-10-12 08:37:25 +0200
commit4ee01bbc747ce85b5ccfeed3e934dfb76fb14482 (patch)
treecde2ab7ff286056127ca4d7929ece9dc0b0216ca /filter/filec.c
parent358811630686460d6b0a96021a1bcb4c3124fb03 (diff)
downloadmupdf-4ee01bbc747ce85b5ccfeed3e934dfb76fb14482.tar.xz
merged seokgyos win32 fixes
Diffstat (limited to 'filter/filec.c')
-rw-r--r--filter/filec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/filec.c b/filter/filec.c
index 0c4d034a..34db4d12 100644
--- a/filter/filec.c
+++ b/filter/filec.c
@@ -21,11 +21,11 @@ fz_openfile(fz_file **filep, char *path, int mode)
realmode = 0;
if (mode == FZ_READ)
- realmode = O_RDONLY;
+ realmode = O_BINARY | O_RDONLY;
if (mode == FZ_WRITE)
- realmode = O_WRONLY | O_CREAT | O_TRUNC;
+ realmode = O_BINARY | O_WRONLY | O_CREAT | O_TRUNC;
if (mode == FZ_APPEND)
- realmode = O_WRONLY;
+ realmode = O_BINARY | O_WRONLY;
fd = open(path, realmode, 0644);
if (fd == -1)