[x264-devel] Re: x264 can't read large file

Gianluigi Tiesi mplayer at netfarm.it
Sun Jul 17 08:23:23 CEST 2005


On Fri, Jul 15, 2005 at 12:17:21PM +0300, Tuukka Toivonen wrote:
> On Fri, 15 Jul 2005, [utf-8] Måns Rullgård wrote:
> 
> > The proper way is to use
> >fopen64, fseek64, etc,
> 
> Nah... I don't even have manual pages for those :(
> 
> > or build with _LARGEFILE_SOURCE and _FILEOFFSET_BITS=64.
> 
> I'd recommend this instead, then it should work with
> systems without the 64-bit variants. Some functions
> need to be replaced though:
>   fseek -> fseeko
>   long -> off_t
>   ftell -> ftello
> 
> A wrapper should be made for these functions as they aren't available
> on anything older than glibc2.1 (man fseeko).
> 
> All this leaves me just to wonder why I just didn't
> provide patch instead on explaining all this =)
> 
> -- 

_LARGEFILE_SOURCE=1 and _FILEOFFSET_BITS=64 are enough, just remember
to use size_t and off_t always so system headers can replace it
with the right ones, this is backward compatible, but it's unsupported
on mingw, there is the same problem with compiling mplayer on mingw,
it should be fixed in mingw headers so I bet is better to use this
standard way, it works on almost all unixes and in cygwin.

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list