stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arvind Jayaprakash (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-66) implement large file support in iostreams
Date Sun, 02 Dec 2007 14:45:43 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547631
] 

Arvind Jayaprakash commented on STDCXX-66:
------------------------------------------

On 32bit gcc, the compiler option would be -D_FILE_OFFSET_BITS=64
On a 64bit gcc, off_t is 64 bits by default

For 32 bit visual age, it is -D_LARGE_FILE
See section 3.2.7 http://www.redbooks.ibm.com/redbooks/pdfs/sg245674.pdf 

> implement large file support in iostreams
> -----------------------------------------
>
>                 Key: STDCXX-66
>                 URL: https://issues.apache.org/jira/browse/STDCXX-66
>             Project: C++ Standard Library
>          Issue Type: New Feature
>          Components: 27. Input/Output
>    Affects Versions: 4.1.2
>         Environment: AIX 5.2
> VisualAge C++ Professional / C for AIX Compiler, Version 6
>            Reporter: Jeremy Dean
>            Priority: Minor
>
> #include <string>
> #include <fstream>
> int main(int argc, char**argv)
> {
>     std::ifstream i;
>     try
>     {
>         i.open("/tmp/largeFile.txt",std::ios::in);
>         if ( i.good() )
>         {
>             char s[1024];
>             i >> s ; // .getline(s, 100);
>             std::cout << s << std::endl;
>         }
>         else
>         {
>             std::cout << "Open error\n";
>         }
>     }
>     catch(...)
>     {
>         std::cout << "error\n";
>     }
>     return 0;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message