msvcrt: Use more public declarations in exe entry points.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Jacek Caban 2020-02-27 11:59:12 +01:00 committed by Alexandre Julliard
parent c15733dead
commit c6b852e3c3
2 changed files with 4 additions and 12 deletions

View File

@ -25,15 +25,11 @@
#ifdef __MINGW32__
#include <stdarg.h>
#include <process.h>
#include "windef.h"
#include "winbase.h"
/* FIXME: Use msvcrt headers once we move to PE file */
void __cdecl exit(int);
void __cdecl __getmainargs(int *, char ***, char ***, int, int *);
void __cdecl __set_app_type(int);
int __cdecl main(int argc, char **argv, char **env);
static const IMAGE_NT_HEADERS *get_nt_header( void )
@ -48,7 +44,7 @@ int __cdecl mainCRTStartup(void)
char **argv, **env;
__getmainargs(&argc, &argv, &env, 0, &new_mode);
__set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? 2 : 1);
_set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? _crt_gui_app : _crt_console_app);
ret = main(argc, argv, env);

View File

@ -25,15 +25,11 @@
#ifdef __MINGW32__
#include <stdarg.h>
#include <process.h>
#include "windef.h"
#include "winbase.h"
/* FIXME: Use msvcrt headers once we move to PE file */
void __cdecl exit(int);
void __cdecl __wgetmainargs(int *, WCHAR ***, WCHAR ***, int, int *);
void __cdecl __set_app_type(int);
int __cdecl wmain(int argc, WCHAR **argv, WCHAR **env);
static const IMAGE_NT_HEADERS *get_nt_header( void )
@ -48,7 +44,7 @@ int __cdecl wmainCRTStartup(void)
WCHAR **argv, **env;
__wgetmainargs(&argc, &argv, &env, 0, &new_mode);
__set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? 2 : 1);
_set_app_type(get_nt_header()->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI ? _crt_gui_app : _crt_console_app);
ret = wmain(argc, argv, env);