06e4afe6319fed02197d98efab57093e25b6f847
[reactos.git] / reactos / lib / 3rdparty / mingw / crt0_w.c
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6
7 #include <windows.h>
8
9 extern void __main(void);
10
11 int WINAPI wWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPWSTR lpCmdLine,int nShowCmd);
12
13 int wmain (int flags, wchar_t **cmdline, wchar_t **inst)
14 {
15 #ifdef __GNUC__
16 /* C++ initialization.
17 gcc inserts this call automatically for a function called main , but not for wmain. */
18 __main();
19 #endif
20 return (int) wWinMain ((HINSTANCE) inst, NULL, (LPWSTR) cmdline,(DWORD) flags);
21 }