From 3f21478315fd782d6f3cd466cc5def88b10660b3 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 4 Jul 2003 03:07:01 +0000 Subject: * fhandler.h (FH_ENC): New enum. (fhandler_base::get_encoded): New function. (fhandler_base::set_encoded): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag in fhandler, as appropriate. (fhandler_disk_file::readdir): Unmunge filename as appropriate based on new encoding flag. * path.cc (normalize_posix_path): Don't punt on files with colons. (special_char): New function. (mount_item::fnmunge): Ditto. (fnunmunge): Ditto. (special_name): Ditto. (mount_item::build_win32): Avoid drive considerations when file is encoded. (mount_info::conv_to_win32_path): Handle encoded filenames. (mount_info::conv_to_posix_path): Ditto. (fillout_mntent): Add posix string when directory is encoded. * path.h (fnunmunge): Declare. (path_conv::is_encoded): Declare. --- winsup/cygwin/path.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'winsup/cygwin/path.h') diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index bd5b4a286..f92e2d3dc 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -46,6 +46,7 @@ enum path_types PATH_EXEC = MOUNT_EXEC, PATH_NOTEXEC = MOUNT_NOTEXEC, PATH_CYGWIN_EXEC = MOUNT_CYGWIN_EXEC, + PATH_ENC = MOUNT_ENC, PATH_ALL_EXEC = (PATH_CYGWIN_EXEC | PATH_EXEC), PATH_LNK = 0x01000000, PATH_TEXT = 0x02000000, @@ -89,6 +90,7 @@ class path_conv int has_symlinks () const {return path_flags & PATH_HAS_SYMLINKS;} int hasgood_inode () const {return path_flags & PATH_HASACLS;} // Not strictly correct int has_buggy_open () const {return path_flags & PATH_HASBUGGYOPEN;} + bool isencoded () {return path_flags & PATH_ENC;} int binmode () const { if (path_flags & PATH_BINARY) @@ -210,6 +212,8 @@ has_exec_chars (const char *buf, int len) int pathmatch (const char *path1, const char *path2) __attribute__ ((regparm (2))); int pathnmatch (const char *path1, const char *path2, int len) __attribute__ ((regparm (2))); +bool fnunmunge (char *, const char *) __attribute__ ((regparm (2))); + int path_prefix_p (const char *path1, const char *path2, int len1) __attribute__ ((regparm (3))); /* FIXME: Move to own include file eventually */ -- cgit v1.2.3