diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2019-12-22 09:26:24 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2019-12-22 09:26:24 +0000 |
commit | 1a4a3a1d057f269fa7b3f92703761f9ff0598b44 (patch) | |
tree | b89c56aac8f7b3745d39253589da646c1dde2510 /usr.bin/make | |
parent | d15919d6ba6d5ff7e4c72b7e91dd5f7b61a343c6 (diff) |
we also have "VAR_*" constants in parsevar with totally different meanings.
Rename to avoid ambiguity
- VAR_IS_SHELL (in var.c): the SHELL variable, which has specific
POSIX semantics
- VAR_SHELL (in parsevar.c): assign the result of running the command
to the variable.
no actual code change
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/var.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index ef1e295b7bc..1408926360c 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -1,4 +1,4 @@ -/* $OpenBSD: var.c,v 1.102 2019/12/21 15:31:54 espie Exp $ */ +/* $OpenBSD: var.c,v 1.103 2019/12/22 09:26:23 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* @@ -221,7 +221,7 @@ typedef struct Var_ { #define VAR_FROM_CMD 4 /* Special source: command line */ #define VAR_FROM_ENV 8 /* Special source: environment */ #define VAR_SEEN_ENV 16 /* No need to go look up environment again */ -#define VAR_SHELL 32 /* Magic behavior */ +#define VAR_IS_SHELL 32 /* Magic behavior */ #define POISONS (POISON_NORMAL | POISON_EMPTY | POISON_NOT_DEFINED) /* Defined in var.h */ @@ -652,7 +652,7 @@ var_set_append(const char *name, const char *ename, const char *val, int ctxt, if (ctxt == VAR_CMD) { /* always for command line */ (append ? var_append_value : var_set_value)(v, val); v->flags |= VAR_FROM_CMD; - if ((v->flags & VAR_SHELL) == 0) { + if ((v->flags & VAR_IS_SHELL) == 0) { /* Any variables given on the command line are * automatically exported to the environment, * except for SHELL (as per POSIX standard). @@ -1333,7 +1333,7 @@ set_magic_shell_variable() v = find_global_var_without_env(name, ename, k); var_set_value(v, _PATH_BSHELL); /* XXX the environment shall never affect it */ - v->flags = VAR_SHELL | VAR_SEEN_ENV; + v->flags = VAR_IS_SHELL | VAR_SEEN_ENV; } /* |