Ticket #3145: fseek-fix.diff
File fseek-fix.diff, 1.7 KB (added by , 14 years ago) |
---|
-
src/system/libroot/posix/glibc/libio/fileops.c
1028 1028 { 1029 1029 /* Offset relative to start of main get area. */ 1030 1030 _IO_off64_t rel_offset = (offset - fp->_offset 1031 + (fp->_IO_read_end - fp->_IO_ read_base));1031 + (fp->_IO_read_end - fp->_IO_buf_base)); 1032 1032 if (rel_offset >= 0) 1033 1033 { 1034 1034 #if 0 1035 1035 if (_IO_in_backup (fp)) 1036 1036 _IO_switch_to_main_get_area (fp); 1037 1037 #endif 1038 if (rel_offset <= fp->_IO_read_end - fp->_IO_ read_base)1038 if (rel_offset <= fp->_IO_read_end - fp->_IO_buf_base) 1039 1039 { 1040 1040 _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + rel_offset, 1041 1041 fp->_IO_read_end); -
src/system/libroot/posix/glibc/libio/wfileops.c
638 638 { 639 639 /* Offset relative to start of main get area. */ 640 640 _IO_off64_t rel_offset = (offset - fp->_offset 641 + (fp->_IO_read_end - fp->_IO_ read_base));641 + (fp->_IO_read_end - fp->_IO_buf_base)); 642 642 if (rel_offset >= 0) 643 643 { 644 644 #if 0 645 645 if (_IO_in_backup (fp)) 646 646 _IO_switch_to_main_get_area (fp); 647 647 #endif 648 if (rel_offset <= fp->_IO_read_end - fp->_IO_ read_base)648 if (rel_offset <= fp->_IO_read_end - fp->_IO_buf_base) 649 649 { 650 650 enum __codecvt_result status; 651 651 struct _IO_codecvt *cd = fp->_codecvt;