mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Update from Gnulib
This incorporates: 2020-03-07 open, openat: port to (O_RDWR | O_RDONLY) != 0 * lib/open.c: Copy from Gnulib.
This commit is contained in:
parent
3274b8090b
commit
9f4b260c2b
1 changed files with 3 additions and 1 deletions
|
|
@ -110,7 +110,9 @@ open (const char *filename, int flags, ...)
|
|||
directories,
|
||||
- if O_WRONLY or O_RDWR is specified, open() must fail because the
|
||||
file does not contain a '.' directory. */
|
||||
if (flags & (O_CREAT | O_WRONLY | O_RDWR))
|
||||
if ((flags & O_CREAT)
|
||||
|| (flags & O_ACCMODE) == O_RDWR
|
||||
|| (flags & O_ACCMODE) == O_WRONLY)
|
||||
{
|
||||
size_t len = strlen (filename);
|
||||
if (len > 0 && filename[len - 1] == '/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue