diff options
author | Brian Carlstrom <bdc@google.com> | 2010-09-16 23:48:53 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-09-16 23:48:53 -0700 |
commit | ce802e33d498c5a87f7abc904d2741c8257d80ac (patch) | |
tree | 16d2392b5031ba43caa0b9b6c7445c0a6dfce6f2 /libs | |
parent | 38c55b608000c20a0939ddd62a8125dccd715f67 (diff) | |
parent | 17563f9fb30dc5d2ad85878c436eabf7f1296a3e (diff) | |
download | frameworks_native-ce802e33d498c5a87f7abc904d2741c8257d80ac.zip frameworks_native-ce802e33d498c5a87f7abc904d2741c8257d80ac.tar.gz frameworks_native-ce802e33d498c5a87f7abc904d2741c8257d80ac.tar.bz2 |
Merge "Fix sim-eng build on Hardy" into gingerbread
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ui/GraphicLog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ui/GraphicLog.cpp b/libs/ui/GraphicLog.cpp index b55ce23..7ba2779 100644 --- a/libs/ui/GraphicLog.cpp +++ b/libs/ui/GraphicLog.cpp @@ -30,7 +30,11 @@ ANDROID_SINGLETON_STATIC_INSTANCE(GraphicLog) static inline void writeInt32(uint8_t* base, size_t& pos, int32_t value) { +#ifdef HAVE_LITTLE_ENDIAN + int32_t v = value; +#else int32_t v = htole32(value); +#endif base[pos] = EVENT_TYPE_INT; memcpy(&base[pos+1], &v, sizeof(int32_t)); pos += 1+sizeof(int32_t); @@ -38,7 +42,11 @@ void writeInt32(uint8_t* base, size_t& pos, int32_t value) { static inline void writeInt64(uint8_t* base, size_t& pos, int64_t value) { +#ifdef HAVE_LITTLE_ENDIAN + int64_t v = value; +#else int64_t v = htole64(value); +#endif base[pos] = EVENT_TYPE_LONG; memcpy(&base[pos+1], &v, sizeof(int64_t)); pos += 1+sizeof(int64_t); |