diff options
author | Eli Zaretskii <eliz@gnu.org> | 2012-11-14 19:22:55 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2012-11-14 19:22:55 +0200 |
commit | 14f207289c224b3ad12fc8704c2183ef8fbcab28 (patch) | |
tree | 762793d11e03d384ff44353bdfde59c302cda66d /nt/inc/unistd.h | |
parent | c62792e7dfa403db8c36cb92f32fb69258a199ef (diff) | |
download | emacs-14f207289c224b3ad12fc8704c2183ef8fbcab28.tar.gz |
MS-Windows followup for 2012-11-14T04:55:41Z!eggert@cs.ucla.edu, regarding faccessat.
nt/inc/unistd.h (faccessat): Add prototype.
(AT_FDCWD, AT_EACCESS, AT_SYMLINK_NOFOLLOW): New macros; the first
2 moved from ms-w32.h.
nt/inc/ms-w32.h (AT_FDCWD, AT_EACCESS, faccessat): Remove macros.
src/w32.c (faccessat): Rename from sys_faccessat. (No need to use a
different name, as the MS runtime does not have such a function,
and probably never will.) All callers changed. Ignore DIRFD
value if PATH is an absolute file name, to match Posix spec
better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
symlinks.
Fixes: debbugs:12632
Diffstat (limited to 'nt/inc/unistd.h')
-rw-r--r-- | nt/inc/unistd.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h index 4c5f7d4c124..b0f3092cafb 100644 --- a/nt/inc/unistd.h +++ b/nt/inc/unistd.h @@ -18,4 +18,12 @@ extern pid_t getpgrp (void); extern pid_t setsid (void); extern pid_t tcgetpgrp (int); +extern int faccessat (int, char const *, int, int); + +/* These are normally on fcntl.h, but we don't override that header. */ +/* Use values compatible with gnulib, as there's no reason to differ. */ +#define AT_FDCWD (-3041965) +#define AT_EACCESS 4 +#define AT_SYMLINK_NOFOLLOW 4096 + #endif /* _UNISTD_H */ |