summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-07-16 19:19:04 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-07-16 19:19:04 -0700
commitb3af4c138ff622cb8a2ad561354aa3c7d5c57270 (patch)
treebc01189da3cebec2eef5ab489f0c3f1ae9159afa
parent586903666abb647ad3abfc20163280ed6fdb5822 (diff)
downloadcygnal-b3af4c138ff622cb8a2ad561354aa3c7d5c57270.tar.gz
cygnal-b3af4c138ff622cb8a2ad561354aa3c7d5c57270.tar.bz2
cygnal-b3af4c138ff622cb8a2ad561354aa3c7d5c57270.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.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 6ba1469f4..7f7f9cb32 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)
{
if (!user_shared->warned_nonativesyms)
{
- small_printf ("\"winsymlinks:%s\" option detected in CYGWIN environment variable.\n"
+ small_printf ("\"winsymlinks:%s\" option detected in CYGNAL environment variable.\n"
"Native symlinks are not supported on Windows versions prior to\n"
"Windows Vista/Server 2008. This option will be ignored.\n", buf);
user_shared->warned_nonativesyms = 1;
@@ -101,7 +101,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
{
@@ -202,7 +202,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;
}
@@ -647,7 +647,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;
@@ -767,7 +767,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)
@@ -808,7 +808,7 @@ environ_init (char **envp, int envc)
goto out;
}
- /* Allocate space for environment + trailing NULL + CYGWIN env. */
+ /* Allocate space for environment + trailing NULL + CYGNAL env. */
lastenviron = envp = (char **) malloc ((4 + (envc = 100)) * sizeof (char *));
rawenv = GetEnvironmentStringsW ();
@@ -835,7 +835,7 @@ environ_init (char **envp, int envc)
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_maybe (envp + i, *++eq ? eq : --eq, tmpbuf);
@@ -853,7 +853,7 @@ environ_init (char **envp, int envc)
update_envptrs ();
if (envp_passed_in)
{
- p = getenv ("CYGWIN");
+ p = getenv ("CYGNAL");
if (p)
parse_options (p);
}
@@ -920,7 +920,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},