You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2004/03/24 21:09:19 UTC
cvs commit: apr/include apr_file_io.h
jorton 2004/03/24 12:09:18
Modified: . Tag: APR_0_9_BRANCH CHANGES
file_io/unix Tag: APR_0_9_BRANCH open.c
include Tag: APR_0_9_BRANCH apr_file_io.h
Log:
* include/apr_file_io.h: Add APR_LARGEFILE flag, with warning.
* file_io/unix/open.c (apr_file_open): Map APR_LARGEFILE onto
O_LARGEFILE.
Revision Changes Path
No revision
No revision
1.426.2.12 +4 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.426.2.11
retrieving revision 1.426.2.12
diff -w -d -u -r1.426.2.11 -r1.426.2.12
--- CHANGES 7 Mar 2004 21:09:00 -0000 1.426.2.11
+++ CHANGES 24 Mar 2004 20:09:18 -0000 1.426.2.12
@@ -1,5 +1,9 @@
Changes with APR 0.9.5
+ *) Add APR_LARGEFILE flag to allow opening files with the
+ O_LARGEFILE flag; not recommended for general use, see
+ include/apr_file_io.h. [Joe Orton]
+
*) Various build fixes: thread_rwlock.c on some Solaris platforms
(PR 22990); filestat.c on ReliantUnix (PR 22990); config.status
on IRIX (PR 19251). [Various]
No revision
No revision
1.111.2.2 +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.111.2.1
retrieving revision 1.111.2.2
diff -w -d -u -r1.111.2.1 -r1.111.2.2
--- open.c 13 Feb 2004 09:33:43 -0000 1.111.2.1
+++ open.c 24 Mar 2004 20:09:18 -0000 1.111.2.2
@@ -98,6 +98,11 @@
oflags |= O_BINARY;
}
#endif
+#ifdef O_LARGEFILE
+ if (flag & APR_LARGEFILE) {
+ oflags |= O_LARGEFILE;
+ }
+#endif
#if APR_HAS_THREADS
if ((flag & APR_BUFFERED) && (flag & APR_XTHREAD)) {
No revision
No revision
1.144.2.2 +14 -0 apr/include/apr_file_io.h
Index: apr_file_io.h
===================================================================
RCS file: /home/cvs/apr/include/apr_file_io.h,v
retrieving revision 1.144.2.1
retrieving revision 1.144.2.2
diff -w -d -u -r1.144.2.1 -r1.144.2.2
--- apr_file_io.h 13 Feb 2004 09:33:44 -0000 1.144.2.1
+++ apr_file_io.h 24 Mar 2004 20:09:18 -0000 1.144.2.2
@@ -69,6 +69,20 @@
is opened */
#define APR_SENDFILE_ENABLED 0x01000 /**< Advisory flag that this file should
support apr_sendfile operation */
+#define APR_LARGEFILE 0x04000 /**< Platform dependent flag to enable large file
+ support; WARNING see below. */
+
+/** @warning The APR_LARGEFILE flag only has effect on some platforms
+ * where sizeof(apr_off_t) == 4. Where implemented, it allows opening
+ * and writing to a file which exceeds the size which can be
+ * represented by apr_off_t (2 gigabytes). When a file's size does
+ * exceed 2Gb, apr_file_info_get() will fail with an error on the
+ * descriptor, likewise apr_stat()/apr_lstat() will fail on the
+ * filename. apr_dir_read() will fail with APR_INCOMPLETE on a
+ * directory entry for a large file depending on the particular
+ * APR_FINFO_* flags. Generally, it is not recommended to use this
+ * flag. */
+
/** @} */
/**