From owner-freebsd-bugs Tue Aug 3 9: 0:10 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id BD3E715344 for ; Tue, 3 Aug 1999 09:00:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA07954; Tue, 3 Aug 1999 09:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from katroo.Sendmail.COM (katroo.Sendmail.COM [206.189.75.90]) by hub.freebsd.org (Postfix) with ESMTP id 54D9F152C7 for ; Tue, 3 Aug 1999 08:52:53 -0700 (PDT) (envelope-from ca@sendmail.com) Received: from zable.Sendmail.COM (zable.Sendmail.COM [10.210.100.132]) by katroo.Sendmail.COM (8.9.3/8.9.3) with ESMTP id IAA06498; Tue, 3 Aug 1999 08:36:18 -0700 (PDT) Received: (from ca@localhost) by zable.Sendmail.COM (8.9.2.Alpha0/8.9.2.Alpha0) id IAA11408 for ca; Tue, 3 Aug 1999 08:36:17 -0700 (PDT) Message-Id: <199908031536.IAA11408@zable.Sendmail.COM> Date: Tue, 3 Aug 1999 08:36:17 -0700 (PDT) From: ca+freebsd@endmail.org Reply-To: ca+freebsd@endmail.org To: FreeBSD-gnats-submit@freebsd.org Cc: ca+freebsd@endmail.org X-Send-Pr-Version: 3.2 Subject: bin/12942: m4: len(`') returns `' Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12942 >Category: bin >Synopsis: m4: len(`') returns `' >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 3 09:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Claus Assmann >Release: FreeBSD 3.2-STABLE i386 >Organization: Endmail.ORG >Environment: standard installation of FreeBSD 3.2-STABLE i386 or FreeBSD 2.2.7-RELEASE i386 >Description: the len function in /usr/bin/m4 returns an empty string if given an empty string as argument instead of 0. >How-To-Repeat: $ echo 'len()' | m4 $ echo 'len()' | gm4 0 >Fix: Patch (fixes this problem, side-effects unknown...) --- eval.c Mon Aug 2 21:53:42 1999 +++ /usr/src/usr.bin/m4/eval.c Mon Sep 7 15:09:13 1998 @@ -97,7 +97,7 @@ * have macro-or-builtin() type call. We adjust * argc to avoid further checking.. */ - if (argc == 3 && !*(argv[2]) && (td & ~STATIC) != LENGTYPE) + if (argc == 3 && !*(argv[2])) argc--; switch (td & ~STATIC) { >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message