winecrt0: Get rid of constructor support.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Alexandre Julliard 2020-04-21 11:28:03 +02:00
parent 1ccd638b1a
commit f6a363bc41
4 changed files with 0 additions and 138 deletions

View File

@ -4,7 +4,6 @@ C_SRCS = \
crt_dllmain.c \
debug.c \
delay_load.c \
dll_entry.c \
dll_main.c \
exception.c \
exe16_entry.c \
@ -12,6 +11,5 @@ C_SRCS = \
exe_main.c \
exe_wentry.c \
exe_wmain.c \
init.c \
register.c \
stub.c

View File

@ -1,41 +0,0 @@
/*
* crt0 library private definitions
*
* 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
*/
#ifndef __WINE_CRT0_PRIVATE_H__
#define __WINE_CRT0_PRIVATE_H__
#if defined(__APPLE__) || defined(__ANDROID__)
static inline void _init(int argc, char **argv, char **envp ) { /* nothing */ }
static inline void _fini(void) { /* nothing */ }
#else
extern void _init(int argc, char **argv, char **envp ) DECLSPEC_HIDDEN;
extern void _fini(void) DECLSPEC_HIDDEN;
#endif
enum init_state
{
NO_INIT_DONE, /* no initialization done yet */
DLL_REGISTERED, /* the dll has been registered */
CONSTRUCTORS_DONE /* the constructors have been run (implies dll registered too) */
};
extern enum init_state __wine_spec_init_state DECLSPEC_HIDDEN;
#endif /* __WINE_CRT0_PRIVATE_H__ */

View File

@ -1,49 +0,0 @@
/*
* Default entry point for a dll
*
* 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 "winbase.h"
#include "wine/library.h"
#include "crt0_private.h"
extern BOOL WINAPI DECLSPEC_HIDDEN DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved );
BOOL WINAPI DECLSPEC_HIDDEN __wine_spec_dll_entry( HINSTANCE inst, DWORD reason, LPVOID reserved )
{
static BOOL call_fini;
BOOL ret;
if (reason == DLL_PROCESS_ATTACH && __wine_spec_init_state != CONSTRUCTORS_DONE)
{
call_fini = TRUE;
_init( 0, NULL, NULL );
}
ret = DllMain( inst, reason, reserved );
if (reason == DLL_PROCESS_DETACH && call_fini) _fini();
return ret;
}

View File

@ -1,46 +0,0 @@
/*
* Initialization code for spec files
*
* 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 "winbase.h"
#include "wine/library.h"
#include "crt0_private.h"
enum init_state __wine_spec_init_state = NO_INIT_DONE;
extern const IMAGE_NT_HEADERS __wine_spec_nt_header;
extern const char __wine_spec_file_name[];
void DECLSPEC_HIDDEN __wine_spec_init(void)
{
__wine_spec_init_state = DLL_REGISTERED;
__wine_dll_register( &__wine_spec_nt_header, __wine_spec_file_name );
}
void DECLSPEC_HIDDEN __wine_spec_init_ctor(void)
{
if (__wine_spec_init_state == NO_INIT_DONE) __wine_spec_init();
__wine_spec_init_state = CONSTRUCTORS_DONE;
}