]> sourceware.org Git - newlib-cygwin.git/commitdiff
* cygcheck.cc (load_cygwin): Don't touch $PATH for now.
authorCorinna Vinschen <corinna@vinschen.de>
Sun, 15 May 2005 12:29:47 +0000 (12:29 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Sun, 15 May 2005 12:29:47 +0000 (12:29 +0000)
(print_version): Fix copyright.
* strace.cc (print_version): Ditto.

winsup/utils/ChangeLog
winsup/utils/cygcheck.cc
winsup/utils/strace.cc

index 081844258efc8655bfc3a86918a221bcaf1a5b29..43f374a635110b38c660c0c039f8cbaccea118f9 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-15  Corinna Vinschen  <corinna@vinschen.de>
+
+       * cygcheck.cc (load_cygwin): Don't touch $PATH for now.
+       (print_version): Fix copyright.
+       * strace.cc (print_version): Ditto.
+
 2005-05-13  Christopher Faylor  <cgf@timesys.com>
 
        * mount.cc (mount_commands): Display "-X" option when appropriate.
index dd815b9ed6743f6523934c6c535087e186fe24e6..afd43175c4b19aa2fcb8f69f8c7c6cac2e7d5b81 100644 (file)
@@ -1,6 +1,6 @@
 /* cygcheck.cc
 
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
 
    This file is part of Cygwin.
 
@@ -1424,7 +1424,7 @@ print_version ()
   printf ("\
 cygcheck version %.*s\n\
 System Checker for Cygwin\n\
-Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.\n\
+Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.\n\
 Compiled on %s\n\
 ", len, v, __DATE__);
 }
@@ -1459,10 +1459,19 @@ load_cygwin (int& argc, char **&argv)
   char **envp = (char **) cygwin_internal (CW_ENVP);
   if (envp)
     {
+      /* Store path and revert to this value, otherwise path gets overwritten
+         by the POSIXy Cygwin variation, which breaks cygcheck.
+        Another approach would be to use the Cygwin PATH and convert it to
+        Win32 again. */
+      char *path = NULL;
       while (*_environ)
-       nuke (*_environ);
+       {
+         if (!strncmp (*_environ, "PATH=", 5))
+           path = strdup (*_environ);
+         nuke (*_environ);
+        }
       for (char **ev = envp; *ev; ev++)
-       putenv (*ev);
+       putenv (!strncmp (*ev, "PATH=", 5) ? path : *ev);
     }
 }
 
index 6ed267a541b6eef009cb75e9535d083c2b20f330..702635eb2c5cac2309a5c12c2fbbbca54b949bdb 100644 (file)
@@ -890,7 +890,7 @@ print_version ()
   printf ("\
 %s (cygwin) %.*s\n\
 System Trace\n\
-Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.\n\
+Copyright 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.\n\
 Compiled on %s\n\
 ", pgm, len, v, __DATE__);
 }
This page took 0.036493 seconds and 5 git commands to generate.