aboutsummaryrefslogtreecommitdiff
path: root/bin/expr/expr.y
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>2002-10-28 00:15:43 +0000
committerGarrett Wollman <wollman@FreeBSD.org>2002-10-28 00:15:43 +0000
commitc9885518de2f8c1da3530130cbd3a5ed88f09a28 (patch)
treeef8b51b7909ca8da3340038a26cdd405f3576f40 /bin/expr/expr.y
parent4e08ccb2ffe596eee3a388d9c51876938b94682c (diff)
downloadsrc-c9885518de2f8c1da3530130cbd3a5ed88f09a28.tar.gz
src-c9885518de2f8c1da3530130cbd3a5ed88f09a28.zip
Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode or in a standard mode (default standard). The configuration is done malloc(3)-style, with either an environment variable or a symlink. Update expr(1) to use this new interface.
Notes
Notes: svn path=/head/; revision=106065
Diffstat (limited to 'bin/expr/expr.y')
-rw-r--r--bin/expr/expr.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/expr/expr.y b/bin/expr/expr.y
index c73d85360deb..74a33033d222 100644
--- a/bin/expr/expr.y
+++ b/bin/expr/expr.y
@@ -278,7 +278,8 @@ main(int argc, char *argv[])
int c;
setlocale (LC_ALL, "");
- if (getenv("EXPR_COMPAT") != NULL) {
+ if (getenv("EXPR_COMPAT") != NULL
+ || check_utility_compat("expr")) {
av = argv + 1;
eflag = 1;
} else {