diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-11-06 17:08:09 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-11-06 17:08:09 +0000 |
commit | 64afe13a2090d34e25d197862f4c3f54fcea6397 (patch) | |
tree | c3877381ce629c540605869bf77519ae2bd1ac88 | |
parent | 4db4a71ffd8b6fce063eaa14ade3411a5d75a4b2 (diff) |
MemoryBuffer: Windows doesn't define S_IFIFO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167467 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Support/MemoryBuffer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp index 52481281ff..ec373e7f99 100644 --- a/lib/Support/MemoryBuffer.cpp +++ b/lib/Support/MemoryBuffer.cpp @@ -33,6 +33,9 @@ #include <unistd.h> #else #include <io.h> +#ifndef S_ISFIFO +#define S_ISFIFO(x) (0) +#endif #endif #include <fcntl.h> using namespace llvm; @@ -321,7 +324,7 @@ error_code MemoryBuffer::getOpenFile(int FD, const char *Filename, // If this is a named pipe, we can't trust the size. Create the memory // buffer by copying off the stream. - if (FileInfo.st_mode & S_IFIFO) { + if (S_ISFIFO(FileInfo.st_mode)) { return getMemoryBufferForStream(FD, Filename, result); } |