diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-07-16 19:19:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-26 21:52:25 -0700 |
commit | e2d01b4e69159c1f9a55a6bac63878182acfddc5 (patch) | |
tree | 04ec0ea107baac281ce5ce3ee7a4587f792e294b | |
parent | 4b6150b4b771c19750af76830a49ee32d7ab5c9c (diff) | |
download | cygnal-e2d01b4e69159c1f9a55a6bac63878182acfddc5.tar.gz cygnal-e2d01b4e69159c1f9a55a6bac63878182acfddc5.tar.bz2 cygnal-e2d01b4e69159c1f9a55a6bac63878182acfddc5.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.
-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 3a03657db..f0f85cc13 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -33,7 +33,7 @@ details. */ /* If this is not NULL, it points to memory allocated by us. */ static char **lastenviron; -/* Parse CYGWIN options */ +/* Parse CYGNAL options */ static NO_COPY bool export_settings = false; @@ -89,7 +89,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 { @@ -189,7 +189,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; } @@ -653,7 +653,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; @@ -793,7 +793,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) @@ -846,7 +846,7 @@ environ_init (char **envp, int envc) update_envptrs (); if (envp_passed_in) { - p = getenv ("CYGWIN"); + p = getenv ("CYGNAL"); if (p) parse_options (p); } @@ -893,7 +893,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); @@ -963,7 +963,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}, |