Commit 01c65e8a by David Billinghurst Committed by David Billinghurst

cygwin1.c (mingw_scan): Use xstrdup in calls to putenv.

2005-03-07  David Billinghurst <David.Billinghurst@riotinto.com>

	* config/i386/cygwin1.c(mingw_scan): Use xstrdup in calls to putenv.

From-SVN: r96006
parent 543144ed
2005-03-07 David Billinghurst <David.Billinghurst@riotinto.com>
* config/i386/cygwin1.c(mingw_scan): Use xstrdup in calls to putenv.
2005-03-07 Joseph S. Myers <joseph@codesourcery.com> 2005-03-07 Joseph S. Myers <joseph@codesourcery.com>
* config/ia64/hpux.h (LINK_SPEC): Add -z. * config/ia64/hpux.h (LINK_SPEC): Add -z.
......
...@@ -30,13 +30,13 @@ mingw_scan (int argc ATTRIBUTE_UNUSED, ...@@ -30,13 +30,13 @@ mingw_scan (int argc ATTRIBUTE_UNUSED,
const char *const *argv, const char *const *argv,
char **spec_machine) char **spec_machine)
{ {
putenv ("GCC_CYGWIN_MINGW=0"); putenv (xstrdup ("GCC_CYGWIN_MINGW=0"));
while (*++argv) while (*++argv)
if (strcmp (*argv, "-mno-win32") == 0) if (strcmp (*argv, "-mno-win32") == 0)
putenv ("GCC_CYGWIN_WIN32=0"); putenv (xstrdup ("GCC_CYGWIN_WIN32=0"));
else if (strcmp (*argv, "-mwin32") == 0) else if (strcmp (*argv, "-mwin32") == 0)
putenv ("GCC_CYGWIN_WIN32=1"); putenv (xstrdup ("GCC_CYGWIN_WIN32=1"));
else if (strcmp (*argv, "-mno-cygwin") == 0) else if (strcmp (*argv, "-mno-cygwin") == 0)
{ {
char *p = strstr (*spec_machine, "-cygwin"); char *p = strstr (*spec_machine, "-cygwin");
...@@ -48,7 +48,7 @@ mingw_scan (int argc ATTRIBUTE_UNUSED, ...@@ -48,7 +48,7 @@ mingw_scan (int argc ATTRIBUTE_UNUSED,
strcpy (s + len, "-mingw32"); strcpy (s + len, "-mingw32");
*spec_machine = s; *spec_machine = s;
} }
putenv ("GCC_CYGWIN_MINGW=1"); putenv (xstrdup ("GCC_CYGWIN_MINGW=1"));
} }
return; return;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment