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 2884 2884 meta[0] = sizeof(pixel_type); 2885 2885 meta[1] = m_Width; 2886 2886 meta[2] = m_Height; 2887 if (lseek 64(m_File, pos, SEEK_SET) != pos)2887 if (lseek(m_File, pos, SEEK_SET) != pos) 2888 2888 throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write/seek failed at creation."); 2889 2889 if (write(m_File, &meta[0], (int) sizeof(size_type)*3) != (sizeof(size_type)*3)) 2890 2890 throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write failed at creation."); … … 3055 3055 #endif 3056 3056 pos = block * sizeof(pixel_type) * m_Blocksize; 3057 3057 int chunk = sizeof(pixel_type) * m_Blocksize; 3058 if (lseek 64(m_File, pos, SEEK_SET) != pos)3058 if (lseek(m_File, pos, SEEK_SET) != pos) 3059 3059 throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file read/seek failed."); 3060 3060 int bytes = read(m_File, &m_Buffer[0], chunk); 3061 3061 if (bytes != (sizeof(pixel_type) * m_Blocksize)) … … 3078 3078 3079 3079 if (m_Dirty) { 3080 3080 pos = m_CurrentBlock * sizeof(pixel_type) * m_Blocksize; 3081 if (lseek 64(m_File, pos, SEEK_SET) != pos)3081 if (lseek(m_File, pos, SEEK_SET) != pos) 3082 3082 throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write/seek failed."); 3083 3083 if (write(m_File, &m_Buffer[0], (int) sizeof(pixel_type) * m_Blocksize) != (sizeof(pixel_type) * m_Blocksize)) 3084 3084 throw POV_EXCEPTION(kFileDataErr, "Intermediate image storage backing file write failed.");