diff options
author | Jonathan Roelofs <jonathan@codesourcery.com> | 2015-02-03 15:34:17 +0000 |
---|---|---|
committer | Jonathan Roelofs <jonathan@codesourcery.com> | 2015-02-03 15:34:17 +0000 |
commit | c6893aecfda585363aacb377bfaa09044bba4096 (patch) | |
tree | 5f708fe19d8d23325bc187f783f8c2a228a06cc1 /include/fstream | |
parent | 57947ca8678cb4915f13abfd7a4eab5df2005b4e (diff) |
Revert: Revert r227804: Use fseek/ftell instead of fseeko/ftello when Newlib is the libc
EricWF has updated the compilers on his buildbots. Hopefully they won't crash now.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/fstream')
-rw-r--r-- | include/fstream | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/fstream b/include/fstream index 38778c677..ace5eb99b 100644 --- a/include/fstream +++ b/include/fstream @@ -807,7 +807,7 @@ basic_filebuf<_CharT, _Traits>::seekoff(off_type __off, ios_base::seekdir __way, default: return pos_type(off_type(-1)); } -#if _WIN32 +#if defined(_WIN32) || defined(_NEWLIB_VERSION) 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 _WIN32 +#if defined(_WIN32) || defined(_NEWLIB_VERSION) if (fseek(__file_, __sp, SEEK_SET)) return pos_type(off_type(-1)); #else @@ -891,7 +891,7 @@ basic_filebuf<_CharT, _Traits>::sync() } } } -#if _WIN32 +#if defined(_WIN32) || defined(_NEWLIB_VERSION) if (fseek(__file_, -__c, SEEK_CUR)) return -1; #else |