summaryrefslogtreecommitdiff
path: root/include/closestream.h
AgeCommit message (Collapse)AuthorFilesLines
2013-04-26include: add close_fd() for noticing write errors before close()Sami Kerola1-0/+19
Essentially this helper function is similar to close_stream(), but for file descriptors. When a file descriptors are close()'d status of write is often overlooked. The close_fd() will try to determine what happen to writes with fsync() before closing the file descriptor. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-23build-sys: determine availability of __fpending()Sami Kerola1-0/+10
Needed to for making Cygwin more possible. Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/5656 Reported-by: Bernhard Voelker <bernhard.voelker@siemens-enterprise.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-04include: add stream error checking facilitySami Kerola1-0/+41
The close_stream() is copied from GNU lib. Inspiration to do this is talk by Jim Meyering - Goodbye World! The perils of relying on output streams in C. Reference: http://www.irill.org/events/ghm-gnu-hackers-meeting/videos/jim-meyering-goodbye-world-the-perils-of-relying-on-output-streams-in-c Signed-off-by: Sami Kerola <kerolasa@iki.fi>