[llvm-commits] [llvm] r167467 - /llvm/trunk/lib/Support/MemoryBuffer.cpp
Daniel Dunbar
daniel at zuster.org
Tue Nov 6 09:08:09 PST 2012
Author: ddunbar
Date: Tue Nov 6 11:08:09 2012
New Revision: 167467
URL: http://llvm.org/viewvc/llvm-project?rev=167467&view=rev
Log:
MemoryBuffer: Windows doesn't define S_IFIFO.
Modified:
llvm/trunk/lib/Support/MemoryBuffer.cpp
Modified: llvm/trunk/lib/Support/MemoryBuffer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MemoryBuffer.cpp?rev=167467&r1=167466&r2=167467&view=diff
==============================================================================
--- llvm/trunk/lib/Support/MemoryBuffer.cpp (original)
+++ llvm/trunk/lib/Support/MemoryBuffer.cpp Tue Nov 6 11:08:09 2012
@@ -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 @@
// 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);
}
More information about the llvm-commits
mailing list