Bug 2750 - ios::ate broken
ios::ate broken
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: libstdc++ (Show other bugs)
6.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-05-11 20:02 EDT by Red Hat Bugzilla
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-14 23:15:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Red Hat Bugzilla 1999-05-11 20:02:46 EDT
The openmode element ios::ate of the Standard C++ I/O
library does not work. When a file has been opened, the file
position pointer is still at the beginning. This breaks any
C++ program that use ios::ate upon opening a file to seek to
the end of the file immediately, without doing an explicit
seekg(0,ios::end). In RHL 5.2 it works fine.
Comment 1 Red Hat Bugzilla 1999-05-16 15:14:59 EDT
#include <iostream.h>
#include <fstream.h>

int main(int, char*[])
{
    ifstream
inFile("PUT_YOUR_FILENAME_HERE",ios::in|ios::binary|ios::nocreate|ios::ate);
    cout << "filesize is " << inFile.tellg()
        << ", but should be ";
    inFile.seekg(0,ios::end);
    cout << inFile.tellg() << endl;
    exit(0);
}
Comment 2 Red Hat Bugzilla 2000-05-22 10:53:59 EDT
assign to jakub

Note You need to log in before you can comment on or make changes to this bug.