1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-09-02 16:01:20 +03:00

* 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.
This commit is contained in:
Roland McGrath
2006-01-06 12:14:26 +00:00
parent 030219826e
commit d15b99ac5a
9 changed files with 359 additions and 11 deletions

View File

@@ -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. */