diff options
author | jwoolley <jwoolley@13f79535-47bb-0310-9956-ffa450edef68> | 2002-05-17 18:05:24 +0000 |
---|---|---|
committer | jwoolley <jwoolley@13f79535-47bb-0310-9956-ffa450edef68> | 2002-05-17 18:05:24 +0000 |
commit | f05b2c018bce66cbe5278c6475eb7a5e1c9522c5 (patch) | |
tree | 33a6d1173e87662dcd24e836246d09cf4ab72766 /file_io | |
parent | 3eff474cd6f404c56da2413fc656ffdd19ca4be5 (diff) | |
download | libapr-f05b2c018bce66cbe5278c6475eb7a5e1c9522c5.tar.gz |
We must respect the APR_BINARY flag on the Unix implementation of
apr_file_open() if the underlying platform requires it (ie, cygwin).
We currently detect that condition by expecting O_BINARY to be defined.
PR: 9185
Reviewed by: William Rowe
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63409 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/unix/open.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/file_io/unix/open.c b/file_io/unix/open.c index 95cbea085..624b66b71 100644 --- a/file_io/unix/open.c +++ b/file_io/unix/open.c @@ -152,6 +152,11 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, if (flag & APR_TRUNCATE) { oflags |= O_TRUNC; } +#ifdef O_BINARY + if (flag & APR_BINARY) { + oflags |= O_BINARY; + } +#endif if (perm == APR_OS_DEFAULT) { (*new)->filedes = open(fname, oflags, 0666); |