~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/freadahead.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Retrieve information about a FILE stream.
2
 
   Copyright (C) 2007-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2007-2012 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
31
31
  return (fp->_IO_read_end - fp->_IO_read_ptr)
32
32
         + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
33
33
            0);
34
 
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
 
34
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
35
35
  if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
36
36
    return 0;
37
37
# if defined __DragonFly__
80
80
  return (fp->__pushed_back
81
81
          ? fp->__get_limit - fp->__pushback_bufp + 1
82
82
          : fp->__get_limit - fp->__bufp);
 
83
#elif defined EPLAN9                /* Plan9 */
 
84
  if (fp->state == 4 /* WR */ || fp->rp >= fp->wp)
 
85
    return 0;
 
86
  return fp->wp - fp->rp;
83
87
#elif defined SLOW_BUT_NO_HACKS     /* users can define this */
84
88
  abort ();
85
89
  return 0;