[MPlayer-dev-eng] Why is _FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE forced?

Hans-Christian Egtvedt hans-christian.egtvedt at atmel.com
Thu Feb 19 14:58:04 CET 2009


On Thu, 19 Feb 2009 14:27:03 +0100
Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:

> On Thu, Feb 19, 2009 at 02:15:42PM +0100, Attila Kinali wrote:
> > On Thu, 19 Feb 2009 13:56:23 +0100
> > Hans-Christian Egtvedt <hans-christian.egtvedt at atmel.com> wrote:
> > 
> > > In common.mak the CFLAGS are set to include _FILE_OFFSET_BITS=64
> > > and _LARGEFILE_SOURCE. This will break builds on machines where
> > > largefile support is not enabled.
> > > 
> > > Is there any reason MPlayer must be compiled with largefile
> > > support?
> > 
> > This is a user question and probably related to some strange
> > settings you pass to configure or brokenness of your system.
> > 
> > Please ask in mplayer-users, where user questions belong to
> 
> This is almost certainly related to AVR32 support, so I think in this
> case it was justified to ask here.

Actually it is related to uClibc. If you define _FILE_OFFSET_BITS=64
and did not compile uClibc with largefile support, it will halt with an
#error output. It is a check in uClibc header include/features.h.

AFAICT the -dev list is for discussing source code changes, while
-users is for users of the source code?

> It is a user question in so far that "configure --help" has the
> answer: --disable-largefiles   disable support for files > 2GB
> [enable] thus largefile support must be explicitly disabled if you do
> not want it.

That is already done, i.e. providing --disable-largefiles if largefile
is not available in the toolchain. But the CFLAGS is still set with
_FILE_OFFSET_BITS and _LARGEFILE_SOURCE in MPlayer source common.mak.

> The reason is that systems without it can not even play DVDs properly,
> so hardly anyone will want it disabled.

I'll make a note of disabling DVD support if largefile is not present,
although, I guess systems running uClibc without largefile support
seldom wants to play DVDs.

> Also it will not usually break builds, systems without largefile
> support usually just ignore _FILE_OFFSET_BITS and _LARGEFILE_SOURCE.

For uClibc users this is not the case.

Could the define be removed from the initial CFLAGS in common.mak, and
added if the --disable-largefiles switch is not set?

-- 
Best regards,
Hans-Christian Egtvedt



More information about the MPlayer-dev-eng mailing list