]> git.ozlabs.org Git - ccan/blobdiff - ccan/noerr/noerr.h
gitify the tree, especially the web makefile.
[ccan] / ccan / noerr / noerr.h
index 559ba6132840543f4d9a2e4fa1dcb07cb9cdf6fb..191b3d3cfc49eb76405b9b79f4680c0e622b43fd 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef NOERR_H
 #define NOERR_H
+#include <stdio.h>
 
 /**
  * close_noerr - close without stomping errno.
  */
 int close_noerr(int fd);
 
+/**
+ * fclose_noerr - close without stomping errno.
+ * @fp: the FILE pointer.
+ *
+ * errno is saved and restored across the call to fclose: if an error occurs,
+ * the resulting (non-zero) errno is returned.
+ */
+int fclose_noerr(FILE *fp);
+
 /**
  * unlink_noerr - unlink a file without stomping errno.
  * @pathname: the path to unlink.