Hi
On Tue, 01 Jul 2008 17:43:51 -0700, vippstar wrote:
On Jul 2, 3:35 am, Medvedev <3D.v.Wo...@gmail.comwrote:
>how much the usual fopen can open
There is no one answer to that, but see below about 32 bit off_t.
>what's the meaning of the number 64 in the function fopen64?!!!
Presumably it means that this function can open files as large as
2^64 bytes. That particular implementation/standard probably also
offers ftell64() or similar.
I guess it is analogous to fopen but implemented in terms of off64_t
wherever off_t might have been used (if at all). It would be able to
handle files of up to ~2^63 bytes since off_t is signed (to allow one to
seek backwards).
With a google I find that fopen64 is part of the Large File Spec,
something about SuS.
It was (or is) an interim measure to allow *nix programs to handle files
larger than 2GB while still being ABI compatible with libc's where off_t
is 32 bits. Almost all new (desktop & server, at least) architectures
have off_t as 64 bits, so new programs may decide to ignore the
extensions, at a cost of compatibility with large files on older or
unusual systems. In such cases smaller files will still work, but the
process gets delivered a signal if a file grows to big.
RTFM:
man lseek64
HTH
viza