]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cygwin1.c (mingw_scan): Use xstrdup in calls to putenv.
authorDavid Billinghurst <David.Billinghurst@riotinto.com>
Mon, 7 Mar 2005 04:24:07 +0000 (04:24 +0000)
committerDavid Billinghurst <billingd@gcc.gnu.org>
Mon, 7 Mar 2005 04:24:07 +0000 (04:24 +0000)
2005-03-07  David Billinghurst <David.Billinghurst@riotinto.com>

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

From-SVN: r96008

gcc/ChangeLog
gcc/config/i386/cygwin1.c

index 6a69237c20aac046c847135a4a154ba4f165cdc3..f2d431eb60049a5075a2ff4d7903613baae0f914 100644 (file)
@@ -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-03  Alan Modra  <amodra@bigpond.net.au>
 
        PR target/20277
index 2cab96c195c6ac680ba53ab23c0e0af9dff5bf81..88c44fc9fbf6f7ee8a07da66bbed7ec8832a74f8 100644 (file)
@@ -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;
 }