Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-05-18 18:30:51 +0400
committerChristopher Faylor <me@cgf.cx>2010-05-18 18:30:51 +0400
commitd3258e063cb0a4fc77a76df3c91ba9841ca4971c (patch)
tree2921ded7329f12667d439c207fa81f15575dba14 /winsup/cygwin/pinfo.cc
parentc8bd391c328c8650a93388f5cb3409c3740ee963 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index cdc801d56..e0b1e1f02 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -39,7 +39,7 @@ public:
pinfo_basic::pinfo_basic()
{
pid = dwProcessId = GetCurrentProcessId ();
- GetModuleFileName (NULL, progname, sizeof (progname));
+ GetModuleFileNameW (NULL, progname, sizeof (progname));
}
pinfo_basic myself_initial NO_COPY;
@@ -62,7 +62,7 @@ pinfo::thisproc (HANDLE h)
init (cygheap->pid, PID_IN_USE, h ?: INVALID_HANDLE_VALUE);
procinfo->process_state |= PID_IN_USE;
procinfo->dwProcessId = myself_initial.pid;
- strcpy (procinfo->progname, myself_initial.progname);
+ wcscpy (procinfo->progname, myself_initial.progname);
strace.hello ();
debug_printf ("myself->dwProcessId %u", procinfo->dwProcessId);
if (h)
@@ -121,7 +121,9 @@ status_exit (DWORD x)
case STATUS_DLL_NOT_FOUND:
{
char posix_prog[NT_MAX_PATH];
- path_conv pc (myself->progname, PC_NOWARN);
+ UNICODE_STRING uc;
+ RtlInitUnicodeString(&uc, myself->progname);
+ path_conv pc (&uc, PC_NOWARN);
mount_table->conv_to_posix_path (pc.get_win32 (), posix_prog, 1);
small_printf ("%s: error while loading shared libraries: %s: cannot open shared object file: No such file or directory\n",
posix_prog, find_first_notloaded_dll (pc));