[MPlayer-dev-eng] configure endian autodetection

Bertrand Baudet bertrand_baudet at yahoo.com
Wed Jul 31 09:07:57 CEST 2002


On Tuesday 30 July 2002 04:35 pm, Felix Buenemann wrote:
> On Thursday 18 July 2002 02:42, Bertrand Baudet wrote:
> > Nobody had a chance to look at this?
> > Any comments are welcomed!
>
> it works on my x86 system, I think we should probably push it into cvs and
> we can still revert (or find different detection) if it happens not to work
> eg. on 64bit cpus.
> Btw. in ffmpeg I saw this check, what do you think?
> +
> +# ---
> +# big/little endian test
> +cat > $TMPC << EOF
> +#include <inttypes.h>
> +int main(int argc, char ** argv){
> +       volatile uint32_t i=0x01234567;
> +       return (*((uint8_t*)(&i))) == 0x67;
> +}
> +EOF
> +
> +if $cc -o $TMPO $TMPC 2>/dev/null ; then
> +$TMPO && bigendian="yes"
> +else
> +echo big/little test failed
> +fi

Yes, the C code kinda do the same test...
I'm gonna use their test, so if it fail we can blame ffmpeg :p

I redone my patch since it was broken.
I tested it on x86 and PPC, little endian MIPS and it worked.

I'm waiting for the go ahead to commit it.

Bertrand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure_endian.patch
Type: text/x-diff
Size: 4518 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020731/411e1562/attachment.patch>


More information about the MPlayer-dev-eng mailing list