* dcrt0.cc (initial_env): Only use local buffer "buf" if DEBUGGING is
enabled. Replace calls to GetEnvironmentVariable by calls to GetEnvironmentVariableA for clarity. Call GetEnvironmentVariableA with NULL buffer. (cygbench): Ditto, drop local buffer. * environ.cc (getearly): Call GetEnvironmentVariableA. (environ_init): Retrieve unicode environment and convert to current codepage locally. (getwinenveq): Ditto. * exceptions.cc (try_to_debug): Accommodate new sys_mbstowcs calling convention. * fhandler_clipboard.cc (set_clipboard): Call sys_mbstowcs to retrieve required buffer length. * fork.cc (frok::child): Call GetEnvironmentVariableA. * miscfuncs.cc: Accommodate changed arguments in calls to sys_mbstowcs. * sec_auth.cc: Ditto. * strfuncs.cc (sys_wcstombs_alloc): Fix formatting. (sys_mbstowcs): Change arguments to allow specifying a source string length. (sys_mbstowcs_alloc): Ditto. * uinfo.cc (cygheap_user::ontherange): Accommodate changed arguments in calls to sys_mbstowcs. * winsup.h (sys_mbstowcs): Adjust declaration. (sys_mbstowcs_alloc): Ditto.
This commit is contained in:
@@ -296,9 +296,9 @@ cygheap_user::ontherange (homebodies what, struct passwd *pw)
|
||||
if (logsrv ())
|
||||
{
|
||||
WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
|
||||
sys_mbstowcs (wlogsrv, logsrv (),
|
||||
sizeof (wlogsrv) / sizeof (*wlogsrv));
|
||||
sys_mbstowcs (wuser, winname (), sizeof (wuser) / sizeof (*wuser));
|
||||
sys_mbstowcs (wlogsrv, sizeof (wlogsrv) / sizeof (*wlogsrv),
|
||||
logsrv ());
|
||||
sys_mbstowcs (wuser, sizeof (wuser) / sizeof (*wuser), winname ());
|
||||
if (!(ret = NetUserGetInfo (wlogsrv, wuser, 3, (LPBYTE *) &ui)))
|
||||
{
|
||||
sys_wcstombs (homepath_env_buf, CYG_MAX_PATH,
|
||||
|
Reference in New Issue
Block a user