| ... | @@ -163,13 +163,67 @@ pub extern "c" fn _dyld_get_image_header(image_index: u32) ?*mach_header; | ... | @@ -163,13 +163,67 @@ pub extern "c" fn _dyld_get_image_header(image_index: u32) ?*mach_header; |
| 163 | pub extern "c" fn _dyld_get_image_vmaddr_slide(image_index: u32) usize; | 163 | pub extern "c" fn _dyld_get_image_vmaddr_slide(image_index: u32) usize; |
| 164 | pub extern "c" fn _dyld_get_image_name(image_index: u32) [*:0]const u8; | 164 | pub extern "c" fn _dyld_get_image_name(image_index: u32) [*:0]const u8; |
| 165 | | 165 | |
| 166 | pub const COPYFILE_ACL = 1 << 0; | 166 | pub const COPYFILE = struct { |
| 167 | pub const COPYFILE_STAT = 1 << 1; | 167 | pub const ACL = 1 << 0; |
| 168 | pub const COPYFILE_XATTR = 1 << 2; | 168 | pub const STAT = 1 << 1; |
| 169 | pub const COPYFILE_DATA = 1 << 3; | 169 | pub const XATTR = 1 << 2; |
| | 170 | pub const DATA = 1 << 3; |
| | 171 | pub const SECURITY = COPYFILE.STAT | COPYFILE.ACL; |
| | 172 | pub const METADATA = COPYFILE.SECURITY | COPYFILE.XATTR; |
| | 173 | pub const ALL = COPYFILE.METADATA | COPYFILE.DATA; |
| | 174 | pub const RECURSIVE = 1 << 15; |
| | 175 | pub const CHECK = 1 << 16; |
| | 176 | pub const EXCL = 1 << 17; |
| | 177 | pub const NOFOLLOW_SRC = 1 << 18; |
| | 178 | pub const NOFOLLOW_DST = 1 << 19; |
| | 179 | pub const MOVE = 1 << 20; |
| | 180 | pub const UNLINK = 1 << 21; |
| | 181 | pub const NOFOLLOW = COPYFILE.NOFOLLOW_SRC | NOFOLLOW_DST; |
| | 182 | pub const PACK = 1 << 22; |
| | 183 | pub const UNPACK = 1 << 23; |
| | 184 | pub const CLONE = 1 << 24; |
| | 185 | pub const CLONE_FORCE = 1 << 25; |
| | 186 | pub const RUN_IN_PLACE = 1 << 26; |
| | 187 | pub const DATA_SPARSE = 1 << 27; |
| | 188 | pub const PRESERVE_DST_TRACKED = 1 << 28; |
| | 189 | pub const VERBOSE = 1 << 30; |
| | 190 | pub const RECURSE_ERROR = 0; |
| | 191 | pub const RECURSE_FILE = 1; |
| | 192 | pub const RECURSE_DIR = 2; |
| | 193 | pub const RECURSE_DIR_CLEANUP = 3; |
| | 194 | pub const COPY_DATA = 4; |
| | 195 | pub const COPY_XATTR = 5; |
| | 196 | pub const START = 1; |
| | 197 | pub const FINISH = 2; |
| | 198 | pub const ERR = 3; |
| | 199 | pub const PROGRESS = 4; |
| | 200 | pub const CONTINUE = 0; |
| | 201 | pub const SKIP = 1; |
| | 202 | pub const QUIT = 2; |
| | 203 | pub const STATE_SRC_FD = 1; |
| | 204 | pub const STATE_SRC_FILENAME = 2; |
| | 205 | pub const STATE_DST_FD = 3; |
| | 206 | pub const STATE_DST_FILENAME = 4; |
| | 207 | pub const STATE_QUARANTINE = 5; |
| | 208 | pub const STATE_STATUS_CB = 6; |
| | 209 | pub const STATE_STATUS_CTX = 7; |
| | 210 | pub const STATE_COPIED = 8; |
| | 211 | pub const STATE_XATTRNAME = 9; |
| | 212 | pub const STATE_WAS_CLONED = 10; |
| | 213 | pub const STATE_SRC_BSIZE = 11; |
| | 214 | pub const STATE_DST_BSIZE = 12; |
| | 215 | pub const STATE_BSIZE = 13; |
| | 216 | pub const DISABLE_VAR: [*]u8 = "COPYFILE_DISABLE"; |
| | 217 | }; |
| 170 | | 218 | |
| 171 | pub const copyfile_state_t = *opaque {}; | 219 | pub const copyfile_state_t = *opaque {}; |
| 172 | pub extern "c" fn fcopyfile(from: fd_t, to: fd_t, state: ?copyfile_state_t, flags: u32) c_int; | 220 | pub const copyfile_flags_t = u32; |
| | 221 | pub extern "c" fn fcopyfile(from: fd_t, to: fd_t, state: ?copyfile_state_t, flags: copyfile_flags_t) c_int; |
| | 222 | pub extern "c" fn copyfile(from: [*:0]u8, to: [*:0]u8, state: ?copyfile_state_t, flags: copyfile_flags_t) c_int; |
| | 223 | pub extern "c" fn copyfile_state_alloc() copyfile_state_t; |
| | 224 | pub extern "c" fn copyfile_state_free(state: copyfile_state_t) void; |
| | 225 | pub extern "c" fn copyfile_state_get(s: copyfile_state_t, flag: u32, dst: ?*anyopaque) c_int; |
| | 226 | pub extern "c" fn copyfile_state_set(s: copyfile_state_t, flag: u32, dst: ?*const anyopaque) c_int; |
| 173 | | 227 | |
| 174 | pub extern "c" fn @"realpath$DARWIN_EXTSN"(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8; | 228 | pub extern "c" fn @"realpath$DARWIN_EXTSN"(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8; |
| 175 | pub const realpath = @"realpath$DARWIN_EXTSN"; | 229 | pub const realpath = @"realpath$DARWIN_EXTSN"; |