bin/166994: m4's eval function ignores documented 2nd and 3rd
tg at gmplib.org
Mon Apr 16 14:50:11 UTC 2012
>Synopsis: m4's eval function ignores documented 2nd and 3rd arguments
>Arrival-Date: Mon Apr 16 14:50:10 UTC 2012
>Release: FreeBSD 9.0-RELEASE amd64
System: FreeBSD hehe.gmplib.org 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
The eval() function of /usr/bin/m4 seem to completely ignore the 2nd
(radix) and 3rd (width) arguments. The man page documents these
arguments, and other implementations of m4 handle them (Solaris, GNU).
This leads to the conclusion that the BSD implementation of eval is
broken in this respect.
Execute from sh:
echo 'eval(12245853,16,10)' | m4
FreeBSD 9.0 (as well as e.g. 8.1) incorrectly outputs "12245853".
Expected output is "0000BADB5D".
I was about to fix it, but found that the license of the code in
question was unacceptable to me. I only contribute to Free Software,
not to Open Source code bearing a license analogous to a law system
that permits people to sell themselves as slaves. ;-)
More information about the freebsd-bugs