Commit 7b9b3a92 authored by 's avatar

MSVC/Mac build fix: Hide the private methods in InMemoryFile behind a...

MSVC/Mac build fix: Hide the private methods in InMemoryFile behind a HAVE_IN_MEMORY_FILE_FOPENCOOKIE guard. These use datatypes like off64_t which don't seem to port to MSVC/Mac.
parent 2d1c8327
......@@ -25,6 +25,7 @@ InMemoryFile::InMemoryFile()
{
}
#ifdef HAVE_IN_MEMORY_FILE_FOPENCOOKIE
ssize_t InMemoryFile::_read(char* buf, size_t sz)
{
auto toRead = std::min<size_t>(data.size() - iohead, sz);
......@@ -53,6 +54,7 @@ int InMemoryFile::_seek(off64_t* offset, int whence)
iohead = static_cast<size_t>(*offset);
return 0;
}
#endif // def HAVE_IN_MEMORY_FILE_FOPENCOOKIE
FILE* InMemoryFile::open(const char* mode)
{
......
......@@ -32,9 +32,11 @@ private:
std::vector<char> data;
FILE *fptr;
#ifdef HAVE_IN_MEMORY_FILE_FOPENCOOKIE
ssize_t _read(char* buf, size_t sz);
ssize_t _write(const char* buf, size_t sz);
int _seek(off64_t* offset, int whence);
#endif
public:
InMemoryFile();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment