From 762520f3bc4d160d2af658f5dd59dfd09d76bc7f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 8 Mar 2003 03:36:39 +0000 Subject: * path.h (PATH_LNK): New enum val. (path_conv::is_lnk_symlink): New function. True if path represents .lnk style symlink. * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate. (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially. * syscalls.cc (unlink): Always remove readonly attribute from a symlink regardless of type. (link): (from Corinna Vinschen) Allow links to symlinks. Reset attributes on a symlink after successful link creation. (chmod): Use is_lnk_symlink where appropriate. (rename): Ditto. * tty.cc (create_tty_master): Call GetComputerName instead of cygwin_gethostname. Set ut_id. * syscalls.cc (login): Call endutent. (setutent): Do not seek after a fresh open. --- winsup/cygwin/path.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'winsup/cygwin/path.h') diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 4de14bf4b..bd5b4a286 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -47,6 +47,7 @@ enum path_types PATH_NOTEXEC = MOUNT_NOTEXEC, PATH_CYGWIN_EXEC = MOUNT_CYGWIN_EXEC, PATH_ALL_EXEC = (PATH_CYGWIN_EXEC | PATH_EXEC), + PATH_LNK = 0x01000000, PATH_TEXT = 0x02000000, PATH_ISDISK = 0x04000000, PATH_HAS_SYMLINKS = 0x10000000, @@ -97,6 +98,7 @@ class path_conv return 0; } int issymlink () const {return path_flags & PATH_SYMLINK;} + int is_lnk_symlink () const {return path_flags & PATH_LNK;} int issocket () const {return path_flags & PATH_SOCKET;} int iscygexec () const {return path_flags & PATH_CYGWIN_EXEC;} bool exists () const {return fileattr != INVALID_FILE_ATTRIBUTES;} -- cgit v1.2.3