Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-10-28 14:41:27 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-10-28 14:41:27 +0300
commitd952e44c44093126b9b6dcfb9c8e0e338728f11b (patch)
tree35f1f368ac385f042516ab038e4f819ef8f98094 /winsup/utils/cygcheck.cc
parent757ee9af8b96c2ddbdb448d2c2a9d68e3178a4ff (diff)
* cygcheck.cc (pretty_id): Drop arguments. Don't change CYGWIN
environment variable. (dump_sysinfo): Don't tweak CYGWIN environment variable, just call pretty_id once.
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r--winsup/utils/cygcheck.cc20
1 files changed, 3 insertions, 17 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index e0c8a3ac0..a95ae0819 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -1031,14 +1031,10 @@ scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygwin, bool wow64)
}
void
-pretty_id (const char *s, char *cygwin, size_t cyglen)
+pretty_id ()
{
char *groups[16384];
- strcpy (cygwin + cyglen++, " ");
- strcpy (cygwin + cyglen, s);
- putenv (cygwin);
-
char *id = cygpath ("/bin/id.exe", NULL);
for (char *p = id; (p = strchr (p, '/')); p++)
*p = '\\';
@@ -1094,7 +1090,7 @@ pretty_id (const char *s, char *cygwin, size_t cyglen)
}
ng--;
- printf ("\nOutput from %s (%s)\n", id, s);
+ printf ("\nOutput from %s\n", id);
int n = 80 / (int) ++sz;
int i = n > 2 ? n - 2 : 0;
sz = -sz;
@@ -1479,17 +1475,7 @@ dump_sysinfo ()
fflush (stdout);
- char *cygwin = getenv ("CYGWIN");
- if (cygwin)
- cygwin -= strlen ("CYGWIN=");
- else
- cygwin = const_cast <char *> ("CYGWIN=");
- size_t cyglen = strlen (cygwin);
- cygwin = strcpy ((char *) malloc (cyglen + sizeof (" nontsec")), cygwin);
- pretty_id ("nontsec", cygwin, cyglen);
- pretty_id ("ntsec", cygwin, cyglen);
- cygwin[cyglen] = 0;
- putenv (cygwin);
+ pretty_id ();
if (!GetSystemDirectory (tmp, 4000))
display_error ("dump_sysinfo: GetSystemDirectory()");