Revert r227804: Use fseek/ftell instead of fseeko/ftello when Newlib is the libc

This change is causing a driver crash on libcxx-libcxxabi-x86_64-linux-ubuntu-msan


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227806 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jonathan Roelofs
2015-02-02 15:56:43 +00:00
parent 0c71f582b5
commit 7743dddc8c
2 changed files with 3 additions and 8 deletions

View File

@@ -807,7 +807,7 @@ basic_filebuf<_CharT, _Traits>::seekoff(off_type __off, ios_base::seekdir __way,
default:
return pos_type(off_type(-1));
}
#if defined(_WIN32) || defined(_NEWLIB_VERSION)
#if _WIN32
if (fseek(__file_, __width > 0 ? __width * __off : 0, __whence))
return pos_type(off_type(-1));
pos_type __r = ftell(__file_);
@@ -826,7 +826,7 @@ basic_filebuf<_CharT, _Traits>::seekpos(pos_type __sp, ios_base::openmode)
{
if (__file_ == 0 || sync())
return pos_type(off_type(-1));
#if defined(_WIN32) || defined(_NEWLIB_VERSION)
#if _WIN32
if (fseek(__file_, __sp, SEEK_SET))
return pos_type(off_type(-1));
#else
@@ -891,7 +891,7 @@ basic_filebuf<_CharT, _Traits>::sync()
}
}
}
#if defined(_WIN32) || defined(_NEWLIB_VERSION)
#if _WIN32
if (fseek(__file_, -__c, SEEK_CUR))
return -1;
#else