Author: jmorlan
Date: Mon Jun 30 11:18:46 2008
New Revision: 34222
URL:
http://svn.reactos.org/svn/reactos?rev=34222&view=rev
Log:
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.
Modified:
trunk/reactos/lib/3rdparty/mingw/wmain.c
Modified: trunk/reactos/lib/3rdparty/mingw/wmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/wmain.c…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/wmain.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/wmain.c [iso-8859-1] Mon Jun 30 11:18:46 2008
@@ -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);
@@ -25,6 +26,12 @@
wchar_t *szCmd;
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 ();