* cygheap.h (cwdstuff::get_posix): Convert to const inline method just

returning pointer to posix path.
	(cwdstuff::reset_posix): Convert to non-inline method taking a wchar_t
	pointer.
	* path.cc (cwdstuff::set): Revert change from 2009-05-13.  Set posix
	to valid incoming path again.
	(cwdstuff::reset_posix): New implementation setting posix path from
	incoming wchar_t path.  Explain usage.
	(cwdstuff::get_posix): Drop implementation.
	(cwdstuff::get): Drop special case to handle empty posix path.
	* syscalls.cc (internal_setlocale): Store old posix cwd as wide char
	path.  Restore posix cwd using new charset.  Explain why.
This commit is contained in:
Corinna Vinschen
2009-09-21 19:29:16 +00:00
parent 92763ad9ba
commit ee42ccd3a2
4 changed files with 40 additions and 29 deletions

View File

@ -211,8 +211,8 @@ public:
UNICODE_STRING win32;
DWORD drive_length;
static muto cwd_lock;
char *get_posix ();
void reset_posix () { if (posix) posix[0] = '\0'; }
const char *get_posix () const { return posix; };
void reset_posix (wchar_t *);
char *get (char *, int = 1, int = 0, unsigned = NT_MAX_PATH);
HANDLE get_handle () { return dir; }
DWORD get_drive (char * dst)