From c90c5d4106a2903a40cc3213f8d172e5c6c7ffd6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 5 Jan 2006 10:32:47 +0000 Subject: * io/sys/stat.h [__USE_GNU]: Declare fchmodat. * io/fchmodat.c: New file. * io/Makefile (routines): Add fchmodat. * io/Versions (libc: GLIBC_2.4): Likewise. * sysdeps/unix/sysv/linux/fchmodat.c: New file. * io/tst-fchmodat.c: New file. * io/Makefile (tests): Add it. --- io/sys/stat.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'io/sys') diff --git a/io/sys/stat.h b/io/sys/stat.h index 6ce3a1be66..93cd7d0610 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1992,1995-2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1995-2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -293,6 +293,14 @@ extern int lchmod (__const char *__file, __mode_t __mode) extern int fchmod (int __fd, __mode_t __mode) __THROW; #endif +#ifdef __USE_GNU +/* Set file access permissions of FILE relative to + the directory FD is open on. */ +extern int fchmodat (int __fd, __const char *__file, __mode_t mode, int __flag) + __THROW __nonnull ((2)) __wur; +#endif /* Use GNU. */ + + /* Set the file creation mask of the current process to MASK, and return the old creation mask. */ -- cgit v1.2.3