From ca30d2edaaf9e4e9e146650f560c271f55c0ce32 Mon Sep 17 00:00:00 2001
From: pgen
Date: Sun, 21 Nov 2021 18:39:49 +0100
Subject: Add safe wrappers to manage EINTR
---
safe.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 safe.h
(limited to 'safe.h')
diff --git a/safe.h b/safe.h
new file mode 100644
index 0000000..472a7c9
--- /dev/null
+++ b/safe.h
@@ -0,0 +1,22 @@
+/* ########################################################### */
+/* This Software is licensed under the GPL licensed Version 2, */
+/* please read http://www.gnu.org/copyleft/gpl.html */
+/* ########################################################### */
+
+#ifndef SAFE_H
+#define SAFE_H
+
+int
+fputs_safe(const char * restrict s, FILE * restrict stream);
+
+int
+fputc_safe(int c, FILE * stream);
+int
+
+tcsetattr_safe(int fildes, int optional_actions,
+ const struct termios * termios_p);
+
+FILE *
+fopen_safe(const char * restrict stream, const char * restrict mode);
+
+#endif
--
cgit v1.2.3