summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/MemoryBuffer.cpp
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
commit3e1729484f0046b4bd844c7ef0e6ff407026ffa7 (patch)
treeaa91a6284075d8473123f832e0928c3546b95c84 /llvm/lib/Support/MemoryBuffer.cpp
parent4af6bf63ca5e1636b8d3cb51b78f23a947228fb9 (diff)
downloadbcm5719-llvm-3e1729484f0046b4bd844c7ef0e6ff407026ffa7.tar.gz
bcm5719-llvm-3e1729484f0046b4bd844c7ef0e6ff407026ffa7.zip
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. llvm-svn: 175571
Diffstat (limited to 'llvm/lib/Support/MemoryBuffer.cpp')
-rw-r--r--llvm/lib/Support/MemoryBuffer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp
index 0d5d4d7954f..691b6f50690 100644
--- a/llvm/lib/Support/MemoryBuffer.cpp
+++ b/llvm/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>
OpenPOWER on IntegriCloud