diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in index 675002e938b..909959dcb68 100644 --- a/dlls/winecrt0/Makefile.in +++ b/dlls/winecrt0/Makefile.in @@ -6,7 +6,6 @@ C_SRCS = \ delay_load.c \ dll_entry.c \ dll_main.c \ - drv_entry.c \ exception.c \ exe16_entry.c \ exe_entry.c \ diff --git a/dlls/winecrt0/drv_entry.c b/dlls/winecrt0/drv_entry.c deleted file mode 100644 index c7d39922e1a..00000000000 --- a/dlls/winecrt0/drv_entry.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Default entry point for a native driver - * - * Copyright 2005 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#if 0 -#pragma makedep unix -#endif - -#include -#include "windef.h" -#include "winternl.h" -#include "wine/library.h" -#include "crt0_private.h" - -struct _DRIVER_OBJECT; -extern NTSTATUS WINAPI DriverEntry( struct _DRIVER_OBJECT *obj, UNICODE_STRING *path ); - -NTSTATUS DECLSPEC_HIDDEN WINAPI __wine_spec_drv_entry( struct _DRIVER_OBJECT *obj, UNICODE_STRING *path ) -{ - BOOL needs_init = (__wine_spec_init_state != CONSTRUCTORS_DONE); - - if (needs_init) _init( 0, NULL, NULL ); - return DriverEntry( obj, path ); - /* there is no detach routine so we can't call destructors */ -} diff --git a/dlls/winecrt0/exe_entry.c b/dlls/winecrt0/exe_entry.c index 803d56e10ee..93a323f42a6 100644 --- a/dlls/winecrt0/exe_entry.c +++ b/dlls/winecrt0/exe_entry.c @@ -26,7 +26,6 @@ #include "windef.h" #include "winbase.h" #include "winternl.h" -#include "crt0_private.h" extern int __cdecl main( int argc, char *argv[] ); @@ -96,12 +95,7 @@ static char **build_argv( const char *src, int *ret_argc ) DWORD WINAPI DECLSPEC_HIDDEN __wine_spec_exe_entry( PEB *peb ) { int argc; - BOOL needs_init = (__wine_spec_init_state != CONSTRUCTORS_DONE); char **argv = build_argv( GetCommandLineA(), &argc ); - DWORD ret; - if (needs_init) _init( argc, argv, NULL ); - ret = main( argc, argv ); - if (needs_init) _fini(); - ExitProcess( ret ); + ExitProcess( main( argc, argv )); } diff --git a/dlls/winecrt0/exe_wentry.c b/dlls/winecrt0/exe_wentry.c index b01bfd62109..0524dce99a7 100644 --- a/dlls/winecrt0/exe_wentry.c +++ b/dlls/winecrt0/exe_wentry.c @@ -26,7 +26,6 @@ #include "windef.h" #include "winbase.h" #include "winternl.h" -#include "crt0_private.h" extern int __cdecl wmain( int argc, WCHAR *argv[] ); @@ -96,12 +95,7 @@ static WCHAR **build_argv( const WCHAR *src, int *ret_argc ) DWORD WINAPI DECLSPEC_HIDDEN __wine_spec_exe_wentry( PEB *peb ) { int argc; - BOOL needs_init = (__wine_spec_init_state != CONSTRUCTORS_DONE); WCHAR **argv = build_argv( GetCommandLineW(), &argc ); - DWORD ret; - if (needs_init) _init( 0, NULL, NULL ); - ret = wmain( argc, argv ); - if (needs_init) _fini(); - ExitProcess( ret ); + ExitProcess( wmain( argc, argv )); }