Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Apr 2012 16:35:41 +0200 (CEST)
From:      TG <tg@gmplib.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/166994: m4's eval function ignores documented 2nd and 3rd arguments
Message-ID:  <201204161435.q3GEZflL022237@hehe.gmplib.org>
Resent-Message-ID: <201204161450.q3GEoAVS038060@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204161435.q3GEZflL022237>