diff options
Diffstat (limited to 'winsup/cygwin/shared_info.h')
-rw-r--r-- | winsup/cygwin/shared_info.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h index 7a9b0e096..fe0a30729 100644 --- a/winsup/cygwin/shared_info.h +++ b/winsup/cygwin/shared_info.h @@ -11,6 +11,17 @@ details. */ #include "tty.h" #include "security.h" +struct charplus +{ + char buf[CYG_MAX_PATH]; + char tailch; + char *tail; + operator char * () { return buf; } + operator const char * () const { return buf; } + charplus (const char *s) : tailch (0), tail (0) {strcpy (buf, s);} + charplus () : tailch (0), tail (0) {*buf = '\0';} +}; + /* Mount table entry */ class mount_item @@ -33,7 +44,7 @@ class mount_item struct mntent *getmntent (); int fnmunge (char *, const char *, int&); - int build_win32 (char *, const char *, unsigned *, unsigned); + int build_win32 (char *, const charplus&, unsigned *, unsigned); }; /* Warning: Decreasing this value will cause cygwin.dll to ignore existing @@ -80,9 +91,9 @@ class mount_info int del_reg_mount (const char * posix_path, unsigned mountflags); unsigned set_flags_from_win32_path (const char *path); - int conv_to_win32_path (const char *src_path, char *dst, device&, + int conv_to_win32_path (const charplus& src_path, char *dst, device&, unsigned *flags = NULL); - int conv_to_posix_path (const char *src_path, char *posix_path, + int conv_to_posix_path (const charplus& src_path, char *posix_path, int keep_rel_p); struct mntent *getmntent (int x); |