Bug 240571 - m4 divert( X-with-spaces ) -> argument is invalid
Summary: m4 divert( X-with-spaces ) -> argument is invalid
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-13 20:53 UTC by John Kennedy
Modified: 2019-09-13 20:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Kennedy 2019-09-13 20:53:40 UTC
For 12/stable (now 12.1-PRERELEASE) between r352217 and r352298 (and I presume the MFC of r352065-r352070 in r352277), m4 lost it's ability to divert( -1 ) to ignore an input stream.  Note the spaces around the number.

# grep '^FreeBSD 12' /.zfs/snapshot/2019-09-13-10:54:12/etc/motd /etc/motd
/.zfs/snapshot/2019-09-13-10:54:12/etc/motd:FreeBSD 12.1-PRERELEASE (GENERIC) #106 r352217+0e6a9a9426c7(stable/12): Wed Sep 11 10:30:02 PDT 2019
/etc/motd:FreeBSD 12.1-PRERELEASE (GENERIC) #108 r352298+2356cf5555c7(stable/12): Fri Sep 13 10:49:27 PDT 2019

# cat /tmp/m4.txt 
begin
divert(-1)dnl
middle
divert( -1 )dnl
foo
divert(0)dnl
end

# m4 < /tmp/m4.txt 
begin
m4: stdin at line 4: divert: argument is invalid: -1 .

# /.zfs/snapshot/2019-09-13-10:54:12/usr/bin/m4 < /tmp/m4.txt 
begin
end