diff options
author | Brian Carlstrom <bdc@google.com> | 2011-05-05 15:26:41 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2011-05-05 15:26:41 -0700 |
commit | 38e191b85851e8ff3126ce680c615a189558e5ff (patch) | |
tree | 7a1c4aeaa923453cb4f2a2bf53fe8945512e9560 | |
parent | bbf31b58c50fb892423b7fef0d8c1093bd0c1a6c (diff) | |
download | android_dalvik-38e191b85851e8ff3126ce680c615a189558e5ff.tar.gz android_dalvik-38e191b85851e8ff3126ce680c615a189558e5ff.tar.bz2 android_dalvik-38e191b85851e8ff3126ce680c615a189558e5ff.zip |
Fix Mac build by restoring old conditional endian handling removed in ae188c676c681e47a93ade7fdf0144099b470e03
Change-Id: I64d024cc36a1530ba34579a45688969d18a4a9e5
-rw-r--r-- | vm/Common.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vm/Common.h b/vm/Common.h index 8e73cd071..c0da8327a 100644 --- a/vm/Common.h +++ b/vm/Common.h @@ -28,9 +28,20 @@ #include <stdint.h> #include <stdio.h> #include <assert.h> -#include <endian.h> #include "utils/Log.h" +#if defined(HAVE_ENDIAN_H) +# include <endian.h> +#else /*not HAVE_ENDIAN_H*/ +# define __BIG_ENDIAN 4321 +# define __LITTLE_ENDIAN 1234 +# if defined(HAVE_LITTLE_ENDIAN) +# define __BYTE_ORDER __LITTLE_ENDIAN +# else +# define __BYTE_ORDER __BIG_ENDIAN +# endif +#endif /*not HAVE_ENDIAN_H*/ + #if !defined(NDEBUG) && defined(WITH_DALVIK_ASSERT) # undef assert # define assert(x) \ |