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:
authorChristopher Faylor <me@cgf.cx>2003-03-25 04:20:04 +0300
committerChristopher Faylor <me@cgf.cx>2003-03-25 04:20:04 +0300
commitce7a3610725da57c8f90b0f8620fbbb7eb3c1798 (patch)
treee777f63d0ddb8102bd181c1ea3ad93ef259feed0 /winsup/utils/cygcheck.cc
parent8fdbcd1279527a4eb10bb884f144466bd38514f3 (diff)
* cygcheck.cc (dump_sysinfo): Ensure that CYGWIN environment variable is
correctly set.
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r--winsup/utils/cygcheck.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 96bf35024..090d077a1 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -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);