diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2012-12-18 15:33:43 -0500 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-01-24 16:22:42 -0500 |
commit | 73760b3c213733fc98d67f9ceeb74d06b01a3777 (patch) | |
tree | 8840f595428560499bc6739513ac3a1fbb2746ca /src/parser/memory_mapped_input_buffer.cpp | |
parent | 1435948e241d3134d44662b9476935fe635b4166 (diff) |
Add win32 support (merge from mdeters/win32, with some cleanup).
Diffstat (limited to 'src/parser/memory_mapped_input_buffer.cpp')
-rw-r--r-- | src/parser/memory_mapped_input_buffer.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/parser/memory_mapped_input_buffer.cpp b/src/parser/memory_mapped_input_buffer.cpp index 9f72ac51c..f110b1145 100644 --- a/src/parser/memory_mapped_input_buffer.cpp +++ b/src/parser/memory_mapped_input_buffer.cpp @@ -18,10 +18,15 @@ #include <stdio.h> #include <stdint.h> +#include <antlr3input.h> + +#ifndef _WIN32 + #include <cerrno> #include <sys/mman.h> #include <sys/stat.h> -#include <antlr3input.h> + +#endif /* _WIN32 */ #include "parser/memory_mapped_input_buffer.h" #include "util/exception.h" @@ -31,6 +36,14 @@ namespace parser { extern "C" { +#ifdef _WIN32 + +pANTLR3_INPUT_STREAM MemoryMappedInputBufferNew(const std::string& filename) { + return 0; +} + +#else /* ! _WIN32 */ + static ANTLR3_UINT32 MemoryMapFile(pANTLR3_INPUT_STREAM input, const std::string& filename); @@ -112,6 +125,8 @@ void UnmapFile(pANTLR3_INPUT_STREAM input) { input->close(input); } +#endif /* _WIN32 */ + }/* extern "C" */ }/* CVC4::parser namespace */ |