* autoload.cc (GetModuleFileNameExW): Replace definition of

GetModuleFileNameExA.
	* fhandler_process.cc (format_process_maps): Change modname type to
	WCHAR.  Set buffer sizes to PATH_MAX.  Call GetModuleFileNameExW
	instead of GetModuleFileNameExA.  Call mount_info::conv_to_posix_path
	instead of cygwin_conv_to_full_posix_path.  Set posix_modname to
	modname if that call fails.
	(format_process_stat): Set cmd buffer size to NAME_MAX + 1.  Simplify
	setting cmd to process name.
	(format_process_status): Ditto.
	* path.cc (mount_info::conv_to_posix_path): Call sys_wcstombs
	correctly.
This commit is contained in:
Corinna Vinschen
2007-12-03 14:13:03 +00:00
parent 268e8d00e9
commit 814066b912
4 changed files with 28 additions and 16 deletions

View File

@ -1966,7 +1966,7 @@ mount_info::conv_to_posix_path (PWCHAR src_path, char *posix_path,
}
}
char buf[PATH_MAX];
sys_wcstombs (buf, PATH_MAX, src_path, 0);
sys_wcstombs (buf, PATH_MAX, src_path);
int ret = conv_to_posix_path (buf, posix_path, keep_rel_p);
if (changed)
src_path[0] = L'C';