From: <ped...@us...> - 2007-06-24 21:45:16
|
Revision: 995 http://svn.sourceforge.net/cegcc/?rev=995&view=rev Author: pedroalves Date: 2007-06-24 14:45:10 -0700 (Sun, 24 Jun 2007) Log Message: ----------- * winmain_ce.c (_argc, _argv): Rename to ... (__argc, __argv): ... this. (main): Declare. (WinMain): Convert C++ comments into C style comments. Use __argc and __argv instead of _argc nad _argv. Pass NULL as third parameter to main. Modified Paths: -------------- trunk/cegcc/src/mingw/ChangeLog.mingw32ce trunk/cegcc/src/mingw/winmain_ce.c Modified: trunk/cegcc/src/mingw/ChangeLog.mingw32ce =================================================================== --- trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2007-06-24 21:41:02 UTC (rev 994) +++ trunk/cegcc/src/mingw/ChangeLog.mingw32ce 2007-06-24 21:45:10 UTC (rev 995) @@ -1,5 +1,14 @@ 2007-06-24 Pedro Alves <ped...@po...> + * winmain_ce.c (_argc, _argv): Rename to ... + (__argc, __argv): ... this. + (main): Declare. + (WinMain): Convert C++ comments into C style comments. + Use __argc and __argv instead of _argc nad _argv. Pass NULL as third + parameter to main. + +2007-06-24 Pedro Alves <ped...@po...> + * include/getopt.h [__COREDLL__]: Expose contents. * include/io.h (_finddata_t, _wfinddata_t, _findfirst, _findnext) (_findclose, _rmdir, _mkdir, _chmod, chdir, getcwd, mkdir, mktemp) Modified: trunk/cegcc/src/mingw/winmain_ce.c =================================================================== --- trunk/cegcc/src/mingw/winmain_ce.c 2007-06-24 21:41:02 UTC (rev 994) +++ trunk/cegcc/src/mingw/winmain_ce.c 2007-06-24 21:45:10 UTC (rev 995) @@ -18,9 +18,11 @@ * Access to a standard 'main'-like argument count and list. Also included * is a table of environment variables. */ -int _argc = 0; -char **_argv = 0; +int __argc = 0; +char **__argv = 0; +extern int main (int, char **, char **); + static int _parse_tokens(char* string, char*** tokens, int length) { @@ -131,17 +133,20 @@ return; } -// Normally, the application will define a WinMain function. However, -// if the main application does not, this dummy WinMain will call a -// main() function instead. -extern int __cdecl -WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, - LPWSTR szCmdLine, int nShow) +/* Normally, the application will define a WinMain function. However, + * if the main application does not, this dummy WinMain will call a + * main() function instead. + */ +int +WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, + LPWSTR szCmdLine, int nShow) { /* * Set up __argc, __argv. */ - __mainArgs(&_argc, &_argv, szCmdLine); + __mainArgs(&__argc, &__argv, szCmdLine); - return main(_argc, _argv); + /* Pass in a NULL environ for those apps that expect it. Better + than stack garbage. */ + return main(__argc, __argv, NULL); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |