Fix passing of command line args so it works on win64 too.

svn path=/branches/ros-amd64-bringup/; revision=34754
This commit is contained in:
Samuel Serapion
2008-07-24 20:15:36 +00:00
parent efc2458c66
commit e5056878c6
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -47,6 +47,10 @@ __MINGW_IMPORT
void __set_app_type(int);
#endif /* __MSVCRT__ */
#ifndef __initenv
extern char ***_imp____initenv;
#define __initenv (*_imp____initenv)
#endif
/*
* Setup the default file handles to have the _CRT_fmode mode, as well as
@@ -235,7 +239,7 @@ __mingw_CRTStartup (void)
* that one calls WinMain. See main.c in the 'lib' dir
* for more details.
*/
nRet = main (_argc, _argv, _environ);
nRet = main (_argc, _argv, __initenv);
/*
* Perform exit processing for the C library. This means
+5 -1
View File
@@ -45,6 +45,10 @@ extern int wmain (int, wchar_t **, wchar_t **);
__MINGW_IMPORT void __set_app_type(int);
#endif /* __MSVCRT__ */
#ifndef __winitenv
extern wchar_t ***_imp____winitenv;
#define __winitenv (*_imp____winitenv)
#endif
/*
* Setup the default file handles to have the _CRT_fmode mode, as well as
@@ -233,7 +237,7 @@ __mingw_wCRTStartup (void)
* that one calls WinMain. See main.c in the 'lib' dir
* for more details.
*/
nRet = wmain (_argc, _wargv, NULL);
nRet = wmain (_argc, _wargv, __winitenv);
/*
* Perform exit processing for the C library. This means