[Mplayer-dev-eng] LARGEFILE vs LARGEFILE

Stephen Davies steve at daviesfam.org
Tue Aug 21 01:07:27 CEST 2001



On Mon, 20 Aug 2001, Arpi wrote:

> Hi,
> 
> Please someone tell me the difference in various largefile definitions
> (including compatibility issues).
> 
> Just importing dvdread code into mplayer, but it uses off64_t many
> places. in their original code _LARGEFILE64_SOURCE was defined.
> 
> in mplayer, with enabled largefile support, i got _LARGEFILE_SOURCE 
> and _FILE_OFFSET_BITS=64 defined, but off64_t is UNDEFINED!
> 
> so, what to do?
> - define off64_t manually?
> - define _LARGEFILE64_SOURCE additionally to _LARGEFILE_SOURCE ?
> - replace _LARGEFILE_SOURCE with _LARGEFILE64_SOURCE ?

Hi,

If you set FILE_OFFSET_BITS=64 then ordinary off_t type becomes 64 bits
automagically, lseek et al prototypes become 64bit offset.

If you define LARGEFILE64_SOURCE but not FILE_OFFSET_BITS then I believe
off_t is still 32bit.

I preferred the former as off_t is a logical type as it is, and it get
your code much cleaner.

Steve



_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list