summaryrefslogtreecommitdiff
path: root/posix/unistd.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-01-06 12:14:26 +0000
committerRoland McGrath <roland@gnu.org>2006-01-06 12:14:26 +0000
commitd15b99ac5af661dba1303f17a01f09aae7b6f5e7 (patch)
treee91cee50ed642f2edd9309140d5751c62a5b47f9 /posix/unistd.h
parent030219826e29a214dc1b58d31fd924fb32ec761f (diff)
downloadglibc-d15b99ac5af661dba1303f17a01f09aae7b6f5e7.tar.gz
* io/fcntl.h [__USE_ATFILE] (AT_EACCESS): New macro.
* posix/unistd.h [__USE_ATFILE]: Declare faccessat. * io/faccessat.c: New file. * sysdeps/unix/sysv/linux/faccessat.c: New file. * io/Makefile (routines): Add faccessat. * io/Versions (libc: GLIBC_2.4): Likewise. * io/tst-faccessat.c: New file. * io/Makefile (tests): Add it. * io/sys/stat.h: Likewise.
Diffstat (limited to 'posix/unistd.h')
-rw-r--r--posix/unistd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/posix/unistd.h b/posix/unistd.h
index 1bf843ce63..acb8f6f11d 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -266,6 +266,14 @@ extern int eaccess (__const char *__name, int __type)
__THROW __nonnull ((1));
#endif
+#ifdef __USE_ATFILE
+/* Test for access to FILE relative to the directory FD is open on.
+ If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess',
+ otherwise use real IDs like `access'. */
+extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
+ __THROW __nonnull ((2)) __wur;
+#endif /* Use GNU. */
+
/* Values for the WHENCE argument to lseek. */
#ifndef _STDIO_H /* <stdio.h> has the same definitions. */