summaryrefslogtreecommitdiffstats
path: root/safe.h
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2021-11-21 18:39:49 +0100
committerpgen <p.gen.progs@gmail.com>2021-11-21 20:43:52 +0100
commitca30d2edaaf9e4e9e146650f560c271f55c0ce32 (patch)
tree78628fb33b08a354aa93caa905a9f7e2c1b27a8e /safe.h
parentbf7fde6db92662927ad8e04bd5e55a5619d5b3a2 (diff)
Add safe wrappers to manage EINTR
Diffstat (limited to 'safe.h')
-rw-r--r--safe.h22
1 files changed, 22 insertions, 0 deletions
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