]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Import new 2-clause BSD licenced implementation of the bc and dc commands
authorse <se@FreeBSD.org>
Sat, 27 Jun 2020 12:02:01 +0000 (12:02 +0000)
committerse <se@FreeBSD.org>
Sat, 27 Jun 2020 12:02:01 +0000 (12:02 +0000)
commit6266cce175c89b44f06d967f99d32f9a7d16f461
treefacf5088b89def46e37c0c2a9a25df07f44c3152
parentd727f57c10b46ce8f365e2d41d5638665d6c52b5
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, which the author of this version considers
  as 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, Portugueze,
  and Russian.

- They offer very detailed man-pages that provide far more information than
  the current ones.

The upstream sources contain a large number of tests, which are not
imported with this commit. They could be integrated into our test
framework at a latter time.

Installation of this version is controlled by the option "MK_GH_BC=yes".
This option will be set to yes by default in 13-CURRENT, but will be off
by default in 12-STABLE.

Approved by: imp
Obtained from: https://git.yzena.com/gavin/bc
MFC after: 4 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D19982
85 files changed:
contrib/bc/LICENSE.md [new file with mode: 0644]
contrib/bc/Makefile.in [new file with mode: 0644]
contrib/bc/NEWS.md [new file with mode: 0644]
contrib/bc/NOTICE.md [new file with mode: 0644]
contrib/bc/README.md [new file with mode: 0644]
contrib/bc/RELEASE.md [new file with mode: 0644]
contrib/bc/gen/bc_help.txt [new file with mode: 0644]
contrib/bc/gen/dc_help.txt [new file with mode: 0644]
contrib/bc/gen/lib.bc [new file with mode: 0644]
contrib/bc/gen/lib2.bc [new file with mode: 0644]
contrib/bc/gen/strgen.sh [new file with mode: 0755]
contrib/bc/include/args.h [new file with mode: 0644]
contrib/bc/include/bc.h [new file with mode: 0644]
contrib/bc/include/dc.h [new file with mode: 0644]
contrib/bc/include/file.h [new file with mode: 0644]
contrib/bc/include/history.h [new file with mode: 0644]
contrib/bc/include/lang.h [new file with mode: 0644]
contrib/bc/include/lex.h [new file with mode: 0644]
contrib/bc/include/num.h [new file with mode: 0644]
contrib/bc/include/opt.h [new file with mode: 0644]
contrib/bc/include/parse.h [new file with mode: 0644]
contrib/bc/include/program.h [new file with mode: 0644]
contrib/bc/include/rand.h [new file with mode: 0644]
contrib/bc/include/read.h [new file with mode: 0644]
contrib/bc/include/status.h [new file with mode: 0644]
contrib/bc/include/vector.h [new file with mode: 0644]
contrib/bc/include/vm.h [new file with mode: 0644]
contrib/bc/locales/de_DE.ISO8859-1.msg [new file with mode: 0644]
contrib/bc/locales/de_DE.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/en_US.UTF-8.msg [new symlink]
contrib/bc/locales/en_US.msg [new file with mode: 0644]
contrib/bc/locales/es_ES.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/fr_FR.ISO8859-1.msg [new file with mode: 0644]
contrib/bc/locales/fr_FR.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/ja_JP.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/ja_JP.eucJP.msg [new file with mode: 0644]
contrib/bc/locales/nl_NL.ISO8859-1.msg [new file with mode: 0644]
contrib/bc/locales/nl_NL.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/pl_PL.ISO8859-2.msg [new file with mode: 0644]
contrib/bc/locales/pl_PL.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/pt_PT.ISO8859-1.msg [new file with mode: 0644]
contrib/bc/locales/pt_PT.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/ru_RU.CP1251.msg [new file with mode: 0644]
contrib/bc/locales/ru_RU.CP866.msg [new file with mode: 0644]
contrib/bc/locales/ru_RU.ISO8859-5.msg [new file with mode: 0644]
contrib/bc/locales/ru_RU.KOI8-R.msg [new file with mode: 0644]
contrib/bc/locales/ru_RU.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/zh_CN.GB18030.msg [new file with mode: 0644]
contrib/bc/locales/zh_CN.GB2312.msg [new file with mode: 0644]
contrib/bc/locales/zh_CN.GBK.msg [new file with mode: 0644]
contrib/bc/locales/zh_CN.UTF-8.msg [new file with mode: 0644]
contrib/bc/locales/zh_CN.eucCN.msg [new file with mode: 0644]
contrib/bc/manuals/algorithms.md [new file with mode: 0644]
contrib/bc/manuals/bc.1 [new file with mode: 0644]
contrib/bc/manuals/bc.1.ronn [new file with mode: 0644]
contrib/bc/manuals/bc.md [new symlink]
contrib/bc/manuals/benchmarks.md [new file with mode: 0644]
contrib/bc/manuals/build.md [new file with mode: 0644]
contrib/bc/manuals/dc.1 [new file with mode: 0644]
contrib/bc/manuals/dc.1.ronn [new file with mode: 0644]
contrib/bc/manuals/dc.md [new symlink]
contrib/bc/src/args.c [new file with mode: 0644]
contrib/bc/src/bc/bc.c [new file with mode: 0644]
contrib/bc/src/bc/lex.c [new file with mode: 0644]
contrib/bc/src/bc/parse.c [new file with mode: 0644]
contrib/bc/src/data.c [new file with mode: 0644]
contrib/bc/src/dc/dc.c [new file with mode: 0644]
contrib/bc/src/dc/lex.c [new file with mode: 0644]
contrib/bc/src/dc/parse.c [new file with mode: 0644]
contrib/bc/src/file.c [new file with mode: 0644]
contrib/bc/src/history/history.c [new file with mode: 0644]
contrib/bc/src/lang.c [new file with mode: 0644]
contrib/bc/src/lex.c [new file with mode: 0644]
contrib/bc/src/main.c [new file with mode: 0644]
contrib/bc/src/num.c [new file with mode: 0644]
contrib/bc/src/opt.c [new file with mode: 0644]
contrib/bc/src/parse.c [new file with mode: 0644]
contrib/bc/src/program.c [new file with mode: 0644]
contrib/bc/src/rand/rand.c [new file with mode: 0644]
contrib/bc/src/read.c [new file with mode: 0644]
contrib/bc/src/vector.c [new file with mode: 0644]
contrib/bc/src/vm.c [new file with mode: 0644]
share/mk/src.opts.mk
usr.bin/Makefile
usr.bin/gh-bc/Makefile [new file with mode: 0644]