History log of /src/usr.bin/m4/misc.c (Results 1 – 25 of 154)
Revision Date Author Comments
# 507c611a 17-Feb-2026 Dag-Erling Smørgrav <des@FreeBSD.org>

m4: Fix eval output width

According to POSIX, the optional third argument is the minimum number
of digits to print regardless of sign. We interpreted it as the minimum
width of the output including

m4: Fix eval output width

According to POSIX, the optional third argument is the minimum number
of digits to print regardless of sign. We interpreted it as the minimum
width of the output including the sign. Additionally, the variable used
to hold this value was confusingly named “maxdigits”.

PR: 293214
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55311

show more ...


# a3394b6a 26-Dec-2025 Dimitry Andric <dim@FreeBSD.org>

m4: avoid warnings about too-long initializer strings

Mark `digits` as `__non_string`, to avoid warnings from clang 21 similar
to:

usr.bin/m4/misc.c:123:27: error: initializer-string for charac

m4: avoid warnings about too-long initializer strings

Mark `digits` as `__non_string`, to avoid warnings from clang 21 similar
to:

usr.bin/m4/misc.c:123:27: error: initializer-string for character array is too long, array size is 36 but initializer has size 37 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
123 | static char digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MFC after: 3 days

show more ...


# ab4edcd5 24-May-2025 Eric Blake <eblake@redhat.com>

m4: Fix OOB access displaying MIN_INT

Previously displaying INT_MIN resulted in an out of bounds access to
digits[-8]. In twos-complement -INT_MIN is still negative.

PR: 287013
Reviewed by: emaste


# 5e3934b1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

R

usr.bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

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


# f993ed2f 09-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351732 through r352104.


# 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


# a3394b6a 26-Dec-2025 Dimitry Andric <dim@FreeBSD.org>

m4: avoid warnings about too-long initializer strings

Mark `digits` as `__non_string`, to avoid warnings from clang 21 similar
to:

usr.bin/m4/misc.c:123:27: error: initializer-string for charac

m4: avoid warnings about too-long initializer strings

Mark `digits` as `__non_string`, to avoid warnings from clang 21 similar
to:

usr.bin/m4/misc.c:123:27: error: initializer-string for character array is too long, array size is 36 but initializer has size 37 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
123 | static char digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MFC after: 3 days

show more ...


# ab4edcd5 24-May-2025 Eric Blake <eblake@redhat.com>

m4: Fix OOB access displaying MIN_INT

Previously displaying INT_MIN resulted in an out of bounds access to
digits[-8]. In twos-complement -INT_MIN is still negative.

PR: 287013
Reviewed by: emaste


# 5e3934b1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

R

usr.bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

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


# f993ed2f 09-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351732 through r352104.


# 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


# 82725ba9 23-Nov-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r325999 through r326131.


# 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 f

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.

show more ...


# d9b9dae1 22-Jan-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r294169 through r294598.


# 009e81b1 22-Jan-2016 Bjoern A. Zeeb <bz@FreeBSD.org>

MFH @r294567


# 59d43d11 20-Jan-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# 4d3c8f6a 18-Jan-2016 Baptiste Daroussin <bapt@FreeBSD.org>

Import misc.c,v 1.46 from OpenBSD (by espie@)

Yet another missed ferror call


# 416ba5c7 22-Jun-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with HEAD (r280229-r284686).


# 37a48d40 28-May-2015 Glen Barber <gjb@FreeBSD.org>

MFH: r282615-r283655

Sponsored by: The FreeBSD Foundation


# 98e0ffae 27-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge sync of head


# 31129d4f 18-May-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Synchronize with OpenBSD

Obtained from: OpenBSD


# 2252f43b 06-May-2015 Glen Barber <gjb@FreeBSD.org>

MFH: r282315-r282534

Sponsored by: The FreeBSD Foundation


# 7757a1b4 03-May-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


1234567