* dcrt0.cc (dll_crt0_0): Call malloc_init and user_shared_initialize_1
here in case we're dynamically loaded. Explain why. (dll_crt0_1): Call user_shared_initialize_1 from here. * mount.cc (is_native_path): New inline function testing for native and long Win32 path prefix. (is_unc_share): Remove long WIn32 path prefix test. (mount_info::create_root_entry): Use PATH_MAX buffer. (mount_info::init): Ditto. (mount_info::add_item): Test for is_native_path as well. * path.cc (normalize_win32_path): Simplify native path prefix code. * shared.cc (user_shared_initialize_1): New function taking user shared initialization code relying on malloc and cygtls. (user_shared_initialize): Move mountinfo initialization to user_shared_initialize_1. * shared_info.h (user_shared_initialize_1): Declare. * syscalls.cc (seteuid32): Call user_shared_initialize_1 after user changed.
This commit is contained in:
@ -1311,12 +1311,9 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
|
||||
{
|
||||
src += 4;
|
||||
if (src[1] != ':') /* native UNC path */
|
||||
{
|
||||
src += 2; /* Fortunately the first char is not copied... */
|
||||
beg_src_slash = true;
|
||||
}
|
||||
src += 2; /* Fortunately the first char is not copied... */
|
||||
else
|
||||
beg_src_slash = isdirsep (src[0]);
|
||||
beg_src_slash = false;
|
||||
}
|
||||
if (beg_src_slash && isdirsep (src[1]))
|
||||
{
|
||||
|
Reference in New Issue
Block a user