History log of /freebsd-current/usr.bin/m4/eval.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# c57596e1 09-Sep-2019 Baptiste Daroussin <bapt@FreeBSD.org>

m4: import from OpenBSD

By deraadt@

mkstemp() returns -1 on failure

Obtained from: OpenBSD


# db531a5d 09-Sep-2019 Baptiste Daroussin <bapt@FreeBSD.org>

m4: import from OpenBSD

patch by espie@

replace sloppy parsing of numeric values with strtonum (incr, decr, divert)

still use integers, so use the natural bounds for these.

POSIX says m4 should error when these use non numeric values, and now they
do.

okay millert@

Obtained from: OpenBSD


# e0f4e041 09-Sep-2019 Baptiste Daroussin <bapt@FreeBSD.org>

m4: import patch from OpenBSD

by espie@
ifelse is special, fix argv parsing to avoid segfault

problem noticed by Matthew Green (netbsd), slightly different fix
so that argc counting makes more sense.

we might want to warn on wrong number of parameters later, but this is
somewhat inconsistent depending on the builtin right now.

okay millert@

Obtained from: OpenBSD


# c560b67c 09-Sep-2019 Baptiste Daroussin <bapt@FreeBSD.org>

Import from OpenBSD: -E flag

Add -E flag (make warnings fatal), following the behavior of GNU m4 1.4.9+

Help and direction millert@ espie@ anton@ deraadt@

ok espie@

Obtained from: OpenBSD


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# af7ca7c8 01-May-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

usr.bin: minor spelling fixes on comments.

No functional change.


# 46ef9581 21-Nov-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Synchronize m4(1) with OpenBSD


# 88497f0c 27-Jul-2014 Baptiste Daroussin <bapt@FreeBSD.org>

Sync with OpenBSD
This brings:
- check for integer overflows in custom allocs
- fix potential integer overflows in memory allocation
- annotate regexp error messages with source string
- better error handling in mkstemp/unlink/fdopen logic


# 8ce3644c 03-May-2013 Jung-uk Kim <jkim@FreeBSD.org>

Reduce diff with upstream.


# fb3f3d7c 15-Apr-2012 Baptiste Daroussin <bapt@FreeBSD.org>

Improve m4 compatibility with GNU m4 extension ** (exponent)

Submitted by: Marc Espie (espie@OpenBSD.org)
Approved by: des@ (mentor)


# 2cce1b69 19-Dec-2011 Bjoern A. Zeeb <bz@FreeBSD.org>

Unbreak the build after r228697 adding the { } block to make clear which
if the else belongs to.


# 4fff7a14 18-Dec-2011 Baptiste Daroussin <bapt@FreeBSD.org>

Reimplement support for the ** (exponent) gnu extension, make it available thought the -g (mimic gnu) option

Reviewed by: cognet
Approved by: cognet
Discussed with: espie@OpenBSD.org (upstream)


# a841e1eb 28-Nov-2011 Baptiste Daroussin <bapt@FreeBSD.org>

Synchronize with laster version of m4 from OpenBSD and NetBSD
This bring better compatibility with gnum4

Reviewed by: cognet
Approved by: cognet
Obtained from: OpenBSD, NetBSD


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# f03b2751 16-Aug-2004 Tim J. Robbins <tjr@FreeBSD.org>

Store a pointer to "null" in struct ndblock's defn member instead of a
duplicate allocated on the heap; the address defn points to is significant,
and is checked against the address of "null" in certain conditionals.

PR: 59883
MFC after: 1 week


# aef4bb33 30-Apr-2003 Tim J. Robbins <tjr@FreeBSD.org>

Flush streams before calling system() so that the output appears in the
right place in the output stream when redirected to a file (when full
buffering is enabled). Noticed by schweikh on freebsd-standards.


# 2c4acd2f 14-Jul-2002 Juli Mallett <jmallett@FreeBSD.org>

Kill extraneous whitespace.


# 90432ef8 03-May-2002 Juli Mallett <jmallett@FreeBSD.org>

Revert vendor identifiers, and #if 0 what is #if 0/#else for OpenBSD.

Add __FBSDID() properly.

Requested by: bde, mike


# bd2bfb58 01-May-2002 Juli Mallett <jmallett@FreeBSD.org>

Merge local changes again, against ANSIfied m4(1).


# 4d9bfb4d 01-May-2002 Juli Mallett <jmallett@FreeBSD.org>

Import OpenBSD m4(1) as of April 26. Mostly ANSIfication changes.


# ccc5b4e6 19-Apr-2002 Juli Mallett <jmallett@FreeBSD.org>

Crank WARNS.

Cast sizeof() to (int), as it's being compared against an int, not a size_t.
If i is changed to a size_t, it means the logic must be slightly changed later
in the flow, where --i is checked to be >= 0. I am not sure I want to make a
logic change to account for clearing up a warning, when an aesthetic one will
keep from modifying the logic.

Other harmless casts, that I think I've made in the right directions.

Make gpbc() an inline function, rather than an obfuscated macro, make its
scratch space local, rather than global. The previous macro used a dirty
hack (logical AND in place of a conditional) which would lead GCC to throw
a fit (rightly so) as the logical check, as well as the incrementation of
a variable, were not used for anything.

const'ify a few places where gcc3 yells. xstrdup() some global consts in
places where we xstrdup() when not using consts, but tried to assign them
to non-consts before.

Don't use execv(2) if we don't have the kind of arguments it wants.

Reviewed by: asmodai obrien tjr
Submitted by: tjr (a gcc3 build log)


# acc9d408 19-Apr-2002 Juli Mallett <jmallett@FreeBSD.org>

Bring OpenBSD m4(1) off of the OPENBSD vendor branch, and add the -s option,
$FreeBSD$ identifiers, and fix initialisation to stderr to happen in a function
as stderr is not the same in CURRENT as in OpenBSD.

Reviewed by: obrien


# b1ea3d46 17-Apr-2002 Juli Mallett <jmallett@FreeBSD.org>

This adds support for -s to the m4(1) utility, which causes #line directives
to be emitted as per the C preprocessor. It updates the manual page in
regards to standards accordingly.

PR: standards/36075
Submitted by: tjr
Reviewed by: mike
MFC after: 1 week


# e3d86717 16-Feb-2002 Juli Mallett <jmallett@FreeBSD.org>

Import OpenBSD m4 as of today.


# de9b3b90 24-Jul-2001 David E. O'Brien <obrien@FreeBSD.org>

Remove the local basename in favor of the libc version.
Remove xmalloc and xstrdup and do the error checking at the place of use.


# 1d3ebaf3 28-May-2001 Gregory Neil Shapiro <gshapiro@FreeBSD.org>

Make sure the len() builtin always returns an answer. Previously,
len(`') didn't return an answer. Now it returns 0.

PR: bin/12942
MFC after: 5 days


# 4ba4d387 18-May-2001 Gregory Neil Shapiro <gshapiro@FreeBSD.org>

String operations could silently truncate long strings, leaving the output
corrupted. Mark's patch fixes this be removing the MAXTOK limitation on
substring operations and allowing the putback buffer size to be the limiting
factor. If the putback buffer size if reached, m4 gives an error instead of
silently truncating the string.

PR: bin/26619
Submitted by: Mark Peek <mark-ml@whistle.com>
MFC after: 5 days


# 50d793eb 26-Nov-2000 Kris Kennaway <kris@FreeBSD.org>

Fix format string warnings.

Submitted by: nra
Obtained from: NetBSD


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# bbfd1447 07-Sep-1998 Steve Price <steve@FreeBSD.org>

Make the builtin unix macro work as it should (well like Solaris's,
GNU's, and OSF1's).


# ef2cea81 18-Aug-1997 Jonathan Lemon <jlemon@FreeBSD.org>

divnum is no longer silently restricted to the range 0..9. (cf: 4098)

changequote(,) is now a synonym for changequote(). (cf: 803)

buffer size for translit() enlarged to handle a full string

PR: 803, 4098


# 95105358 23-Jul-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3) instead of local redefinition. Remove progname.


# c44252b6 06-Jul-1997 Bruce Evans <bde@FreeBSD.org>

Finish importing Lite2's src/usr.bin, except for ex, diff, grep, mail,
pascal and vmstat.sparc. All changed files on the vendor branch should
already have been imported.


# 232eaee6 13-Apr-1997 Joerg Wunsch <joerg@FreeBSD.org>

Make the $@ macro behave as described in the man page.

This patch has been submitted by Andreas Burmester (i think) on the
German Usenet long ago. Andreas told me that our m4 has quite more
subtle bugs, so we might consider using NGU m4 instead.


# 7799f52a 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# cac6992a 16-Apr-1995 Andrey A. Chernov <ache@FreeBSD.org>

1) kill temp diver upon exit
2) add logical ops, fix ! precedence, implement unary +, fix exp
Obtained from: NetBSD


# 3ee80812 11-Mar-1995 Andrey A. Chernov <ache@FreeBSD.org>

Fix syscmd() output out of sync
Submitted by: smp@clem.systemsix.com


# 7c5eeb39 18-Dec-1994 Andrey A. Chernov <ache@FreeBSD.org>

Make m4 more 8bit clean.
Don't use is*(EOF)
This fix core dump when LANG setted to 8bit wide charset
and ENABLE_STARTUP_LOCALE


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources