Alexandre Julliard : winecrt0: Remove constructor support for exe and native modules.
Alexandre Julliard
julliard at winehq.org
Wed Apr 15 15:55:42 CDT 2020
Module: wine
Branch: master
Commit: 2ba1b7fd3b3db0c76f9d97e5142caf3fc947d72c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2ba1b7fd3b3db0c76f9d97e5142caf3fc947d72c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Apr 15 20:03:13 2020 +0200
winecrt0: Remove constructor support for exe and native modules.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winecrt0/Makefile.in | 1 -
dlls/winecrt0/drv_entry.c | 41 -----------------------------------------
dlls/winecrt0/exe_entry.c | 8 +-------
dlls/winecrt0/exe_wentry.c | 8 +-------
4 files changed, 2 insertions(+), 56 deletions(-)
diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in
index 675002e938..909959dcb6 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 c7d39922e1..0000000000
--- 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 <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 */
-}
diff --git a/dlls/winecrt0/exe_entry.c b/dlls/winecrt0/exe_entry.c
index 803d56e10e..93a323f42a 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 b01bfd6210..0524dce99a 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 ));
}
More information about the wine-cvs
mailing list