[CM] file-size limit in snd?
Marty Shannon, RHCE
mshannon at domovina.org
Thu May 2 04:29:13 PDT 2002
Bill Schottstaedt wrote:
>
> > Cant write files larger than 2GB in snd.
>
> Right -- I've been putting off dealing with this, but will tackle
> it now that someone wants it. Basically a bunch of "int"s have to
> become "off_t"s;
No, they must become "offset_t"s. "off_t" is typically only 32 bits.
> and it took me awhile to find the magic macros
> _FILE_OFFSET_BITS (to enable the Large File System in Linux),
> and AC_SYS_LARGEFILE (autoconf). I estimate this will be fully
> incoporated within a week or less. If you just want to write
> a big file (not edit it), add this at the top of snd.h and
> recompile Snd:
>
> #define _FILE_OFFSET_BITS 64
>
> That will automatically pull in all the 64-bit file IO functions.
> I wrote a 4GB file after doing this, just to check it.
> A remaining question: what's the right way to handle
> these off_t's in fprintf? (%ld + (long) works but seems
> incorrect in the long run).
They must be %lld and "long long"s.
Cheers,
Marty
--
Marty Shannon, RHCE, Independent Computing Consultant
mailto:mshannon at domovina.org
More information about the Cmdist
mailing list