You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by br...@apache.org on 2003/07/08 08:26:48 UTC
cvs commit: apr/include apr_file_io.h
brane 2003/07/07 23:26:48
Modified: include apr_file_io.h
Log:
Added a note to the apr_file_open_flags about the range of values
reserved for the implementation, and changed the flag defines to use
hex values instead of decimal for clarity.
Revision Changes Path
1.143 +17 -14 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.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- apr_file_io.h 7 Jul 2003 22:44:11 -0000 1.142
+++ apr_file_io.h 8 Jul 2003 06:26:48 -0000 1.143
@@ -86,25 +86,28 @@
* @{
*/
-#define APR_READ 1 /**< Open the file for reading */
-#define APR_WRITE 2 /**< Open the file for writing */
-#define APR_CREATE 4 /**< Create the file if not there */
-#define APR_APPEND 8 /**< Append to the end of the file */
-#define APR_TRUNCATE 16 /**< Open the file and truncate to 0 length */
-#define APR_BINARY 32 /**< Open the file in binary mode */
-#define APR_EXCL 64 /**< Open should fail if APR_CREATE and file
+/* Note to implementors: Values in the range 0x00100000--0x80000000
+ are reserved for platform-specific values. */
+
+#define APR_READ 0x00001 /**< Open the file for reading */
+#define APR_WRITE 0x00002 /**< Open the file for writing */
+#define APR_CREATE 0x00004 /**< Create the file if not there */
+#define APR_APPEND 0x00008 /**< Append to the end of the file */
+#define APR_TRUNCATE 0x00010 /**< Open the file and truncate to 0 length */
+#define APR_BINARY 0x00020 /**< Open the file in binary mode */
+#define APR_EXCL 0x00040 /**< Open should fail if APR_CREATE and file
exists. */
-#define APR_BUFFERED 128 /**< Open the file for buffered I/O */
-#define APR_DELONCLOSE 256 /**< Delete the file after close */
-#define APR_XTHREAD 512 /**< Platform dependent tag to open the file
+#define APR_BUFFERED 0x00080 /**< Open the file for buffered I/O */
+#define APR_DELONCLOSE 0x00100 /**< Delete the file after close */
+#define APR_XTHREAD 0x00200 /**< Platform dependent tag to open the file
for use across multiple threads */
-#define APR_SHARELOCK 1024 /**< Platform dependent support for higher
+#define APR_SHARELOCK 0x00400 /**< Platform dependent support for higher
level locked read/write access to support
writes across process/machines */
-#define APR_FILE_NOCLEANUP 2048 /**< Do not register a cleanup when the file
+#define APR_FILE_NOCLEANUP 0x00800 /**< Do not register a cleanup when the file
is opened */
-#define APR_SENDFILE_ENABLED 4096 /**< Advisory flag that this file should
- support apr_sendfile operation */
+#define APR_SENDFILE_ENABLED 0x01000 /**< Advisory flag that this file should
+ support apr_sendfile operation */
/** @} */
/**