summaryrefslogtreecommitdiff
path: root/klm/util/unistd.hh
diff options
context:
space:
mode:
Diffstat (limited to 'klm/util/unistd.hh')
-rw-r--r--klm/util/unistd.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/klm/util/unistd.hh b/klm/util/unistd.hh
new file mode 100644
index 00000000..0379c491
--- /dev/null
+++ b/klm/util/unistd.hh
@@ -0,0 +1,22 @@
+#ifndef UTIL_UNISTD_H
+#define UTIL_UNISTD_H
+
+#if defined(_WIN32) || defined(_WIN64)
+
+// Windows doesn't define <unistd.h>
+//
+// So we define what we need here instead:
+//
+#define STDIN_FILENO=0
+#define STDOUT_FILENO=1
+
+
+#else // Huzzah for POSIX!
+
+#include <unistd.h>
+
+#endif
+
+
+
+#endif // UTIL_UNISTD_H