winecrt0: Remove constructor support for exe and native modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6ac357667e
commit
2ba1b7fd3b
|
@ -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 \
|
||||
|
|
|
@ -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 <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 @@
|
|||
#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 ));
|
||||
}
|
||||
|
|
|
@ -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 ));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue