mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 03:32:21 +00:00
Define BYTE_ORDER on Solaris.
Solaris doesn't have an endian.h header, but SPARC is the only big-endian architecture that runs Solaris, so just use that to detect endianness at compile time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182419 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a4ea4a7203
commit
01ef4f6982
@ -19,7 +19,7 @@
|
|||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#else
|
#else
|
||||||
#ifndef LLVM_ON_WIN32
|
#if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
|
||||||
#include <machine/endian.h>
|
#include <machine/endian.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,6 +17,15 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/regset.h>
|
#include <sys/regset.h>
|
||||||
|
|
||||||
|
/* Solaris doesn't have endian.h. SPARC is the only supported big-endian ISA. */
|
||||||
|
#define BIG_ENDIAN 4321
|
||||||
|
#define LITTLE_ENDIAN 1234
|
||||||
|
#if defined(__sparc) || defined(__sparc__)
|
||||||
|
#define BYTE_ORDER BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#define BYTE_ORDER LITTLE_ENDIAN
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef CS
|
#undef CS
|
||||||
#undef DS
|
#undef DS
|
||||||
#undef ES
|
#undef ES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user