* cygcheck.cc (load_cygwin): Duplicate argv list since it disappears when
cygwin1.dll is unloaded.
This commit is contained in:
parent
ef432bbddf
commit
ea8432dfb1
|
@ -1,3 +1,8 @@
|
||||||
|
2008-08-04 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
|
* cygcheck.cc (load_cygwin): Duplicate argv list since it disappears
|
||||||
|
when cygwin1.dll is unloaded.
|
||||||
|
|
||||||
2008-07-30 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
2008-07-30 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
||||||
|
|
||||||
* Makefile.in: Link cygcheck with -lntdll even without mingw-zlib.
|
* Makefile.in: Link cygcheck with -lntdll even without mingw-zlib.
|
||||||
|
|
|
@ -2024,8 +2024,15 @@ load_cygwin (int& argc, char **&argv)
|
||||||
{
|
{
|
||||||
char **av = (char **) cygwin_internal (CW_ARGV);
|
char **av = (char **) cygwin_internal (CW_ARGV);
|
||||||
if (av && ((DWORD) av != (DWORD) -1))
|
if (av && ((DWORD) av != (DWORD) -1))
|
||||||
for (argc = 0, argv = av; *av; av++)
|
{
|
||||||
argc++;
|
/* Copy cygwin's idea of the argument list into this Window application. */
|
||||||
|
for (argc = 0; av[argc]; argc++)
|
||||||
|
continue;
|
||||||
|
argv = (char **) calloc (argc + 1, sizeof (char *));
|
||||||
|
for (char **argvp = argv; *av; av++)
|
||||||
|
*argvp++ = strdup (*av);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
char **envp = (char **) cygwin_internal (CW_ENVP);
|
char **envp = (char **) cygwin_internal (CW_ENVP);
|
||||||
if (envp && ((DWORD) envp != (DWORD) -1))
|
if (envp && ((DWORD) envp != (DWORD) -1))
|
||||||
|
|
Loading…
Reference in New Issue