jwoolley 02/05/17 11:05:24
Modified: . CHANGES
file_io/unix open.c
Log:
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
Revision Changes Path
1.286 +5 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -d -u -r1.285 -r1.286
--- CHANGES 10 May 2002 19:10:58 -0000 1.285
+++ CHANGES 17 May 2002 18:05:24 -0000 1.286
@@ -1,5 +1,10 @@
Changes with APR b1
+ *) Cygwin: the unix version of apr_file_open() must respect the
+ APR_BINARY flag if the underlying platform requires it (in
+ which case we assume O_BINARY is defined in fcntl.h). PR 9185.
+ [Cliff Woolley]
+
*) Linux, AIX: Use crypt_r() instead of crypt() because the native
crypt() is not thread-safe. The misuse of crypt() led to
intermittent failures with Apache basic authentication when crypt
1.95 +5 -0 apr/file_io/unix/open.c
Index: open.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/open.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -u -r1.94 -r1.95
--- open.c 20 Mar 2002 08:54:42 -0000 1.94
+++ open.c 17 May 2002 18:05:24 -0000 1.95
@@ -152,6 +152,11 @@
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);