OSDN Git Service

Fix Mac build by restoring old conditional endian handling removed in ae188c676c681e4...
authorBrian Carlstrom <bdc@google.com>
Thu, 5 May 2011 22:26:41 +0000 (15:26 -0700)
committerBrian Carlstrom <bdc@google.com>
Thu, 5 May 2011 22:26:41 +0000 (15:26 -0700)
Change-Id: I64d024cc36a1530ba34579a45688969d18a4a9e5

vm/Common.h

index 8e73cd0..c0da832 100644 (file)
 #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) \