bin/166994: m4's eval function ignores documented 2nd and 3rd arguments

TG tg at gmplib.org
Mon Apr 16 14:50:11 UTC 2012


>Number:         166994
>Category:       bin
>Synopsis:       m4's eval function ignores documented 2nd and 3rd arguments
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 16 14:50:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     tege
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
KTH
>Environment:
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


	
>Description:

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.

>How-To-Repeat:

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".

>Fix:

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.  ;-)
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list