Commit 331947c9 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Move some initialization code to ntdll.

parent 74eaa341
......@@ -170,20 +170,11 @@ void * CDECL __wine_kernel_init(void)
{
static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2',0};
PEB *peb = NtCurrentTeb()->Peb;
RTL_USER_PROCESS_PARAMETERS *params = peb->ProcessParameters;
/* Initialize everything */
setbuf(stdout,NULL);
setbuf(stderr,NULL);
kernel32_handle = GetModuleHandleW(kernel32W);
RtlSetUnhandledExceptionFilter( UnhandledExceptionFilter );
LOCALE_Init();
if (!params->CurrentDirectory.Handle) chdir("/"); /* avoid locking removable devices */
return start_process_wrapper;
}
......
......@@ -284,6 +284,8 @@ int __cdecl __wine_dbg_header( enum __wine_debug_class cls, struct __wine_debug_
*/
void debug_init(void)
{
setbuf( stdout, NULL );
setbuf( stderr, NULL );
ntdll_get_thread_data()->debug_info = &initial_info;
init_done = TRUE;
}
......@@ -1546,5 +1546,6 @@ done:
RtlInitUnicodeString( &curdir, windows_dir );
RtlSetCurrentDirectory_U( &curdir );
}
if (!params->CurrentDirectory.Handle) chdir("/"); /* avoid locking removable devices */
set_wow64_environment( &params->Environment );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment