Dan Gohman wrote: > > if (flags & (O_CREAT | O_WRONLY | O_RDWR)) > > However, this can erroneously return true on systems where O_RDWR shares > bits with R_RDONLY.
Would if (flags & ((O_CREAT | O_WRONLY | O_RDWR) & ~O_RDONLY)) be correct? Bruno
Dan Gohman wrote: > > if (flags & (O_CREAT | O_WRONLY | O_RDWR)) > > However, this can erroneously return true on systems where O_RDWR shares > bits with R_RDONLY.
Would if (flags & ((O_CREAT | O_WRONLY | O_RDWR) & ~O_RDONLY)) be correct? Bruno