]> git.ipfire.org Git - thirdparty/make.git/commit
Change output_write() to writebuf(), add readbuf() helper.
authorPaul Smith <psmith@gnu.org>
Sun, 16 Sep 2018 05:04:10 +0000 (01:04 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 16 Sep 2018 05:04:10 +0000 (01:04 -0400)
commit5d6508a475d66df5fcbbdc2b8800672381303014
tree4ef08d5ca4fba10b9e6e564fa8ece2c82c91e543
parentac11ec5497b3b20b43a08da463d8a4460db8116b
Change output_write() to writebuf(), add readbuf() helper.

* src/misc.c (writebuf, readbuf): Create helper functions that will
reliably write a buffer to a file descriptor in the face of EINTR
causing short writes, and read from a file descriptor into a buffer
in the face of EINTR causing short reads.
* src/makeint.h: Declare these functions.
* src/output.c: Remove output_write() and replace with writebuf().
(_outputs, out_of_memory): Call writebuf(), not output_write().
* src/arscan.c (ar_scan): Call readbuf() instead of read(2).
(ar_member_touch): Remove duplicate header write, call writebuf()
instead of output_write(), and readbuf() instead of read(2).
src/arscan.c
src/makeint.h
src/misc.c
src/output.c