diff options
author | Christopher Faylor <me@cgf.cx> | 2002-08-01 23:53:07 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-08-01 23:53:07 +0000 |
commit | 8a19897f17594f47d2c4cc78bae466e9c54dc1e1 (patch) | |
tree | 96023544ace36231f62ac6160dcadd3b69958226 /winsup/cygwin/syscalls.cc | |
parent | e51cfd3116d8535983953e744924f377c9c08825 (diff) | |
download | cygnal-8a19897f17594f47d2c4cc78bae466e9c54dc1e1.tar.gz cygnal-8a19897f17594f47d2c4cc78bae466e9c54dc1e1.tar.bz2 cygnal-8a19897f17594f47d2c4cc78bae466e9c54dc1e1.zip |
* syscalls.cc (_link): Revert previous change and just always dereference the
oldpath.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 84d080cf9..a9c9d53c5 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -305,11 +305,10 @@ _read (int fd, void *ptr, size_t len) DWORD wait = cfd->is_nonblocking () ? 0 : INFINITE; /* Could block, so let user know we at least got here. */ - syscall_printf ("read (%d, %p, %d) %sblocking, sigcatchers %d", - fd, ptr, len, wait ? "" : "non", sigcatchers); + syscall_printf ("read (%d, %p, %d) %sblocking, sigcatchers %d", fd, ptr, len, wait ? "" : "non", sigcatchers); if (wait && (!cfd->is_slow () || cfd->get_r_no_interrupt ())) - debug_printf ("no need to call ready_for_read\n"); + debug_printf ("non-interruptible read\n"); else if (!cfd->ready_for_read (fd, wait)) { res = -1; @@ -319,7 +318,7 @@ _read (int fd, void *ptr, size_t len) /* FIXME: This is not thread safe. We need some method to ensure that an fd, closed in another thread, aborts I/O operations. */ - if (!cfd.isopen ()) + if (!cfd.isopen()) return -1; /* Check to see if this is a background read from a "tty", @@ -332,7 +331,7 @@ _read (int fd, void *ptr, size_t len) if (res > bg_eof) { myself->process_state |= PID_TTYIN; - if (!cfd.isopen ()) + if (!cfd.isopen()) return -1; res = cfd->read (ptr, len); myself->process_state &= ~PID_TTYIN; @@ -615,9 +614,8 @@ _link (const char *a, const char *b) { int res = -1; sigframe thisframe (mainthread); + path_conv real_a (a, PC_SYM_FOLLOW | PC_FULL); path_conv real_b (b, PC_SYM_NOFOLLOW | PC_FULL); - path_conv real_a (a, PC_SYM_NOFOLLOW | PC_FULL); - extern BOOL allow_winsymlinks; if (real_a.error) { @@ -648,8 +646,6 @@ _link (const char *a, const char *b) /* Try to make hard link first on Windows NT */ if (wincap.has_hard_links ()) { - if (allow_winsymlinks && real_b.issymlink ()) - strcat (real_a, ".lnk"); if (CreateHardLinkA (real_b, real_a, NULL)) { res = 0; |