[llvm] r175571 - Update a portability kludge to keep it in sync with changes in the code
Dan Gohman
dan433584 at gmail.com
Tue Feb 19 14:38:58 PST 2013
Author: djg
Date: Tue Feb 19 16:38:58 2013
New Revision: 175571
URL: http://llvm.org/viewvc/llvm-project?rev=175571&view=rev
Log:
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.
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=175571&r1=175570&r2=175571&view=diff
==============================================================================
--- llvm/trunk/lib/Support/MemoryBuffer.cpp (original)
+++ llvm/trunk/lib/Support/MemoryBuffer.cpp Tue Feb 19 16:38:58 2013
@@ -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>
More information about the llvm-commits
mailing list