]> git.ozlabs.org Git - ccan/blobdiff - ccan/noerr/noerr.h
ccan: Correct some poor conventions in _info includes
[ccan] / ccan / noerr / noerr.h
index 559ba6132840543f4d9a2e4fa1dcb07cb9cdf6fb..99b0f69043ac458672597a7a3932a989528f491d 100644 (file)
@@ -1,5 +1,7 @@
+/* CC0 (Public domain) - see LICENSE file for details */
 #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.