diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 2002-10-28 00:15:43 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 2002-10-28 00:15:43 +0000 |
commit | c9885518de2f8c1da3530130cbd3a5ed88f09a28 (patch) | |
tree | ef8b51b7909ca8da3340038a26cdd405f3576f40 /bin/expr/expr.y | |
parent | 4e08ccb2ffe596eee3a388d9c51876938b94682c (diff) | |
download | src-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.y | 3 |
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 { |