diff options
Diffstat (limited to 'src/google/protobuf/io/zero_copy_stream_impl.cc')
-rw-r--r-- | src/google/protobuf/io/zero_copy_stream_impl.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/google/protobuf/io/zero_copy_stream_impl.cc b/src/google/protobuf/io/zero_copy_stream_impl.cc index c7372ac2..81fb5033 100644 --- a/src/google/protobuf/io/zero_copy_stream_impl.cc +++ b/src/google/protobuf/io/zero_copy_stream_impl.cc @@ -56,6 +56,9 @@ namespace io { // Win32 lseek is broken: If invoked on a non-seekable file descriptor, its // return value is undefined. We re-define it to always produce an error. #define lseek(fd, offset, origin) ((off_t)-1) +#endif + +#ifdef _MSC_VER // DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import // them like we do below. using google::protobuf::internal::win32::access; @@ -86,8 +89,6 @@ FileInputStream::FileInputStream(int file_descriptor, int block_size) impl_(©ing_input_, block_size) { } -FileInputStream::~FileInputStream() {} - bool FileInputStream::Close() { return copying_input_.Close(); } @@ -278,8 +279,6 @@ bool FileOutputStream::CopyingFileOutputStream::Write( IstreamInputStream::IstreamInputStream(std::istream* input, int block_size) : copying_input_(input), impl_(©ing_input_, block_size) {} -IstreamInputStream::~IstreamInputStream() {} - bool IstreamInputStream::Next(const void** data, int* size) { return impl_.Next(data, size); } @@ -353,9 +352,6 @@ ConcatenatingInputStream::ConcatenatingInputStream( : streams_(streams), stream_count_(count), bytes_retired_(0) { } -ConcatenatingInputStream::~ConcatenatingInputStream() { -} - bool ConcatenatingInputStream::Next(const void** data, int* size) { while (stream_count_ > 0) { if (streams_[0]->Next(data, size)) return true; |