* cygcheck.cc (dump_sysinfo): Ensure that CYGWIN environment variable is

correctly set.
This commit is contained in:
Christopher Faylor 2003-03-25 01:20:04 +00:00
parent 8fdbcd1279
commit ce7a361072
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-03-24 Christopher Faylor <cgf@redhat.com>
* cygcheck.cc (dump_sysinfo): Ensure that CYGWIN environment variable
is correctly set.
2003-03-09 Corinna Vinschen <corinna@vinschen.de>
* getfacl.c (username): Fix ambiguous printf calls.

View File

@ -950,7 +950,11 @@ dump_sysinfo ()
fflush (stdout);
char *cygwin = getenv ("CYGWIN") ?: const_cast <char *> ("CYGWIN=");
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);