MFC: 362681, 362697, 362914, 362984, 362986, 362987, 363091, 363172, 363809,
363810, 363811, 363915
Import new 2-clause BSD licenced implementation of the bc and dc commands
These implementations of the bc and dc programs offer a number of advantages
compared to the current implementations in the FreeBSD base system:
- They do not depend on external large number functions (i.e. no dependency on OpenSSL or any other large-number library)
- They implements all features found in GNU bc/dc (with the exception of the forking of sub-processes in dc, which the author of this version considers a security issue).
- They are significantly faster than the current code in base (more than 2 orders of magnitude in some of my tests, e.g. for 12345^100000).
- They should be fully compatible with all features and the behavior of the current implementations in FreeBSD (not formally verified).
- They support POSIX message catalogs and come with localized messages in Chinese, Dutch, English, French, German, Japanese, Polish, Portuguese, and Russian.
- They offer very detailed man-pages that provide far more information than the current ones.
This code is not built and installed in FreeBSD-12, unless WITH_GH_BC=yes
is set (e.g. in src.conf) during builworld and installworld. It has been
imported and made the default in FreeBSD-CURRENT, and all improvements and
changes requested for the version in -CURRENT are included in this initial
import into a stable branch.