Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-04-03 00:42:42 +0400
committerCorinna Vinschen <corinna@vinschen.de>2000-04-03 00:42:42 +0400
commit796e3b20bc861bdd8ca4da24b807582fb783e16a (patch)
treef57a158f5dc848dc57114e3123bc3b522bec17f9 /newlib/libc
parentc90d7012d3a7236d369df55b6963f124d5050318 (diff)
* 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.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/sys/unistd.h3
1 files changed, 3 insertions, 0 deletions
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 ));