02-14-05 10:54 PM
"Ravi" <raviuday@gmail.com> wrote, on Sun, 13 Feb 2005:
>
> How do you find that (2 GBLimit) ?
If you mean how can a person find out, the best way is to read the
documentation for the relevant file system type (ufs, vxfs, ext2, etc.).
If you mean how can a program find out, the standard way is with
pathconf(path, _PC_FILESIZEBITS) or "getconf FILESIZEBITS", but not
all systems support those, and some that do support them give
bogus results. E.g. on the Linux system I'm typing this on:
$ getconf FILESIZEBITS /proc
32
is correct (the proc filesystem would never have files larger then 2GB),
but:
$ getconf FILESIZEBITS /
64
is wrong because / is an ext3 file system which has a maximum file
size much less than 2^63-1 bytes. At least it does indicate that
files larger than 2GB are supported.
> On my system i find 'off_t' is 32 bit and int is 32 bit
You may find you can compile programs with a 64-bit off_t by
adding -D_FILE_OFFSET_BITS=64 to the compiler options. A lot of
32-bit systems support this method of getting a 64-bit off_t.
--
Geoff Clare <netnews@gclare.org.uk>
[ Post a follow-up to this message ]
|