Commit 2ba1b7fd authored by Alexandre Julliard's avatar Alexandre Julliard

winecrt0: Remove constructor support for exe and native modules.

parent 6ac35766
...@@ -6,7 +6,6 @@ C_SRCS = \ ...@@ -6,7 +6,6 @@ C_SRCS = \
delay_load.c \ delay_load.c \
dll_entry.c \ dll_entry.c \
dll_main.c \ dll_main.c \
drv_entry.c \
exception.c \ exception.c \
exe16_entry.c \ exe16_entry.c \
exe_entry.c \ exe_entry.c \
......
/*
* 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 <stdarg.h>
#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 */
}
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winternl.h" #include "winternl.h"
#include "crt0_private.h"
extern int __cdecl main( int argc, char *argv[] ); extern int __cdecl main( int argc, char *argv[] );
...@@ -96,12 +95,7 @@ static char **build_argv( const char *src, int *ret_argc ) ...@@ -96,12 +95,7 @@ static char **build_argv( const char *src, int *ret_argc )
DWORD WINAPI DECLSPEC_HIDDEN __wine_spec_exe_entry( PEB *peb ) DWORD WINAPI DECLSPEC_HIDDEN __wine_spec_exe_entry( PEB *peb )
{ {
int argc; int argc;
BOOL needs_init = (__wine_spec_init_state != CONSTRUCTORS_DONE);
char **argv = build_argv( GetCommandLineA(), &argc ); char **argv = build_argv( GetCommandLineA(), &argc );
DWORD ret;
if (needs_init) _init( argc, argv, NULL ); ExitProcess( main( argc, argv ));
ret = main( argc, argv );
if (needs_init) _fini();
ExitProcess( ret );
} }
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winternl.h" #include "winternl.h"
#include "crt0_private.h"
extern int __cdecl wmain( int argc, WCHAR *argv[] ); extern int __cdecl wmain( int argc, WCHAR *argv[] );
...@@ -96,12 +95,7 @@ static WCHAR **build_argv( const WCHAR *src, int *ret_argc ) ...@@ -96,12 +95,7 @@ static WCHAR **build_argv( const WCHAR *src, int *ret_argc )
DWORD WINAPI DECLSPEC_HIDDEN __wine_spec_exe_wentry( PEB *peb ) DWORD WINAPI DECLSPEC_HIDDEN __wine_spec_exe_wentry( PEB *peb )
{ {
int argc; int argc;
BOOL needs_init = (__wine_spec_init_state != CONSTRUCTORS_DONE);
WCHAR **argv = build_argv( GetCommandLineW(), &argc ); WCHAR **argv = build_argv( GetCommandLineW(), &argc );
DWORD ret;
if (needs_init) _init( 0, NULL, NULL ); ExitProcess( wmain( argc, argv ));
ret = wmain( argc, argv );
if (needs_init) _fini();
ExitProcess( ret );
} }
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