#include <ostream>
using namespace llvm;
-#if !defined(_MSC_VER)
#include <fcntl.h>
-#else
+
+#if defined(_MSC_VER)
#include <io.h>
-#define open(x,y,z) _open(x,y)
-#define write(fd, start, size) _write(fd, start, size)
-#define close(fd) _close(fd)
+#ifndef STDIN_FILENO\r
+# define STDIN_FILENO 0\r
+#endif\r
+#ifndef STDOUT_FILENO\r
+# define STDOUT_FILENO 1\r
+#endif\r
+#ifndef STDERR_FILENO\r
+# define STDERR_FILENO 2\r
+#endif\r
#endif
// An out of line virtual method to provide a home for the class vtable.