[MPlayer-dev-eng] Solaris patches

Rich Felker dalias at aerifal.cx
Mon Sep 4 15:17:46 CEST 2006


On Mon, Sep 04, 2006 at 03:42:53PM +0300, Uoti Urpala wrote:
> On Mon, 2006-09-04 at 14:08 +0200, Michael Niedermayer wrote:
> > On Sun, Sep 03, 2006 at 02:49:27PM +0100, Robin KAY wrote:
> > > I initially just used ptr[0] | (ptr[1] << 1),
> > 
> > you mean ptr[0] | (ptr[1] << 8) ?
> > 
> > 
> > > but then I saw the 
> > > memcpy(3C) method was used elsewhere in asfheader.c. I imagine this was 
> > > done to make the code portable to systems with non-octet chars.
> > 
> > IIRC sizeof(char) = 1 per c standard
> 
> The standard does guarantee that sizeof(char)==1, but not that there are
> 8 bits per char. However in practice worrying about that is pointless,
> and MPlayer does not try to be portable to systems with non-8bit chars.
> Also the shift version should still be correct on such platforms since
> the input is presumably still a normal file with 8 bits per char.

POSIX requires 8 bit char and every system that could hope to run any
real software has 8 bit char. In fact the only relevant non-POSIX
system I know of is Windows...

Rich




More information about the MPlayer-dev-eng mailing list