summaryrefslogtreecommitdiffstats
path: root/usr.bin/m4 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* replace sloppy parsing of numeric values with strtonum (incr, decr, divert)espie2017-11-111-13/+31
| | | | | | | | | 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@
* ifelse is special, fix argv parsing to avoid segfaultespie2017-10-231-9/+8
| | | | | | | | | | 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@
* Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),deraadt2017-08-211-4/+6
| | | | | | | | in case the parent process was started with a dangling child. This style ensures any potential parent:child interlock isn't disrupted due to the "wrong" child being waited on first. Then the other other childs can safely zombie. ok millert jca brynet
* have bsd.prog.mk/bsd.lib.mk generate .y -> .c/.h rules without intermediateespie2017-07-091-8/+1
| | | | | | | files. This fixes up parallel builds in the default case. FreeBSD does something similar. okay millert@
* generate the parser directly instead of fucking aroundespie2017-07-041-2/+2
|
* Don't need to link with -ll or -ly.bcallah2017-06-172-4/+6
| | | | ok millert@ (who spotted and provided the -ll removal bits)
* Add -E flag (make warnings fatal), following the behavior of GNU m4 1.4.9+bcallah2017-06-157-24/+73
| | | | | | Help and direction millert@ espie@ anton@ deraadt@ ok espie@
* Yet another missed ferror callespie2015-12-071-1/+3
|
* There really is no double standard. Treat m4 just like openssl, byderaadt2015-11-033-31/+3
| | | | | removing VMS and MSDOS support. ok espie
* pledge m4. tested by me.espie2015-11-011-1/+4
| | | | | | reordered to match the manpage, and added tmppath as an annotation prompted by deraadt@
* Avoid .Ns right after .Pf, it's pointless.schwarze2015-09-141-5/+3
| | | | In some cases, do additional cleanup in the immediate vicinity.
* Add missing #include <stdint.h> for SIZE_MAXmillert2015-04-291-1/+2
|
* add check for overflow while doubling (very unlikely in practice, but stillespie2015-04-251-2/+5
| | | | | | better style code). Problem noticed by deraadt@ in m4. okay doug@ deraadt@
* Use xstrdup(), from Michael W. Bombardierimillert2015-03-141-7/+3
| | | | OK espie@
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-051-1/+2
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-3/+3
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* fix test-redef2:espie2014-12-214-10/+87
| | | | | | | - introduce explicit STORAGE classes for the shadow stack entries - delay freeing definitions if they're in-use, keep them in a simple array. okay millert@
* better error handling in mkstemp/unlink/fdopen logic.espie2014-07-111-6/+5
| | | | | from Doug Hogan <doug@acyclic.org> okay miod@
* annotate regexp error messages with source string.espie2014-07-101-22/+29
| | | | okay miod@
* adjust to ohash being in libutil now, and to the interface changes.espie2014-05-126-48/+27
| | | | | | fix potential integer overflows in memory allocation (mostly for pedagogical purposes, these are unlikely to overflow in practice) move the rest of lst.lib stuff into its own directory.
* check for integer overflows in custom allocs, okay jca@espie2014-04-285-15/+71
|
* update STANDARDS somewhat, and some macro simplification;jmc2014-04-141-11/+11
| | | | ok millert sobrado
* expand the "eval" description a little; from wiz@netbsdjmc2014-01-121-5/+7
|
* repair signed char vs isdigitderaadt2013-11-201-2/+2
| | | | ok espie
* cleanup up a nest of if/if/elsederaadt2013-11-141-3/+5
|
* use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@schwarze2013-07-161-5/+5
|
* new m4 -g stuff:espie2012-04-126-11/+23
| | | | | | | | | | - expr(`4**3') - include(`hey I am not there') keeps going. work with Baptiste Daroussin, who had the idea but didn't nail all details right. okay otto@, miod@
* improve gm4 compatibility, from Robert Young, thanks !espie2011-11-061-2/+2
| | | | | note that patsubst is non-standard. okay miod@, deraadt@
* zap dead stuffespie2011-09-273-6/+3
| | | | from Michael W. Bombardieri
* fix translit() behavior to not be recursive. Fixes autoconf 2.65, matchesespie2011-03-241-24/+6
| | | | | | | | | | behavior of solaris m4 (e.g., posix). Bug-fix by Nigel Taylor Okay sthen@, todd@. Comment amended per sthen@' suggestion.
* more EXIT STATUS bits; from Daniel Dickmanjmc2010-10-211-2/+8
|
* more wacky macro fixing;jmc2010-09-191-3/+3
|
* Remove stray spaces. No code change.marco2010-09-0710-175/+173
|
* conform to gnum4 AND traditional m4 (solaris) behavior, namely,espie2010-03-251-4/+14
| | | | | | | | translit(`ab',`aa',`cd') -> `cb' (first occurrence matches) okay miod@, sthen@ fixes minor autoconf issues, like HAVE_VOID__ instead of HAVE_VOID_P
* add more gnum4 support: regexps do weird things with empty patterns (thisespie2010-03-224-20/+47
| | | | | | | | | | is required for newer autoconf). fix the tokenizer for gnu extensions, allowing digits out of range is ridiculous. add POSIX2008 mkstemp and document it (also documenting that mktemp is safe, not posix...) tidy the manpage, do extra .Nm m4 -> .Nm. okay otto@, miod@, jmc@
* whitespace; from deraadt@sthen2009-10-141-2/+2
|
* Support the -P option from gnu m4, which prefixes builtins with thesthen2009-10-145-13/+35
| | | | | string m4_. Feedback from jmc@, Tobias Ulmer, Matthew Dempsky - thanks! ok espie@
* undefine() leaves the hash entry for the macro (for use by builtin()) andguenther2009-06-261-2/+3
| | | | | | | only deletes the definition; macro_for_all needs to skip those to keep dumpdef() from segving ok and regress test by espie (thanks!)
* bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewjmc2009-02-081-3/+3
| | | | updates to follow;
* kill trailing whitespace;jmc2008-08-221-3/+3
|
* Document new gnu extensions, okay jmc@, otto@espie2008-08-211-6/+11
|
* in gnu-m4 mode, allow definition of the empty macro (yes, autoconf 2.62espie2008-08-211-6/+8
| | | | | | actually uses this, bleh) okay otto@
* extend format support to cater to recent GNU autoconfespie2008-08-211-30/+72
| | | | okay otto@, some useful ideas from miod@
* gnu extension: 0rN:az for baseN numbers.espie2008-08-212-2/+38
| | | | okay otto@
* use unsigned char for buffers, allow differentiating between EOF and y".espie2008-08-212-16/+16
| | | | okay otto@
* fixespie2008-08-161-9/+5
|
* revert eval.cespie2008-08-161-8/+6
|
* not yet, committed too muchespie2008-08-165-126/+48
|
* argument parsing should only skip spaces outside of parenthesis.espie2008-08-168-63/+148
| | | | | | | | | Inside matching parenthesis, keep spaces as is (use chrsave instead of pbstr, since there's no way it can be a further macro expansion). Fixes a long-standing issue with autoconf ( --option -> --option), matches other m4 than gnum4 okay millert@, fries@
* be more liberal in include handling, namely we only error out if it'sespie2008-08-161-2/+2
| | | | | | | | the end of the last included file AND we still have a macro to expand. autoconf uses this in wine, and it turns out other m4 also do things that way (not only gnu m4). okay fries@, millert@