Changeset 23974 in vbox for trunk/include/iprt
- Timestamp:
- Oct 22, 2009 12:41:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/file.h
r23973 r23974 71 71 * @{ */ 72 72 /** Open the file with read access. */ 73 #define RTFILE_O_READ 0x0000000173 #define RTFILE_O_READ UINT32_C(0x00000001) 74 74 /** Open the file with write access. */ 75 #define RTFILE_O_WRITE 0x0000000275 #define RTFILE_O_WRITE UINT32_C(0x00000002) 76 76 /** Open the file with read & write access. */ 77 #define RTFILE_O_READWRITE 0x0000000377 #define RTFILE_O_READWRITE UINT32_C(0x00000003) 78 78 /** The file access mask. 79 79 * @remarks The value 0 is invalid. */ 80 #define RTFILE_O_ACCESS_MASK 0x0000000380 #define RTFILE_O_ACCESS_MASK UINT32_C(0x00000003) 81 81 82 82 /** Open file in APPEND mode, so all writes to the file handle will … … 84 84 * @remarks It is ignored if write access is not requested, that is 85 85 * RTFILE_O_WRITE is not set. */ 86 #define RTFILE_O_APPEND 0x0000000487 /* 0x00000008is unused atm. */86 #define RTFILE_O_APPEND UINT32_C(0x00000004) 87 /* UINT32_C(0x00000008) is unused atm. */ 88 88 89 89 /** Sharing mode: deny none. */ 90 #define RTFILE_O_DENY_NONE 0x0000008090 #define RTFILE_O_DENY_NONE UINT32_C(0x00000080) 91 91 /** Sharing mode: deny read. */ 92 #define RTFILE_O_DENY_READ 0x0000001092 #define RTFILE_O_DENY_READ UINT32_C(0x00000010) 93 93 /** Sharing mode: deny write. */ 94 #define RTFILE_O_DENY_WRITE 0x0000002094 #define RTFILE_O_DENY_WRITE UINT32_C(0x00000020) 95 95 /** Sharing mode: deny read and write. */ 96 #define RTFILE_O_DENY_READWRITE 0x0000003096 #define RTFILE_O_DENY_READWRITE UINT32_C(0x00000030) 97 97 /** Sharing mode: deny all. */ 98 98 #define RTFILE_O_DENY_ALL RTFILE_O_DENY_READWRITE … … 101 101 * defaulted & ignored on those. 102 102 */ 103 #define RTFILE_O_DENY_NOT_DELETE 0x00000040103 #define RTFILE_O_DENY_NOT_DELETE UINT32_C(0x00000040) 104 104 /** Sharing mode mask. */ 105 #define RTFILE_O_DENY_MASK 0x000000f0105 #define RTFILE_O_DENY_MASK UINT32_C(0x000000f0) 106 106 107 107 /** Action: Open an existing file (the default action). */ 108 #define RTFILE_O_OPEN 0x00000700108 #define RTFILE_O_OPEN UINT32_C(0x00000700) 109 109 /** Action: Create a new file or open an existing one. */ 110 #define RTFILE_O_OPEN_CREATE 0x00000100110 #define RTFILE_O_OPEN_CREATE UINT32_C(0x00000100) 111 111 /** Action: Create a new a file. */ 112 #define RTFILE_O_CREATE 0x00000200112 #define RTFILE_O_CREATE UINT32_C(0x00000200) 113 113 /** Action: Create a new file or replace an existing one. */ 114 #define RTFILE_O_CREATE_REPLACE 0x00000300114 #define RTFILE_O_CREATE_REPLACE UINT32_C(0x00000300) 115 115 /** Action mask. */ 116 #define RTFILE_O_ACTION_MASK 0x00000700116 #define RTFILE_O_ACTION_MASK UINT32_C(0x00000700) 117 117 118 118 /** Turns off indexing of files on Windows hosts, *CREATE* only. 119 119 * @remarks Window only. */ 120 #define RTFILE_O_NOT_CONTENT_INDEXED 0x00000800120 #define RTFILE_O_NOT_CONTENT_INDEXED UINT32_C(0x00000800) 121 121 /** Truncate the file. 122 122 * @remarks This will not truncate files opened for read-only. … … 124 124 * the file may be racing us. The caller is responsible for not causing 125 125 * this race. */ 126 #define RTFILE_O_TRUNCATE 0x00001000126 #define RTFILE_O_TRUNCATE UINT32_C(0x00001000) 127 127 /** Make the handle inheritable on RTProcessCreate(/exec). */ 128 #define RTFILE_O_INHERIT 0x00002000128 #define RTFILE_O_INHERIT UINT32_C(0x00002000) 129 129 /** Open file in non-blocking mode - non-portable. 130 130 * @remarks This flag may not be supported on all platforms, in which case it's 131 131 * considered an invalid parameter. */ 132 #define RTFILE_O_NON_BLOCK 0x00004000132 #define RTFILE_O_NON_BLOCK UINT32_C(0x00004000) 133 133 /** Write through directly to disk. Workaround to avoid iSCSI 134 134 * initiator deadlocks on Windows hosts. 135 135 * @remarks This might not be implemented on all platforms, and will be ignored 136 136 * on those. */ 137 #define RTFILE_O_WRITE_THROUGH 0x00008000137 #define RTFILE_O_WRITE_THROUGH UINT32_C(0x00008000) 138 138 139 139 /** Attribute access: Attributes can be read if the file is being opened with 140 140 * read access, and can be written with write access. */ 141 #define RTFILE_O_ACCESS_ATTR_DEFAULT 0x00000000141 #define RTFILE_O_ACCESS_ATTR_DEFAULT UINT32_C(0x00000000) 142 142 /** Attribute access: Attributes can be read. 143 143 * @remarks Windows only. */ 144 #define RTFILE_O_ACCESS_ATTR_READ 0x00010000144 #define RTFILE_O_ACCESS_ATTR_READ UINT32_C(0x00010000) 145 145 /** Attribute access: Attributes can be written. 146 146 * @remarks Windows only. */ 147 #define RTFILE_O_ACCESS_ATTR_WRITE 0x00020000147 #define RTFILE_O_ACCESS_ATTR_WRITE UINT32_C(0x00020000) 148 148 /** Attribute access: Attributes can be both read & written. 149 149 * @remarks Windows only. */ 150 #define RTFILE_O_ACCESS_ATTR_READWRITE 0x00030000150 #define RTFILE_O_ACCESS_ATTR_READWRITE UINT32_C(0x00030000) 151 151 /** Attribute access: The file attributes access mask. 152 152 * @remarks Windows only. */ 153 #define RTFILE_O_ACCESS_ATTR_MASK 0x00030000153 #define RTFILE_O_ACCESS_ATTR_MASK UINT32_C(0x00030000) 154 154 155 155 /** Open file for async I/O 156 156 * @remarks This flag may not be needed on all platforms, and will be ignored on 157 157 * those. */ 158 #define RTFILE_O_ASYNC_IO 0x00040000158 #define RTFILE_O_ASYNC_IO UINT32_C(0x00040000) 159 159 160 160 /** Disables caching. … … 183 183 * and will be ignored on those. 184 184 */ 185 #define RTFILE_O_NO_CACHE 0x00080000185 #define RTFILE_O_NO_CACHE UINT32_C(0x00080000) 186 186 187 187 /** Unix file mode mask for use when creating files. */ 188 #define RTFILE_O_CREATE_MODE_MASK 0x1ff00000188 #define RTFILE_O_CREATE_MODE_MASK UINT32_C(0x1ff00000) 189 189 /** The number of bits to shift to get the file mode mask. 190 190 * To extract it: (fFlags & RTFILE_O_CREATE_MODE_MASK) >> RTFILE_O_CREATE_MODE_SHIFT. … … 192 192 #define RTFILE_O_CREATE_MODE_SHIFT 20 193 193 194 /* 0x20000000,195 0x40000000196 and 0x80000000are unused atm. */194 /*UINT32_C(0x20000000), 195 UINT32_C(0x40000000) 196 and UINT32_C(0x80000000) are unused atm. */ 197 197 198 198 /** Mask of all valid flags. 199 199 * @remark This doesn't validate the access mode properly. 200 200 */ 201 #define RTFILE_O_VALID_MASK 0x1ffFFFF7201 #define RTFILE_O_VALID_MASK UINT32_C(0x1ffffff7) 202 202 203 203 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.