open, openat: port to (O_RDWR | O_RDONLY) != 0
commit1d86584739a712597a6fe3a62ec412238f0f13f8
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 7 Mar 2020 19:02:05 +0000 (7 11:02 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 7 Mar 2020 19:02:43 +0000 (7 11:02 -0800)
tree97834cc6fb3aab3eb2227e02c0d02abe6efdadb8
parent4c1009ec93e12ee34acd27f6d7e25442bedc16f2
open, openat: port to (O_RDWR | O_RDONLY) != 0

Potential portability problem reported by Dan Gohman in:
https://lists.gnu.org/r/bug-gnulib/2020-03/msg00000.html
* lib/open.c (open):
* lib/openat.c (rpl_openat):
Don’t assume O_RDONLY is disjoint from O_RDWR.
ChangeLog
lib/open.c
lib/openat.c