Update a portability kludge to keep it in sync with changes in the code
authorDan Gohman <dan433584@gmail.com>
Tue, 19 Feb 2013 22:38:58 +0000 (22:38 +0000)
committerDan Gohman <dan433584@gmail.com>
Tue, 19 Feb 2013 22:38:58 +0000 (22:38 +0000)
which uses it. This is not ideal, but it ought to at least restore the
behavior to what it was before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175571 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/MemoryBuffer.cpp

index 0d5d4d7954f0d99bb915fcdfe8d0ed85c43769e5..691b6f50690e7e51b60b4f65e7eba127c9090790 100644 (file)
 #include <unistd.h>
 #else
 #include <io.h>
-#ifndef S_ISFIFO
-#define S_ISFIFO(x) (0)
+// Simplistic definitinos of these macros to allow files to be read with
+// MapInFilePages.
+#ifndef S_ISREG
+#define S_ISREG(x) (1)
+#endif
+#ifndef S_ISBLK
+#define S_ISBLK(x) (0)
 #endif
 #endif
 #include <fcntl.h>