freebsd-dev/bin/expr
Stefan Eßer fa717604a4 Make /bin/expr support 64bit numeric range and range checks by default,
again. This brings back the behaviour of expr in FreeBSD-4, which had been
reverted due to an assumed incompatbility with POSIX.1 for FreeBSD-5.

This issue has been discussed in the freebsd-standards list, and the
consensus was, that POSIX.1 is in fact not violated by this extension,
since it affects only cases of POSIX undefined behaviour (overflow of
signed long).

Other operating systems did upgrade their versions of expr to support
64bit range, after it had been initially brought to FreeBSD. They have
used it for a decade without problems, meanwhile.

The -e option is retained, but it will only select less strict checking
of numeric parameters (leading white-space, leading "+" are allowed and
skipped, an empty string is considered to represent 0 in numeric context.)
The call of check_utility_compat() as a means of establishing backwards
compatibility with FreeBSD-4 is considered obsolete, but preserved in
this commit. It is expected to be removed in a later revision of this
file.
Reviewed by:	bde, das, jilles
MFC after:	2 month (those parts that do not violate POLA)
2011-07-09 12:05:53 +00:00
..
expr.1 Make /bin/expr support 64bit numeric range and range checks by default, 2011-07-09 12:05:53 +00:00
expr.y Make /bin/expr support 64bit numeric range and range checks by default, 2011-07-09 12:05:53 +00:00
Makefile Get this area compiling with the highest WARNS= that it works with. 2003-06-13 07:04:02 +00:00