From 796e3b20bc861bdd8ca4da24b807582fb783e16a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 2 Apr 2000 20:42:42 +0000 Subject: * newlib/libc/include/sys/unistd.h: Add prototypes for fchmod, fchown, lchown. * winsup/cygwin/syscalls.cc (chown_worker): Use previous uid/gid if new uid/gid is -1. New static function with chown functionality. (chown): Call chown_worker with SYMLINK_FOLLOW. (fchown): New function. Call chown_worker with SYMLINK_FOLLOW. (lchown): New function. Call chown_worker with SYMLINK_IGNORE. * cygwin.din: Add symbols for fchown, lchown. * path.cc (symlink): Call `set_file_attribute()' and `SetFileAttributeA()' instead of `chmod()' to set uid/gid correct. --- newlib/libc/include/sys/unistd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'newlib/libc') diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 98d1e1f2a..2b8c6a0f0 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -30,6 +30,8 @@ int _EXFUN(execlp, (const char *__file, const char *, ... )); int _EXFUN(execv, (const char *__path, char * const __argv[] )); int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] )); int _EXFUN(execvp, (const char *__file, char * const __argv[] )); +int _EXFUN(fchmod, (int __fildes, mode_t __mode )); +int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group )); pid_t _EXFUN(fork, (void )); long _EXFUN(fpathconf, (int __fd, int __name )); int _EXFUN(fsync, (int __fd)); @@ -46,6 +48,7 @@ pid_t _EXFUN(getpid, (void )); pid_t _EXFUN(getppid, (void )); uid_t _EXFUN(getuid, (void )); int _EXFUN(isatty, (int __fildes )); +int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group )); int _EXFUN(link, (const char *__path1, const char *__path2 )); int _EXFUN(nice, (int __nice_value )); off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence )); -- cgit v1.2.3