projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
baf045e
)
Fix for systems that do not have the MAP_FILE macro defined.
author
Tim King
<taking@cs.nyu.edu>
Wed, 24 Oct 2012 21:28:52 +0000
(21:28 +0000)
committer
Tim King
<taking@cs.nyu.edu>
Wed, 24 Oct 2012 21:28:52 +0000
(21:28 +0000)
src/parser/memory_mapped_input_buffer.cpp
patch
|
blob
|
history
diff --git
a/src/parser/memory_mapped_input_buffer.cpp
b/src/parser/memory_mapped_input_buffer.cpp
index 5c2523aabf83c3c48033535fbdec4899d71e65a8..ff3f8b27d55587c0d9de1151960e2b0ee886db25 100644
(file)
--- a/
src/parser/memory_mapped_input_buffer.cpp
+++ b/
src/parser/memory_mapped_input_buffer.cpp
@@
-95,8
+95,14
@@
static ANTLR3_UINT32 MemoryMapFile(pANTLR3_INPUT_STREAM input,
return ANTLR3_ERR_NOFILE;
}
- input->data = mmap(0, input->sizeBuf, PROT_READ, MAP_FILE | MAP_PRIVATE, fd,
- 0);
+
+#ifndef MAP_FILE
+ //Tim: This is required for SunOS
+ input->data = mmap(0, input->sizeBuf, PROT_READ, MAP_PRIVATE, fd, 0);
+#else
+ input->data = mmap(0, input->sizeBuf, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0);
+#endif
+
errno = 0;
if(intptr_t(input->data) == -1) {
return ANTLR3_ERR_NOMEM;