diff options
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index b9d7defbc..090754a02 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -80,11 +80,15 @@ enum path_types PATH_NO_ACCESS_CHECK = PC_NO_ACCESS_CHECK, PATH_CTTY = 0x00400000, /* could later be used as ctty */ PATH_OPEN = 0x00800000, /* use open semantics */ + /* FIXME? PATH_OPEN collides with + PATH_NO_ACCESS_CHECK, but it looks + like they are never used together. */ PATH_LNK = 0x01000000, PATH_TEXT = 0x02000000, PATH_REP = 0x04000000, PATH_HAS_SYMLINKS = 0x10000000, - PATH_SOCKET = 0x40000000 + PATH_SOCKET = 0x40000000, + PATH_64BITEXEC = 0x80000000 }; class symlink_info; @@ -153,7 +157,7 @@ class path_conv ULONG objcaseinsensitive () const {return caseinsensitive;} bool has_acls () const {return !(path_flags & PATH_NOACL) && fs.has_acls (); } bool hasgood_inode () const {return !(path_flags & PATH_IHASH); } - bool isgood_inode (__ino64_t ino) const; + bool isgood_inode (ino_t ino) const; bool support_sparse () const { return (path_flags & PATH_SPARSE) @@ -186,6 +190,12 @@ class path_conv int is_lnk_special () const {return is_fs_device () || isfifo () || is_lnk_symlink ();} int issocket () const {return dev.is_device (FH_UNIX);} int iscygexec () const {return path_flags & PATH_CYGWIN_EXEC;} + int iscygexec32 () const + {return (path_flags & (PATH_CYGWIN_EXEC | PATH_64BITEXEC)) + == PATH_CYGWIN_EXEC;} + int iscygexec64 () const + {return (path_flags & (PATH_CYGWIN_EXEC | PATH_64BITEXEC)) + == (PATH_CYGWIN_EXEC | PATH_64BITEXEC);} int isopen () const {return path_flags & PATH_OPEN;} int isctty_capable () const {return path_flags & PATH_CTTY;} void set_cygexec (bool isset) @@ -195,6 +205,17 @@ class path_conv else path_flags &= ~PATH_CYGWIN_EXEC; } + void set_cygexec (void *target) + { + if (target) + { + path_flags |= PATH_CYGWIN_EXEC; + if (target == (void *) 64) + path_flags |= PATH_64BITEXEC; + } + else + path_flags &= ~PATH_CYGWIN_EXEC; + } bool isro () const {return !!(path_flags & PATH_RO);} bool exists () const {return fileattr != INVALID_FILE_ATTRIBUTES;} bool has_attribute (DWORD x) const {return exists () && (fileattr & x);} @@ -344,8 +365,7 @@ class path_conv { return eq_worker (pc, pc.path, pc.normalized_path); } - DWORD get_devn () {return (DWORD) dev;} - short get_unitn () const {return dev.get_minor ();} + dev_t get_device () {return dev.get_device ();} DWORD file_attributes () const {return fileattr;} void file_attributes (DWORD new_attr) {fileattr = new_attr;} DWORD fs_flags () const {return fs.flags ();} @@ -362,6 +382,7 @@ class path_conv bool fs_is_cifs () const {return fs.is_cifs ();} bool fs_is_nwfs () const {return fs.is_nwfs ();} bool fs_is_ncfsd () const {return fs.is_ncfsd ();} + bool fs_is_afs () const {return fs.is_afs ();} fs_info_type fs_type () const {return fs.what_fs ();} ULONG fs_serial_number () const {return fs.serial_number ();} inline const char *set_path (const char *p) @@ -380,7 +401,7 @@ class path_conv void reset_conv_handle () { conv_handle.set (NULL); } void close_conv_handle () { conv_handle.close (); } - __ino64_t get_ino_by_handle (HANDLE h); + ino_t get_ino_by_handle (HANDLE h); #if 0 /* obsolete, method still exists in fhandler_disk_file.cc */ unsigned __stdcall ndisk_links (DWORD); #endif @@ -453,3 +474,5 @@ class etc static bool test_file_change (int); friend class pwdgrp; }; + +int __reg3 symlink_worker (const char *, const char *, bool); |