aboutsummaryrefslogtreecommitdiff
path: root/src/libparsec/include/sys_io.h
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2026-08-24 11:16:07 +0200
committerFelix Morgner <felix.morgner@gmail.com>2026-08-24 11:16:07 +0200
commitc068f22329d5cc722622a2183bbb22eef2093df7 (patch)
tree12d56c1aede67988a55e241364606bfbb4dba933 /src/libparsec/include/sys_io.h
downloadopenparsec-main.tar.xz
openparsec-main.zip
initial importHEADmain
Diffstat (limited to 'src/libparsec/include/sys_io.h')
-rw-r--r--src/libparsec/include/sys_io.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/libparsec/include/sys_io.h b/src/libparsec/include/sys_io.h
new file mode 100644
index 0000000..0d066ee
--- /dev/null
+++ b/src/libparsec/include/sys_io.h
@@ -0,0 +1,37 @@
+/*
+ * PARSEC HEADER: sys_io.h
+ */
+
+#ifndef _SYS_IO_H_
+#define _SYS_IO_H_
+
+
+// include header containing I/O system calls ---------------------------------
+
+#if defined(SYSTEM_COMPILER_GCC) || defined(SYSTEM_COMPILER_CLANG) || defined(SYSTEM_COMPILER_LLVM_GCC)
+
+ //NOTE:
+ // io.h need not be included (doesn't exist and
+ // prototypes are declared elsewhere).
+
+ //NOTE:
+ // filelength() doesn't exist;
+ // SYS_FILE::SYS_filelength() must not be used.
+
+ #define filelength(x) (PANIC(0),0)
+
+#else // SYSTEM_COMPILER_GCC
+
+ // simply include correct header
+ #include <io.h>
+
+ #ifndef SYSTEM_COMPILER_MSVC
+ #include <direct.h>
+ #endif
+
+#endif // SYSTEM_COMPILER_GCC
+
+
+#endif // _SYS_IO_H_
+
+