[vdr] Re: [ANNOUNCE] VDR developer version 1.3.47
gerald.raaf at t-online.de
Sun Apr 23 11:35:44 CEST 2006
Am Sonntag, 23. April 2006 11:21 schrieb Werner Schweer:
> On Sunday 23 April 2006 10:43, Klaus Schmidinger wrote:
> > Anssi Hannula wrote:
> > > Klaus Schmidinger wrote:
> > >>Reinhard Nissl wrote:
> > >>>I've got a report of a similar warning in vdr-xine. I suggest this
> > >>>solution:
> > >>>
> > >>>esyslog("ERROR: can't allocate %ld bytes for index '%s'", (long)(size
> > >>>* sizeof(tIndex)), fileName);
> > >>
> > >>To be honest, I don't like this.
> > >>Shouldn't this work on both 32- and 64bit systems without the need of
> > >>typecasting?
> > >
> > > The return type of sizeof() is size_t. The size of size_t is
> > > implementation-defined. With GCC that's unsigned int on ix86 and
> > > unsigned long on x86_64.
> > Does this mean that one would have to use different conversion
> > specifiers on 32- and 64bit systems? Sounds like a compiler bug
> > to me, because the source code should compile corretcly on both
> > systems...
> "man fprintf" says there is a special "z" length modifier for size_t
> arguments, so "...%zd..." should do the trick
"...%zd..." can be used, no compile error on a 64bit only system and 32bit
> vdr mailing list
> vdr at linuxtv.org
More information about the vdr