summaryrefslogtreecommitdiff
path: root/spec/ffi/fixtures/PipeHelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ffi/fixtures/PipeHelper.h')
-rw-r--r--spec/ffi/fixtures/PipeHelper.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/ffi/fixtures/PipeHelper.h b/spec/ffi/fixtures/PipeHelper.h
new file mode 100644
index 0000000..4a02111
--- /dev/null
+++ b/spec/ffi/fixtures/PipeHelper.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2015 Lars Kanis. All rights reserved.
+ *
+ * For licensing, see LICENSE.SPECS
+ */
+
+#ifndef PIPEHELPER_H
+#define PIPEHELPER_H
+
+#ifdef _WIN32
+#define FD_TYPE HANDLE
+#else
+#define FD_TYPE int
+#endif
+
+int pipeHelperCreatePipe(FD_TYPE pipefd[2]);
+char pipeHelperReadChar(FD_TYPE fd, int timeout);
+int pipeHelperWriteChar(FD_TYPE fd, char c);
+void pipeHelperClosePipe(FD_TYPE fd);
+
+#endif