gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Porting gnash to Sun Solaris x86, endianness detection i


From: James McGill
Subject: Re: [Gnash-dev] Porting gnash to Sun Solaris x86, endianness detection issues.
Date: Wed, 18 Apr 2007 01:03:13 -0700
User-agent: Thunderbird 1.5.0.9 (Macintosh/20061207)

Martin Guy wrote:
Can you suggest a way to automatically detect endianness on your box
so that we can make a patch that will also work everywhere else?
const unsigned int IS_LITTLE_ENDIAN_TEST_BIT = 1u;
// If left-most byte of 1 is non-zero, we're little endian
const bool IS_LITTLE_ENDIAN =
*reinterpret_cast<const unsigned char*>(&IS_LITTLE_ENDIAN_TEST_BIT) == 1;



j.mcgill




reply via email to

[Prev in Thread] Current Thread [Next in Thread]