mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 19:22:58 +00:00
Get explorer working again, by making wmain explicitly call the C++ initialization function __main. gcc only adds the call automatically in a function called main.
svn path=/trunk/; revision=34222
This commit is contained in:
parent
678dcf823c
commit
d4687baa63
1 changed files with 7 additions and 0 deletions
7
reactos/lib/3rdparty/mingw/wmain.c
vendored
7
reactos/lib/3rdparty/mingw/wmain.c
vendored
|
@ -16,6 +16,7 @@
|
|||
|
||||
#define ISSPACE(a) (a == ' ' || a == '\t')
|
||||
|
||||
extern void __main();
|
||||
extern int PASCAL wWinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
||||
LPWSTR szCmdLine, int nShow);
|
||||
|
||||
|
@ -26,6 +27,12 @@ wmain (int argc, const wchar_t *argv[], const wchar_t *environ[])
|
|||
STARTUPINFOW startinfo;
|
||||
int nRet;
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* C++ initialization. (gcc inserts this call automatically for
|
||||
* a function called "main", but not for "wmain") */
|
||||
__main();
|
||||
#endif
|
||||
|
||||
/* Get the command line passed to the process. */
|
||||
szCmd = GetCommandLineW ();
|
||||
GetStartupInfoW (&startinfo);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue