O_ACCMODE
if ((cp->set & O_ACCMODE) && (flagtype == C_OFLAG)) {
fl &= O_ACCMODE;
#ifndef O_ACCMODE
switch (flags & O_ACCMODE) {
sflags |= (oflags & O_ACCMODE) == O_RDONLY ? SHF_RD
: ((oflags & O_ACCMODE) == O_WRONLY ? SHF_WR
switch (flags & O_ACCMODE) {
#ifndef O_ACCMODE
#define IGNFLAGS (O_ACCMODE|O_RDONLY|O_WRONLY|O_RDWR|O_SHLOCK|O_EXLOCK| \
switch (flags & O_ACCMODE) {
if ((flags & O_ACCMODE) != O_RDWR)
if ((flags & O_ACCMODE) == O_WRONLY) {
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
if ((flags & O_ACCMODE) == O_WRONLY) {
switch (flags & O_ACCMODE) {
switch (flags & O_ACCMODE) {
tmp = fdflags & O_ACCMODE;
if (tmp != O_RDWR && (tmp != (oflags & O_ACCMODE))) {
tmp = fdflags & O_ACCMODE;
if ((flags & O_ACCMODE) == FWRITE && (stxx == 0)) {
if ((open_flags & O_EXEC) && (open_flags & O_ACCMODE))
#define O_MASK (O_ACCMODE|O_NONBLOCK|O_APPEND|O_SHLOCK|O_EXLOCK|\
ATF_REQUIRE((fcntl(efd, F_GETFL) & ~O_ACCMODE) == O_NONBLOCK);
ATF_REQUIRE((fcntl(tfd, F_GETFL) & ~O_ACCMODE) == O_NONBLOCK);