[llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Oct 4 17:46:32 PDT 2004



Changes in directory llvm/lib/System/Unix:

MappedFile.cpp updated: 1.1 -> 1.2
---
Log message:

Solaris doesn't have MAP_FILE.


---
Diffs of the changes:  (+4 -1)

Index: llvm/lib/System/Unix/MappedFile.cpp
diff -u llvm/lib/System/Unix/MappedFile.cpp:1.1 llvm/lib/System/Unix/MappedFile.cpp:1.2
--- llvm/lib/System/Unix/MappedFile.cpp:1.1	Mon Oct  4 06:08:32 2004
+++ llvm/lib/System/Unix/MappedFile.cpp	Mon Oct  4 19:46:21 2004
@@ -76,7 +76,10 @@
 void* MappedFile::map() {
   if (!isMapped()) {
     int prot = PROT_NONE;
-    int flags = MAP_FILE;
+    int flags = 0;
+#ifdef MAP_FILE
+    flags |= MAP_FILE;
+#endif
     if (options_ == 0) {
       prot = PROT_READ;
       flags = MAP_PRIVATE;






More information about the llvm-commits mailing list