* autoload.cc (GetConsoleWindow): Drop.

(GetSystemWindowsDirectoryW): Drop.
	* fhandler_console.cc (beep): Call GetSystemWindowsDirectoryW instead of
	GetWindowsDirectoryW.
	* uinfo.cc (cygheap_user::env_systemroot): Call
	GetSystemWindowsDirectoryW and convert to multibyte on the fly.
	* winlean.h (GetWindowsDirectoryW): Redefine to something invalid.
	Explain why.
This commit is contained in:
Corinna Vinschen
2011-04-19 10:15:09 +00:00
parent b18cb86be7
commit ba6aad1d73
5 changed files with 24 additions and 17 deletions

View File

@ -67,9 +67,9 @@ beep ()
if (r.created ())
{
PWCHAR buf = NULL;
UINT len = GetWindowsDirectoryW (buf, 0) * sizeof (WCHAR);
UINT len = GetSystemWindowsDirectoryW (buf, 0) * sizeof (WCHAR);
buf = (PWCHAR) alloca (len += sizeof (ding));
UINT res = GetWindowsDirectoryW (buf, len);
UINT res = GetSystemWindowsDirectoryW (buf, len);
if (res && res <= len)
r.set_string (L"", wcscat (buf, ding));
}