summaryrefslogtreecommitdiff
path: root/src/Buffer.cc
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-12-20 20:23:03 -0800
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-12-20 20:23:03 -0800
commit77e9a8bb42285c118a8a0d51fa166d838cc9f473 (patch)
treeda289c71f009ce12c9e58ce943680a36f3d9cd11 /src/Buffer.cc
parent16594884da1c20c60fa1211c76939696547c02b5 (diff)
Switching off_t to off64_t.
Diffstat (limited to 'src/Buffer.cc')
-rw-r--r--src/Buffer.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Buffer.cc b/src/Buffer.cc
index 25639b7..42dbd52 100644
--- a/src/Buffer.cc
+++ b/src/Buffer.cc
@@ -19,10 +19,10 @@ void Balau::Buffer::close() throw (GeneralException) {
}
ssize_t Balau::Buffer::read(void * buf, size_t count) throw (GeneralException) {
- off_t cursor = rtell();
+ off64_t cursor = rtell();
if (cursor >= m_bufSize)
return 0;
- off_t avail = m_bufSize - cursor;
+ off64_t avail = m_bufSize - cursor;
if (count > avail)
count = avail;
@@ -38,10 +38,10 @@ ssize_t Balau::Buffer::write(const void * buf, size_t count) throw (GeneralExcep
if (m_fromConst)
throw GeneralException("Buffer is read only and can't be written to.");
- off_t cursor = wtell();
- off_t end = cursor + count;
- off_t endBlock = (end / s_blockSize) + ((end % s_blockSize) ? 1 : 0);
- off_t oldEndBlock = m_numBlocks;
+ off64_t cursor = wtell();
+ off64_t end = cursor + count;
+ off64_t endBlock = (end / s_blockSize) + ((end % s_blockSize) ? 1 : 0);
+ off64_t oldEndBlock = m_numBlocks;
if (endBlock > oldEndBlock) {
m_buffer = (uint8_t *) realloc(m_buffer, endBlock * s_blockSize);
@@ -71,6 +71,6 @@ void Balau::Buffer::reset() {
bool Balau::Buffer::isClosed() { return false; }
bool Balau::Buffer::isEOF() { return rtell() == m_bufSize; }
const char * Balau::Buffer::getName() { return "Buffer"; }
-off_t Balau::Buffer::getSize() { return m_bufSize; }
+off64_t Balau::Buffer::getSize() { return m_bufSize; }
bool Balau::Buffer::canRead() { return true; }
bool Balau::Buffer::canWrite() { return !m_fromConst; }