aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-05-15 12:29:47 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-05-15 12:29:47 +0000
commit90253b8276706cb548d712ca8c732e4642ae9b32 (patch)
tree51b8a93fc9c36b608fcedcb765991e92ef3563dd
parent1f7b9e8bc638f7e3e3e0d1948e360f65a15215be (diff)
downloadnewlib-90253b8276706cb548d712ca8c732e4642ae9b32.zip
newlib-90253b8276706cb548d712ca8c732e4642ae9b32.tar.gz
newlib-90253b8276706cb548d712ca8c732e4642ae9b32.tar.bz2
* cygcheck.cc (load_cygwin): Don't touch $PATH for now.
(print_version): Fix copyright. * strace.cc (print_version): Ditto.
-rw-r--r--winsup/utils/ChangeLog6
-rw-r--r--winsup/utils/cygcheck.cc17
-rw-r--r--winsup/utils/strace.cc2
3 files changed, 20 insertions, 5 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 0818442..43f374a 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -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.
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index dd815b9..afd4317 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -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);
}
}
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index 6ed267a..702635e 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -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__);
}