summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygheap.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index 212578612..bf93e4633 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -222,23 +222,19 @@ class muto;
struct cwdstuff
{
char *posix;
- char *win32;
- DWORD hash;
+ UNICODE_STRING win32;
DWORD drive_length;
static 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);
+ cwd_lock.acquire ();
+ DWORD ret = sys_wcstombs (dst, PATH_MAX, win32.Buffer, drive_length);
cwd_lock.release ();
- return drive_length;
+ return ret;
}
void init ();
- void fixup_after_exec (char *, char *, DWORD);
- bool get_initial ();
- int set (const char *, const char *, bool);
+ int set (PUNICODE_STRING, const char *, bool);
};
#ifdef DEBUGGING