diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-07-16 19:19:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-11-17 09:45:56 -0800 |
commit | b3baab160d6c0a338aec273f4154f346b7306b4c (patch) | |
tree | c4e0304f041b231d77fe53d0d6e00d6ec9f9f143 /winsup | |
parent | 8fbee9f4ee25b59a909543f7bb92d472f31ce4ad (diff) | |
download | cygnal-b3baab160d6c0a338aec273f4154f346b7306b4c.tar.gz cygnal-b3baab160d6c0a338aec273f4154f346b7306b4c.tar.bz2 cygnal-b3baab160d6c0a338aec273f4154f346b7306b4c.zip |
Respond to CYGNAL environment variable, not CYGWIN.
* winsup/cygwin/environ.cc (set_winsymlinks): Refer to
CYGNAL variable in diagnostic message.
(parse_options): Pass "CYGNAL" to setenv.
(_addenv, environ_init): Call parse_options if variable name
is "CYGNAL" rather than "CYGWIN". Comments updated.
(spenvs): Change CYGWIN_DEBUG to CYGNAL_DEBUG.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/environ.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 10ffd689c..421427921 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -32,7 +32,7 @@ details. */ static char **lastenviron; -/* Parse CYGWIN options */ +/* Parse CYGNAL options */ static NO_COPY bool export_settings = false; @@ -88,7 +88,7 @@ set_winsymlinks (const char *buf) } /* The structure below is used to set up an array which is used to - parse the CYGWIN environment variable or, if enabled, options from + parse the CYGNAL environment variable or, if enabled, options from the registry. */ static struct parse_thing { @@ -188,7 +188,7 @@ parse_options (const char *inbuf) if (export_settings) { debug_printf ("%s", newbuf + 1); - setenv ("CYGWIN", newbuf + 1, 1); + setenv ("CYGNAL", newbuf + 1, 1); } return; } @@ -632,7 +632,7 @@ _addenv (const char *name, const char *value, int overwrite) win_env *spenv; if ((spenv = getwinenv (envhere))) spenv->add_cache (value); - if (strcmp (name, "CYGWIN") == 0) + if (strcmp (name, "CYGNAL") == 0) parse_options (value); return 0; @@ -752,7 +752,7 @@ ucenv (char *p, const char *eq) } } -/* Initialize the environ array. Look for the CYGWIN environment variable and +/* Initialize the environ array. Look for the CYGNAL environment variable and set appropriate options from it. */ void environ_init (char **envp, int envc) @@ -805,7 +805,7 @@ environ_init (char **envp, int envc) update_envptrs (); if (envp_passed_in) { - p = getenv ("CYGWIN"); + p = getenv ("CYGNAL"); if (p) parse_options (p); } @@ -851,7 +851,7 @@ win32env_to_cygenv (PWCHAR rawenv, bool posify) ucenv (newp, eq); /* uppercase env vars which need it */ if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) sawTERM = 1; - else if (*newp == 'C' && strncmp (newp, "CYGWIN=", 7) == 0) + else if (*newp == 'C' && strncmp (newp, "CYGNAL=", 7) == 0) parse_options (newp + 7); if (*eq && posify) posify_maybe (envp + i, *++eq ? eq : --eq, tmpbuf); @@ -919,7 +919,7 @@ struct spenv static NO_COPY spenv spenvs[] = { #ifdef DEBUGGING - {NL ("CYGWIN_DEBUG="), false, true, NULL}, + {NL ("CYGNAL_DEBUG="), false, true, NULL}, #endif {NL ("HOMEDRIVE="), false, false, &cygheap_user::env_homedrive}, {NL ("HOMEPATH="), false, false, &cygheap_user::env_homepath}, |