[MPlayer-dev-eng] [PATCH] mp_msg/printf fixes

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Nov 28 12:08:43 CET 2005


Hi,
On Sun, Nov 27, 2005 at 07:54:36PM -0500, Rich Felker wrote:
> On Mon, Nov 28, 2005 at 02:17:12AM +0200, Jan Knutar wrote:
> > On Monday 28 November 2005 01:28, Dominik 'Rathann' Mierzejewski wrote:
> > > and uses PRI*64 macros for off_t type.
> > 
> > Are you sure? The default on Linux is to compile MPlayer with 32 bit off_t,
> > unless --enable-largefiles is given to configure. See:
> 
> Yes, this is because glibc is broken and defaults to 32bit....
> Anyway the correct solution (used elsewhere in mplayer) is to always
> cast offsets to long long (or maybe int64_t) and then use the PRI*64
> macros.

Better cast to int64_t, since there are no printf string macros for long
long (maybe one day long long will be 128 bit *g*).
But anyway, you definitly _have_ to add some typecast if you use those
PRI*64 macros, because if you get it wrong this way it might even cause
crashed, whereas the other way round at most the values are wrong.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list