Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2013-04-10 22:47:46 +0400
committerJeff Johnston <jjohnstn@redhat.com>2013-04-10 22:47:46 +0400
commit602cec7f1eb17b96525d09752fd1f0ad474e3202 (patch)
tree32e10a62bf758fcbb8951c4361a974a7066461c3 /newlib/libc/stdio64
parentb49dae4a4443858b2ce51daac3883ad0f1473145 (diff)
2013-04-10 Bin Cheng <bin.cheng@arm.com>
* acconfig.h (_FSEEK_OPTIMIZATION): Undef * newlib.hin (_FSEEK_OPTIMIZATION): Undef * configure.in (--disable-newlib-fseek-optimization): New option. * configure: Regenerated. * libc/stdio/fflush.c (__sflush_r): Use _FSEEK_OPTIMIZATION to control fseek optimization. * libc/stdio/fseeko.c (_fseeko_r): Ditto. * libc/stdio/makebuf.c (__smakebuf_r): Ditto. * libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
Diffstat (limited to 'newlib/libc/stdio64')
-rw-r--r--newlib/libc/stdio64/fseeko64.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c
index b323f97d8..d605dd09b 100644
--- a/newlib/libc/stdio64/fseeko64.c
+++ b/newlib/libc/stdio64/fseeko64.c
@@ -209,6 +209,8 @@ _DEFUN (_fseeko64_r, (ptr, fp, offset, whence),
if (fp->_bf._base == NULL)
__smakebuf_r (ptr, fp);
+
+#if _FSEEK_OPTIMIZATION
if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT))
goto dumb;
if ((fp->_flags & __SOPT) == 0)
@@ -330,6 +332,7 @@ _DEFUN (_fseeko64_r, (ptr, fp, offset, whence),
* We get here if we cannot optimise the seek ... just
* do it. Allow the seek function to change fp->_bf._base.
*/
+#endif
dumb:
if (_fflush_r (ptr, fp)