Skip to content

Commit

Permalink
apple SEEK_{DATA,HOLE} O_{EVTONLY,NOFOLLOW_ANY}
Browse files Browse the repository at this point in the history
Checked values in MacOSX12.3.sdk and iPhoneOS15.5.sdk

/usr/include/sys/_types/_seek_set.h
/usr/include/sys/fcntl.h

Also updated representation format by following Apple's form and order
  • Loading branch information
youknowone committed Aug 21, 2022
1 parent 59a6070 commit 097f864
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions libc-test/semver/apple.txt
Expand Up @@ -917,10 +917,12 @@ ONOEOT
OXTABS
O_ASYNC
O_DSYNC
O_EVTONLY
O_EXLOCK
O_FSYNC
O_NDELAY
O_NOCTTY
O_NOFOLLOW_ANY
O_SHLOCK
O_SYMLINK
O_SYNC
Expand Down Expand Up @@ -1164,6 +1166,8 @@ SCHED_RR
SCM_CREDS
SCM_RIGHTS
SCM_TIMESTAMP
SEEK_DATA
SEEK_HOLE
SEM_FAILED
SEM_UNDO
SETALL
Expand Down
14 changes: 9 additions & 5 deletions src/unix/bsd/apple/mod.rs
Expand Up @@ -2654,6 +2654,8 @@ pub const EOF: ::c_int = -1;
pub const SEEK_SET: ::c_int = 0;
pub const SEEK_CUR: ::c_int = 1;
pub const SEEK_END: ::c_int = 2;
pub const SEEK_HOLE: ::c_int = 3;
pub const SEEK_DATA: ::c_int = 4;
pub const _IOFBF: ::c_int = 0;
pub const _IONBF: ::c_int = 2;
pub const _IOLBF: ::c_int = 1;
Expand All @@ -2671,11 +2673,13 @@ pub const _PC_PIPE_BUF: ::c_int = 6;
pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
pub const _PC_NO_TRUNC: ::c_int = 8;
pub const _PC_VDISABLE: ::c_int = 9;
pub const O_DSYNC: ::c_int = 0x400000;
pub const O_NOCTTY: ::c_int = 0x20000;
pub const O_CLOEXEC: ::c_int = 0x1000000;
pub const O_DIRECTORY: ::c_int = 0x100000;
pub const O_SYMLINK: ::c_int = 0x200000;
pub const O_EVTONLY: ::c_int = 0x00008000;
pub const O_NOCTTY: ::c_int = 0x00020000;
pub const O_DIRECTORY: ::c_int = 0x00100000;
pub const O_SYMLINK: ::c_int = 0x00200000;
pub const O_DSYNC: ::c_int = 0x00400000;
pub const O_CLOEXEC: ::c_int = 0x01000000;
pub const O_NOFOLLOW_ANY: ::c_int = 0x20000000;
pub const S_IFIFO: mode_t = 4096;
pub const S_IFCHR: mode_t = 8192;
pub const S_IFBLK: mode_t = 24576;
Expand Down

0 comments on commit 097f864

Please sign in to comment.