diff options
author | L Peter Deutsch <lpd@ghostscript.com> | 2000-07-05 17:08:27 +0000 |
---|---|---|
committer | L Peter Deutsch <lpd@ghostscript.com> | 2000-07-05 17:08:27 +0000 |
commit | 617001d2e938d0c216b9bd23332867e2d4256693 (patch) | |
tree | ff933b3d414925cb685a858f1e3221cb5b462e7c | |
parent | c73a052894d5e7ad0ab270192c166e6b4e61cb9b (diff) | |
download | ghostpdl-617001d2e938d0c216b9bd23332867e2d4256693.tar.gz |
Fix: Watcom C requires the non-standard O_BINARY mode flag when opening
(with open) a file that will later be opened in binary mode with fdopen.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@559 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | gs/src/gpmisc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gs/src/gpmisc.c b/gs/src/gpmisc.c index d38d5c639..2b0a27898 100644 --- a/gs/src/gpmisc.c +++ b/gs/src/gpmisc.c @@ -68,6 +68,12 @@ gp_fopentemp(const char *fname, const char *mode) case 'w': flags |= O_CREAT | O_WRONLY | O_TRUNC; break; +#ifdef O_BINARY + /* Watcom C insists on this non-ANSI flag being set. */ + case 'b': + flags |= O_BINARY; + break; +#endif case '+': flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR; break; |