2004-09-05 Pierre Humblet <pierre.humblet@ieee.org>

* cygheap.h (cwdstuff::drive_length): New member.
        (cwdstuff::get_drive): New method.
        * path.cc (normalize_win32_path): Simplify by using cwdstuff::get_drive.
        (mount_info::conv_to_win32_path): Use cwdstuff::get_drive as default for /.
        (cwdstuff::set): Initialize drive_length.
This commit is contained in:
Pierre Humblet
2004-09-07 23:26:28 +00:00
parent b00c5f99d8
commit a456320915
3 changed files with 41 additions and 23 deletions

View File

@ -216,9 +216,16 @@ struct cwdstuff
char *posix;
char *win32;
DWORD hash;
DWORD drive_length;
muto *cwd_lock;
char *get (char *, int = 1, int = 0, unsigned = CYG_MAX_PATH);
DWORD get_hash ();
DWORD get_drive (char * dst)
{
get_initial ();
memcpy (dst, win32, drive_length);
return drive_length;
}
void init ();
void fixup_after_exec (char *, char *, DWORD);
bool get_initial ();