diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2010-09-22 22:16:54 +0200 |
---|---|---|
committer | Marcus Comstedt <marcus@mc.pp.se> | 2010-10-16 14:35:28 +0200 |
commit | d340d2f57dc0d414ea66b1b556caaf8c98b1e967 (patch) | |
tree | 7ba42431fb34d7776a5b7e4f9a4c99ed618ea135 /adb/transport_local.c | |
parent | f41986bbc79055a4feed7266cac5c1b540296daf (diff) | |
download | system_core-d340d2f57dc0d414ea66b1b556caaf8c98b1e967.zip system_core-d340d2f57dc0d414ea66b1b556caaf8c98b1e967.tar.gz system_core-d340d2f57dc0d414ea66b1b556caaf8c98b1e967.tar.bz2 |
adb: Improved detection of big endian architecture
Instead of testing for the (compiler specific) define
__ppc__ explicitly, use the define HAVE_BIG_ENDIAN provided by
AndroidConfig.h. That way, it should work on all big endian
systems.
Change-Id: Ic4d62afcefce4c8ad5716178ebfcb2b055ac73ce
Diffstat (limited to 'adb/transport_local.c')
-rw-r--r-- | adb/transport_local.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/transport_local.c b/adb/transport_local.c index 8dfc98d..4431ba7 100644 --- a/adb/transport_local.c +++ b/adb/transport_local.c @@ -25,7 +25,7 @@ #define TRACE_TAG TRACE_TRANSPORT #include "adb.h" -#ifdef __ppc__ +#ifdef HAVE_BIG_ENDIAN #define H4(x) (((x) & 0xFF000000) >> 24) | (((x) & 0x00FF0000) >> 8) | (((x) & 0x0000FF00) << 8) | (((x) & 0x000000FF) << 24) static inline void fix_endians(apacket *p) { @@ -61,7 +61,7 @@ static int remote_read(apacket *p, atransport *t) fix_endians(p); -#if 0 && defined __ppc__ +#if 0 && defined HAVE_BIG_ENDIAN D("read remote packet: %04x arg0=%0x arg1=%0x data_length=%0x data_check=%0x magic=%0x\n", p->msg.command, p->msg.arg0, p->msg.arg1, p->msg.data_length, p->msg.data_check, p->msg.magic); #endif @@ -89,7 +89,7 @@ static int remote_write(apacket *p, atransport *t) fix_endians(p); -#if 0 && defined __ppc__ +#if 0 && defined HAVE_BIG_ENDIAN D("write remote packet: %04x arg0=%0x arg1=%0x data_length=%0x data_check=%0x magic=%0x\n", p->msg.command, p->msg.arg0, p->msg.arg1, p->msg.data_length, p->msg.data_check, p->msg.magic); #endif |