* shared.cc (inst_root_inited): New static bool variable.
(init_installation_root): Set inst_root_inited to true. (memory_init): Print installation root debug output only if inst_root_inited is true.
This commit is contained in:
parent
73db6db783
commit
74ad9cc012
|
@ -1,3 +1,10 @@
|
||||||
|
2009-11-06 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* shared.cc (inst_root_inited): New static bool variable.
|
||||||
|
(init_installation_root): Set inst_root_inited to true.
|
||||||
|
(memory_init): Print installation root debug output only if
|
||||||
|
inst_root_inited is true.
|
||||||
|
|
||||||
2009-11-05 Corinna Vinschen <corinna@vinschen.de>
|
2009-11-05 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* syscalls.cc (nt_path_has_suffix): New function.
|
* syscalls.cc (nt_path_has_suffix): New function.
|
||||||
|
|
|
@ -37,6 +37,7 @@ HANDLE NO_COPY cygwin_user_h;
|
||||||
WCHAR installation_root[PATH_MAX] __attribute__((section (".cygwin_dll_common"), shared));
|
WCHAR installation_root[PATH_MAX] __attribute__((section (".cygwin_dll_common"), shared));
|
||||||
UNICODE_STRING installation_key __attribute__((section (".cygwin_dll_common"), shared));
|
UNICODE_STRING installation_key __attribute__((section (".cygwin_dll_common"), shared));
|
||||||
WCHAR installation_key_buf[18] __attribute__((section (".cygwin_dll_common"), shared));
|
WCHAR installation_key_buf[18] __attribute__((section (".cygwin_dll_common"), shared));
|
||||||
|
static bool inst_root_inited;
|
||||||
|
|
||||||
/* Use absolute path of cygwin1.dll to derive the Win32 dir which
|
/* Use absolute path of cygwin1.dll to derive the Win32 dir which
|
||||||
is our installation_root. Note that we can't handle Cygwin installation
|
is our installation_root. Note that we can't handle Cygwin installation
|
||||||
|
@ -114,6 +115,8 @@ init_installation_root ()
|
||||||
installation_key.Length = 0;
|
installation_key.Length = 0;
|
||||||
installation_key.Buffer[0] = L'\0';
|
installation_key.Buffer[0] = L'\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inst_root_inited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function returns a handle to the top-level directory in the global
|
/* This function returns a handle to the top-level directory in the global
|
||||||
|
@ -432,6 +435,7 @@ memory_init (bool init_cygheap)
|
||||||
/* Defer debug output printing the installation root and installation key
|
/* Defer debug output printing the installation root and installation key
|
||||||
up to this point. Debug output except for system_printf requires
|
up to this point. Debug output except for system_printf requires
|
||||||
the global shared memory to exist. */
|
the global shared memory to exist. */
|
||||||
|
if (inst_root_inited)
|
||||||
debug_printf ("Installation root: <%W> key: <%S>",
|
debug_printf ("Installation root: <%W> key: <%S>",
|
||||||
installation_root, &installation_key);
|
installation_root, &installation_key);
|
||||||
cygwin_shared->initialize ();
|
cygwin_shared->initialize ();
|
||||||
|
|
Loading…
Reference in New Issue