summaryrefslogtreecommitdiff
path: root/cbtcommon/sio.h
diff options
context:
space:
mode:
Diffstat (limited to 'cbtcommon/sio.h')
-rw-r--r--cbtcommon/sio.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/cbtcommon/sio.h b/cbtcommon/sio.h
new file mode 100644
index 0000000..f6f2978
--- /dev/null
+++ b/cbtcommon/sio.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2001, 2002, 2003 David Mansfield and Cobite, Inc.
+ * See COPYING file for license information
+ */
+
+#ifndef _SIO_H
+#define _SIO_H
+
+/* include for typedefs */
+#ifdef WIN32
+#include <stdio.h>
+typedef int ssize_t;
+#else
+#include <unistd.h>
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* these are W.R.Stevens' famous io routines to read or write bytes to fd */
+ssize_t readn(int, void *, size_t);
+ssize_t writen(int, const void *, size_t);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SIO_H */