Closing #3145:
* apply a patch by hamish (as part of GCI) that lets fseek() discard characters pushed onto the stream via ungetc() git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40055 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1028,14 +1028,14 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
|
||||
{
|
||||
/* Offset relative to start of main get area. */
|
||||
_IO_off64_t rel_offset = (offset - fp->_offset
|
||||
+ (fp->_IO_read_end - fp->_IO_read_base));
|
||||
+ (fp->_IO_read_end - fp->_IO_buf_base));
|
||||
if (rel_offset >= 0)
|
||||
{
|
||||
#if 0
|
||||
if (_IO_in_backup (fp))
|
||||
_IO_switch_to_main_get_area (fp);
|
||||
#endif
|
||||
if (rel_offset <= fp->_IO_read_end - fp->_IO_read_base)
|
||||
if (rel_offset <= fp->_IO_read_end - fp->_IO_buf_base)
|
||||
{
|
||||
_IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + rel_offset,
|
||||
fp->_IO_read_end);
|
||||
|
||||
@@ -638,14 +638,14 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
|
||||
{
|
||||
/* Offset relative to start of main get area. */
|
||||
_IO_off64_t rel_offset = (offset - fp->_offset
|
||||
+ (fp->_IO_read_end - fp->_IO_read_base));
|
||||
+ (fp->_IO_read_end - fp->_IO_buf_base));
|
||||
if (rel_offset >= 0)
|
||||
{
|
||||
#if 0
|
||||
if (_IO_in_backup (fp))
|
||||
_IO_switch_to_main_get_area (fp);
|
||||
#endif
|
||||
if (rel_offset <= fp->_IO_read_end - fp->_IO_read_base)
|
||||
if (rel_offset <= fp->_IO_read_end - fp->_IO_buf_base)
|
||||
{
|
||||
enum __codecvt_result status;
|
||||
struct _IO_codecvt *cd = fp->_codecvt;
|
||||
|
||||
Reference in New Issue
Block a user