Author: sserapion
Date: Thu Jul 24 15:15:36 2008
New Revision: 34754
URL:
http://svn.reactos.org/svn/reactos?rev=34754&view=rev
Log:
Fix passing of command line args so it works on win64 too.
Modified:
branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c
branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c
Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3…
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crt1.c [iso-8859-1] Thu Jul 24
15:15:36 2008
@@ -47,6 +47,10 @@
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 @@
* 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
Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3…
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/wcrt1.c [iso-8859-1] Thu Jul 24
15:15:36 2008
@@ -45,6 +45,10 @@
__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 @@
* 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