* environ.cc (regopt): Change the first argument to wide char string.

(environ_init): Accommodate change to the first argument of regopt.
* exception.cc (open_stackdumpfile): Accommodate change to the type of progname
in _pinfo.
* external.cc (fillout_pinfo): Ditto.
* fhandler_process.cc (format_process_winexename): Ditto.
(format_process_stat): Ditto.
* fork.cc (fork::parent): Ditto.
* pinfo.cc (pinfo_basic::pinfo_basic): Call GetModuleFileNameW instead of
GetModuleFileName.
(pinfo::thisproc): Accommodate change to the type of progname in _pinfo.
(pinfo_init): Ditto.
* pinfo.h (_pinfo): Change the type of progname to a wide char array.
* registry.h (reg_key::get_int): Change the first argument from constant point
to pointer to constant.
(reg_key::get_string): Ditto.  Change the last argument likewise.
* registry.cc (reg_key::get_int): Accommodate change to the declaration.
(reg_key::get_string): Ditto.
* strace.cc (strace::hello): Accommodate change to the type of progname in
_pinfo.
(strace::vsprntf): Ditto.
This commit is contained in:
Christopher Faylor
2010-05-18 14:30:51 +00:00
parent c8bd391c32
commit d3258e063c
12 changed files with 89 additions and 60 deletions

View File

@ -342,13 +342,8 @@ frok::parent (volatile char * volatile stack_here)
si.lpReserved2 = (LPBYTE) &ch;
si.cbReserved2 = sizeof (ch);
/* FIXME: myself->progname should be converted to WCHAR. */
tmp_pathbuf tp;
PWCHAR progname = tp.w_get ();
sys_mbstowcs (progname, NT_MAX_PATH, myself->progname);
syscall_printf ("CreateProcess (%W, %W, 0, 0, 1, %p, 0, 0, %p, %p)",
progname, progname, c_flags, &si, &pi);
myself->progname, myself->progname, c_flags, &si, &pi);
bool locked = __malloc_lock ();
time_t start_time = time (NULL);
@ -358,8 +353,8 @@ frok::parent (volatile char * volatile stack_here)
while (1)
{
rc = CreateProcessW (progname, /* image to run */
progname, /* what we send in arg0 */
rc = CreateProcessW (myself->progname, /* image to run */
myself->progname, /* what we send in arg0 */
&sec_none_nih,
&sec_none_nih,
TRUE, /* inherit handles from parent */
@ -430,7 +425,7 @@ frok::parent (volatile char * volatile stack_here)
/* Initialize things that are done later in dll_crt0_1 that aren't done
for the forkee. */
strcpy (child->progname, myself->progname);
wcscpy (child->progname, myself->progname);
/* Fill in fields in the child's process table entry. */
child->dwProcessId = pi.dwProcessId;