Index: src/google/protobuf/io/coded_stream.h =================================================================== --- src/google/protobuf/io/coded_stream.h (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/coded_stream.h (.../trunk/protobuf-icb) (revision 28092) @@ -173,7 +173,7 @@ // Skips a number of bytes. Returns false if an underlying read error // occurs. - bool Skip(int count); + bool Skip(off_t count); // Sets *data to point directly at the unread part of the CodedInputStream's // underlying buffer, and *size to the size of that buffer, but does not @@ -600,7 +600,7 @@ // Skips a number of bytes, leaving the bytes unmodified in the underlying // buffer. Returns false if an underlying write error occurs. This is // mainly useful with GetDirectBufferPointer(). - bool Skip(int count); + bool Skip(off_t count); // Sets *data to point directly at the unwritten part of the // CodedOutputStream's underlying buffer, and *size to the size of that Index: src/google/protobuf/io/zero_copy_stream_impl.cc =================================================================== --- src/google/protobuf/io/zero_copy_stream_impl.cc (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/zero_copy_stream_impl.cc (.../trunk/protobuf-icb) (revision 28092) @@ -93,7 +93,7 @@ impl_.BackUp(count); } -bool FileInputStream::Skip(int count) { +bool FileInputStream::Skip(off_t count) { return impl_.Skip(count); } @@ -149,7 +149,7 @@ return result; } -int FileInputStream::CopyingFileInputStream::Skip(int count) { +off_t FileInputStream::CopyingFileInputStream::Skip(off_t count) { GOOGLE_CHECK(!is_closed_); if (!previous_seek_failed_ && @@ -283,7 +283,7 @@ impl_.BackUp(count); } -bool IstreamInputStream::Skip(int count) { +bool IstreamInputStream::Skip(off_t count) { return impl_.Skip(count); } @@ -377,7 +377,7 @@ } } -bool ConcatenatingInputStream::Skip(int count) { +bool ConcatenatingInputStream::Skip(off_t count) { while (stream_count_ > 0) { // Assume that ByteCount() can be used to find out how much we actually // skipped when Skip() fails. @@ -441,7 +441,7 @@ } } -bool LimitingInputStream::Skip(int count) { +bool LimitingInputStream::Skip(off_t count) { if (count > limit_) { if (limit_ < 0) return false; input_->Skip(limit_); Index: src/google/protobuf/io/zero_copy_stream_impl.h =================================================================== --- src/google/protobuf/io/zero_copy_stream_impl.h (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/zero_copy_stream_impl.h (.../trunk/protobuf-icb) (revision 28092) @@ -90,7 +90,7 @@ // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size); void BackUp(int count); - bool Skip(int count); + bool Skip(off_t count); int64 ByteCount() const; private: @@ -105,7 +105,7 @@ // implements CopyingInputStream --------------------------------- int Read(void* buffer, int size); - int Skip(int count); + off_t Skip(off_t count); private: // The file descriptor. @@ -224,7 +224,7 @@ // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size); void BackUp(int count); - bool Skip(int count); + bool Skip(off_t count); int64 ByteCount() const; private: @@ -311,7 +311,7 @@ // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size); void BackUp(int count); - bool Skip(int count); + bool Skip(off_t count); int64 ByteCount() const; @@ -337,7 +337,7 @@ // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size); void BackUp(int count); - bool Skip(int count); + bool Skip(off_t count); int64 ByteCount() const; Index: src/google/protobuf/io/tokenizer_unittest.cc =================================================================== --- src/google/protobuf/io/tokenizer_unittest.cc (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/tokenizer_unittest.cc (.../trunk/protobuf-icb) (revision 28092) @@ -140,7 +140,7 @@ } void BackUp(int count) { return array_stream_.BackUp(count); } - bool Skip(int count) { return array_stream_.Skip(count); } + bool Skip(off_t count) { return array_stream_.Skip(count); } int64 ByteCount() const { return array_stream_.ByteCount(); } private: Index: src/google/protobuf/io/zero_copy_stream_impl_lite.cc =================================================================== --- src/google/protobuf/io/zero_copy_stream_impl_lite.cc (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/zero_copy_stream_impl_lite.cc (.../trunk/protobuf-icb) (revision 28092) @@ -84,7 +84,7 @@ last_returned_size_ = 0; // Don't let caller back up further. } -bool ArrayInputStream::Skip(int count) { +bool ArrayInputStream::Skip(off_t count) { GOOGLE_CHECK_GE(count, 0); last_returned_size_ = 0; // Don't let caller back up. if (count > size_ - position_) { @@ -186,12 +186,12 @@ CopyingInputStream::~CopyingInputStream() {} -int CopyingInputStream::Skip(int count) { +off_t CopyingInputStream::Skip(off_t count) { char junk[4096]; - int skipped = 0; + off_t skipped = 0; while (skipped < count) { - int bytes = Read(junk, min(count - skipped, - implicit_cast(sizeof(junk)))); + int bytes = Read(junk, implicit_cast(min(count - skipped, + implicit_cast(sizeof(junk))))); if (bytes <= 0) { // EOF or read error. return skipped; @@ -264,7 +264,7 @@ backup_bytes_ = count; } -bool CopyingInputStreamAdaptor::Skip(int count) { +bool CopyingInputStreamAdaptor::Skip(off_t count) { GOOGLE_CHECK_GE(count, 0); if (failed_) { @@ -282,7 +282,7 @@ count -= backup_bytes_; backup_bytes_ = 0; - int skipped = copying_stream_->Skip(count); + off_t skipped = copying_stream_->Skip(count); position_ += skipped; return skipped == count; } Index: src/google/protobuf/io/gzip_stream.cc =================================================================== --- src/google/protobuf/io/gzip_stream.cc (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/gzip_stream.cc (.../trunk/protobuf-icb) (revision 28092) @@ -164,7 +164,7 @@ output_position_ = reinterpret_cast( reinterpret_cast(output_position_) - count); } -bool GzipInputStream::Skip(int count) { +bool GzipInputStream::Skip(off_t count) { const void* data; int size; bool ok = Next(&data, &size); Index: src/google/protobuf/io/zero_copy_stream_impl_lite.h =================================================================== --- src/google/protobuf/io/zero_copy_stream_impl_lite.h (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/zero_copy_stream_impl_lite.h (.../trunk/protobuf-icb) (revision 28092) @@ -72,7 +72,7 @@ // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size); void BackUp(int count); - bool Skip(int count); + bool Skip(off_t count); int64 ByteCount() const; @@ -181,7 +181,7 @@ // // The default implementation just repeatedly calls Read() into a scratch // buffer. - virtual int Skip(int count); + virtual off_t Skip(off_t count); }; // A ZeroCopyInputStream which reads from a CopyingInputStream. This is @@ -209,7 +209,7 @@ // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size); void BackUp(int count); - bool Skip(int count); + bool Skip(off_t count); int64 ByteCount() const; private: Index: src/google/protobuf/io/zero_copy_stream.h =================================================================== --- src/google/protobuf/io/zero_copy_stream.h (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/zero_copy_stream.h (.../trunk/protobuf-icb) (revision 28092) @@ -166,7 +166,7 @@ // reached or some input error occurred. In the end-of-stream case, the // stream is advanced to the end of the stream (so ByteCount() will return // the total size of the stream). - virtual bool Skip(int count) = 0; + virtual bool Skip(off_t count) = 0; // Returns the total number of bytes read since this object was created. virtual int64 ByteCount() const = 0; Index: src/google/protobuf/io/gzip_stream.h =================================================================== --- src/google/protobuf/io/gzip_stream.h (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/gzip_stream.h (.../trunk/protobuf-icb) (revision 28092) @@ -84,7 +84,7 @@ // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size); void BackUp(int count); - bool Skip(int count); + bool Skip(off_t count); int64 ByteCount() const; private: Index: src/google/protobuf/io/coded_stream_unittest.cc =================================================================== --- src/google/protobuf/io/coded_stream_unittest.cc (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/coded_stream_unittest.cc (.../trunk/protobuf-icb) (revision 28092) @@ -223,7 +223,7 @@ virtual void BackUp(int count) { GOOGLE_LOG(FATAL) << "Tests never call this."; } - virtual bool Skip(int count) { + virtual bool Skip(off_t count) { GOOGLE_LOG(FATAL) << "Tests never call this."; return false; } @@ -1092,7 +1092,7 @@ backup_amount_ = count; } - bool Skip(int count) { GOOGLE_LOG(FATAL) << "Not implemented."; return false; } + bool Skip(off_t count) { GOOGLE_LOG(FATAL) << "Not implemented."; return false; } int64 ByteCount() const { GOOGLE_LOG(FATAL) << "Not implemented."; return 0; } int backup_amount_; Index: src/google/protobuf/io/coded_stream.cc =================================================================== --- src/google/protobuf/io/coded_stream.cc (.../3rdparty/protobuf) (revision 28092) +++ src/google/protobuf/io/coded_stream.cc (.../trunk/protobuf-icb) (revision 28092) @@ -160,7 +160,7 @@ "in google/protobuf/io/coded_stream.h."; } -bool CodedInputStream::Skip(int count) { +bool CodedInputStream::Skip(off_t count) { if (count < 0) return false; // security: count is often user-supplied const int original_buffer_size = BufferSize(); @@ -552,7 +552,7 @@ } } -bool CodedOutputStream::Skip(int count) { +bool CodedOutputStream::Skip(off_t count) { if (count < 0) return false; while (count > buffer_size_) {