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

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Apr 23 21:59:36 PDT 2013


On Apr 15, 2013, at 7:44 AM, Rafael Espindola <rafael.espindola at gmail.com> wrote:

> +
> +#if defined(__linux__)
> +#include <endian.h>
> +#else
> +#ifndef _MSC_VER
> +#include <machine/endian.h>
> +#endif
> +#endif
> +

Hi Rafael,

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.

I could provide a BYTE_ORDER define in Solaris.h, but you would need to guard those includes somehow.

What do you think?

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130423/25dedd41/attachment.html>


More information about the llvm-commits mailing list