[llvm] r179527 - Make the host endianness check an integer constant expression.

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Apr 24 08:37:38 PDT 2013


On Apr 24, 2013, at 2:17 AM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:

> On Tue, Apr 23, 2013 at 09:59:36PM -0700, Jakob Stoklund Olesen wrote:
>> Solaris doesn't have any endian.h header file. Including <sys/params.h>
>> does provide _BIG_ENDIAN or _LITTLE_ENDIAN defines, but it also brings
>> in a lot of macros that actually clash with some x86 instruction names.
> 
> What about netinet/*.h? On the BSDs, it provides the endianess with a
> lot less namespace pollution than sys/params.h.

That could work. The <netinet/in.h> header pulls in <sys/byteorder.h> which defines _BIG_ENDIAN.

Thanks,
/jakob



More information about the llvm-commits mailing list