msvcrt: Build the CRT startup code also for non-PE builds.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-04-15 16:27:55 +02:00
parent b66e13ef24
commit a2e1e499ad
4 changed files with 6 additions and 20 deletions

View File

@ -22,8 +22,6 @@
#pragma makedep implib
#endif
#ifdef __MINGW32__
#if _MSVCR_VER >= 140
#define _UCRT
#endif
@ -34,13 +32,14 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
int __cdecl main(int argc, char **argv, char **env);
static const IMAGE_NT_HEADERS *get_nt_header( void )
{
extern IMAGE_DOS_HEADER __ImageBase;
return (const IMAGE_NT_HEADERS *)((char *)&__ImageBase + __ImageBase.e_lfanew);
IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)NtCurrentTeb()->Peb->ImageBaseAddress;
return (const IMAGE_NT_HEADERS *)((char *)dos + dos->e_lfanew);
}
int __cdecl mainCRTStartup(void)
@ -65,5 +64,3 @@ int __cdecl mainCRTStartup(void)
exit(ret);
return ret;
}
#endif

View File

@ -22,8 +22,6 @@
#pragma makedep implib
#endif
#ifdef __MINGW32__
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
@ -54,5 +52,3 @@ int __cdecl main( int argc, char *argv[] )
if (!(info.dwFlags & STARTF_USESHOWWINDOW)) info.wShowWindow = SW_SHOWNORMAL;
return WinMain( GetModuleHandleA(0), 0, cmdline, info.wShowWindow );
}
#endif

View File

@ -22,8 +22,6 @@
#pragma makedep implib
#endif
#ifdef __MINGW32__
#if _MSVCR_VER >= 140
#define _UCRT
#endif
@ -34,13 +32,14 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
int __cdecl wmain(int argc, WCHAR **argv, WCHAR **env);
static const IMAGE_NT_HEADERS *get_nt_header( void )
{
extern IMAGE_DOS_HEADER __ImageBase;
return (const IMAGE_NT_HEADERS *)((char *)&__ImageBase + __ImageBase.e_lfanew);
IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)NtCurrentTeb()->Peb->ImageBaseAddress;
return (const IMAGE_NT_HEADERS *)((char *)dos + dos->e_lfanew);
}
int __cdecl wmainCRTStartup(void)
@ -65,5 +64,3 @@ int __cdecl wmainCRTStartup(void)
exit(ret);
return ret;
}
#endif

View File

@ -22,8 +22,6 @@
#pragma makedep implib
#endif
#ifdef __MINGW32__
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
@ -56,5 +54,3 @@ int __cdecl wmain( int argc, WCHAR *argv[] )
if (!(info.dwFlags & STARTF_USESHOWWINDOW)) info.wShowWindow = SW_SHOWNORMAL;
return wWinMain( GetModuleHandleW(0), 0, cmdline, info.wShowWindow );
}
#endif