aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2013-02-19 22:38:58 +0000
committerDan Gohman <dan433584@gmail.com>2013-02-19 22:38:58 +0000
commit2f87fed2479017589051a5a99277e4278f6372e3 (patch)
tree6d8ffe80792b69a451b8c1f74af57db9e3e2c6ec
parent5cdeca8b1d726790fe9687bc4a4d615d299bc151 (diff)
Update a portability kludge to keep it in sync with changes in the code
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
-rw-r--r--lib/Support/MemoryBuffer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp
index 0d5d4d7954..691b6f5069 100644
--- a/lib/Support/MemoryBuffer.cpp
+++ b/lib/Support/MemoryBuffer.cpp
@@ -33,8 +33,13 @@
#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>