diff options
author | David Billinghurst <David.Billinghurst@riotinto.com> | 2005-03-07 04:18:08 +0000 |
---|---|---|
committer | David Billinghurst <billingd@gcc.gnu.org> | 2005-03-07 04:18:08 +0000 |
commit | 01c65e8a300e1b897a558564c80302b056ea07b0 (patch) | |
tree | 116c5328df2b698b0829f917063c0b730c1db7ad /gcc | |
parent | 543144ed5d39a106fd0a68b3b3867c3f1859e524 (diff) | |
download | gcc-01c65e8a300e1b897a558564c80302b056ea07b0.zip gcc-01c65e8a300e1b897a558564c80302b056ea07b0.tar.gz gcc-01c65e8a300e1b897a558564c80302b056ea07b0.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/i386/cygwin1.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ca5db6..d43ce69 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +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> * config/ia64/hpux.h (LINK_SPEC): Add -z. diff --git a/gcc/config/i386/cygwin1.c b/gcc/config/i386/cygwin1.c index 2cab96c..88c44fc 100644 --- a/gcc/config/i386/cygwin1.c +++ b/gcc/config/i386/cygwin1.c @@ -30,13 +30,13 @@ mingw_scan (int argc ATTRIBUTE_UNUSED, const char *const *argv, char **spec_machine) { - putenv ("GCC_CYGWIN_MINGW=0"); + putenv (xstrdup ("GCC_CYGWIN_MINGW=0")); while (*++argv) if (strcmp (*argv, "-mno-win32") == 0) - putenv ("GCC_CYGWIN_WIN32=0"); + putenv (xstrdup ("GCC_CYGWIN_WIN32=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) { char *p = strstr (*spec_machine, "-cygwin"); @@ -48,7 +48,7 @@ mingw_scan (int argc ATTRIBUTE_UNUSED, strcpy (s + len, "-mingw32"); *spec_machine = s; } - putenv ("GCC_CYGWIN_MINGW=1"); + putenv (xstrdup ("GCC_CYGWIN_MINGW=1")); } return; } |