>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 [email protected]:/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:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to