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>2005-02-20 00:53:36 +0300
committerCorinna Vinschen <corinna@vinschen.de>2005-02-20 00:53:36 +0300
commit0d75ce965cf46a16585477469bb4edb597a35f00 (patch)
tree7fbe3e9926fae6373ca21014ebd1e24bf5c8bdb6 /winsup/cygwin/fhandler_socket.cc
parentc2d0b9d89a3406e8905efa8fe58f9d948242e028 (diff)
* fhandler.h (class fhandler_base): Declare new method link.
(class fhandler_socket): Ditto. (class fhandler_disk_file): Ditto. * fhandler.cc (fhandler_base::open): Add FILE_WRITE_ATTRIBUTES to query_write_control access flags. (fhandler_base::link): New method. * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't try to open with O_WRONLY since query_write_control includes FILE_WRITE_ATTRIBUTES. (fhandler_disk_file::fchown): Ditto. (fhandler_disk_file::facl): Ditto. (fhandler_disk_file::link): New method. Touch st_ctime on successful link. * fhandler_socket.cc (fhandler_socket::link): New method. * syscalls.cc (link): Move functionality into fhandler method link. Just call this method from here.
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r--winsup/cygwin/fhandler_socket.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index 757c5a76b..7038243e1 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -449,6 +449,18 @@ fhandler_socket::facl (int cmd, int nentries, __aclent32_t *aclbufp)
}
int
+fhandler_socket::link (const char *newpath)
+{
+ if (get_device () == FH_UNIX)
+ {
+ fhandler_disk_file fh;
+ fh.set_name (pc);
+ return fh.link (newpath);
+ }
+ return fhandler_base::link (newpath);
+}
+
+int
fhandler_socket::bind (const struct sockaddr *name, int namelen)
{
int res = -1;