]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 13651] Handle out-of-memory conditions slightly more gracefully.
authorPaul Smith <psmith@gnu.org>
Mon, 2 Jan 2017 20:46:30 +0000 (15:46 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 4 Jun 2017 22:37:20 +0000 (18:37 -0400)
commit68be4f74fce91b76e5915449268d6b5eb687aab9
tree38c47d0b461f86652b69927a7d2312bbb6452343
parent2b8e3bb23f96c2458818f011593557d3353dade3
[SV 13651] Handle out-of-memory conditions slightly more gracefully.

* makeint.h: Change OUT_OF_MEM() macro to out_of_memory() function.
* output.h, job.h: Move FD_* macros from job.h to output.h.
* output.c (output_write): Write a buffer to an FD directly.
(out_of_memory): Use output_write() to avoid allocating more
memory while writing the error, and call exit() instead of die().
This does mean we can't translate the error string, though.
* misc.c (xmalloc, xcalloc, xrealloc, xstrdup, xstrndup): Call new
out_of_memory() rather than OUT_OF_MEM().
* read.c (parse_file_seq): Ditto.
arscan.c
config.ami.template
config.h.W32.template
configh.dos.template
job.h
makeint.h
misc.c
output.c
output.h
read.c