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:
Jeffrey Morlan 2008-06-30 16:18:46 +00:00
parent 678dcf823c
commit d4687baa63

View file

@ -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);