Ticket #35949: patch-lseek64.diff

File patch-lseek64.diff, 1.6 KB (added by ryandesign (Ryan Carsten Schmidt), 12 years ago)
  • source/base/image/image.cpp

    old new  
    28842884                        meta[0] = sizeof(pixel_type);
    28852885                        meta[1] = m_Width;
    28862886                        meta[2] = m_Height;
    2887                         if (lseek64(m_File, pos, SEEK_SET) != pos)
     2887                        if (lseek(m_File, pos, SEEK_SET) != pos)
    28882888                                throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write/seek failed at creation.");
    28892889                        if (write(m_File, &meta[0], (int) sizeof(size_type)*3) != (sizeof(size_type)*3))
    28902890                                throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write failed at creation.");
     
    30553055#endif
    30563056                                pos = block * sizeof(pixel_type) * m_Blocksize;
    30573057                                int chunk = sizeof(pixel_type) * m_Blocksize;
    3058                                 if (lseek64(m_File, pos, SEEK_SET) != pos)
     3058                                if (lseek(m_File, pos, SEEK_SET) != pos)
    30593059                                        throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file read/seek failed.");
    30603060                                int bytes = read(m_File, &m_Buffer[0], chunk);
    30613061                                if (bytes != (sizeof(pixel_type) * m_Blocksize))
     
    30783078
    30793079                        if (m_Dirty) {
    30803080                                pos = m_CurrentBlock * sizeof(pixel_type) * m_Blocksize;
    3081                                 if (lseek64(m_File, pos, SEEK_SET) != pos)
     3081                                if (lseek(m_File, pos, SEEK_SET) != pos)
    30823082                                        throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write/seek failed.");
    30833083                                if (write(m_File, &m_Buffer[0], (int) sizeof(pixel_type) * m_Blocksize) != (sizeof(pixel_type) * m_Blocksize))
    30843084                                        throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write failed.");