This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/12882] Large file support not complete


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-01 22:26 -------
stdio_sync_filebuf uses fstat still:
      virtual std::streamsize
      showmanyc()
      { 
#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
        // Regular files.
        struct stat __buffer; 
        int __ret = fstat(fileno(_M_file), &__buffer);
        if (!__ret && _GLIBCXX_ISREG(__buffer.st_mode)) 
          return __buffer.st_size - ftell(_M_file);
#endif 
...

And in basic_file_stdio.h, fstat:
  streamsize
  __basic_file<char>::showmanyc()
  {
...
#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
    // Regular files.
    struct stat __buffer;
    int __ret = fstat(this->fd(), &__buffer);
    if (!__ret && _GLIBCXX_ISREG(__buffer.st_mode))
        return __buffer.st_size - lseek(this->fd(), 0, ios_base::cur);
#endif

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-11-03 15:58:25         |2004-01-01 22:26:01
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12882


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]