summaryrefslogtreecommitdiffstats
path: root/bin/expr/expr.y
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>2002-10-28 00:15:43 +0000
committerwollman <wollman@FreeBSD.org>2002-10-28 00:15:43 +0000
commitd47f5a7e94eaddce370ce4688d56fb6f615db5fe (patch)
treeef8b51b7909ca8da3340038a26cdd405f3576f40 /bin/expr/expr.y
parent092b51aeec7dc966bbc8dcd2ac52a71641bd3a4c (diff)
downloadFreeBSD-src-d47f5a7e94eaddce370ce4688d56fb6f615db5fe.zip
FreeBSD-src-d47f5a7e94eaddce370ce4688d56fb6f615db5fe.tar.gz
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.
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 c73d853..74a3303 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 {
OpenPOWER on IntegriCloud