diff options
author | Paul Smith <psmith@gnu.org> | 2013-11-23 22:23:52 -0500 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-11-23 22:23:52 -0500 |
commit | 757849cd93a9bc361a5113e3aaafe516773aad44 (patch) | |
tree | d6acd1705fe25873b43fa7d16b736e44b6191ab7 /expand.c | |
parent | 9d58570c77240fed53d1f88217877f8e778f4bb2 (diff) | |
download | gunmake-757849cd93a9bc361a5113e3aaafe516773aad44.tar.gz |
[SV 40361] Don't use vsnprintf(), which is an ISO C99 function.
* output.c (error, fatal, message): Take an extra argument specifying
how many bytes are used by the formatted arguments.
(get_buffer): New function that allocates the requested buffer size.
Remove msc_vsnprintf(), vfmtconcat(), and fmtconcat() as unneeded.
* makeint.h: Declare various helper macros for generating output.
* *.c: Change all error(), fatal(), message() calls to use the macros,
or pass the extra length argument directly.
Diffstat (limited to 'expand.c')
-rw-r--r-- | expand.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -121,9 +121,9 @@ recursively_expand_for_file (struct variable *v, struct file *file) { if (!v->exp_count) /* Expanding V causes infinite recursion. Lose. */ - fatal (*expanding_var, - _("Recursive variable '%s' references itself (eventually)"), - v->name); + OS (fatal, *expanding_var, + _("Recursive variable '%s' references itself (eventually)"), + v->name); --v->exp_count; } @@ -266,7 +266,7 @@ variable_expand_string (char *line, const char *string, long length) end = strchr (beg, closeparen); if (end == 0) /* Unterminated variable reference. */ - fatal (*expanding_var, _("unterminated variable reference")); + O (fatal, *expanding_var, _("unterminated variable reference")); p1 = lindex (beg, end, '$'); if (p1 != 0) { |