summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-10-20 13:34:01 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-20 13:34:01 -0700
commit89463984f5576d7ab61303e08f81eb9175afed59 (patch)
tree6eef2414397fb9ef18d1f2385f4f0222d80ab895 /adb
parenta8b8c0e21ac4bdb7838c8c1b8e7d60f632eda79b (diff)
parent81347d2764b32ec7224d4e2ab3348103816400b2 (diff)
downloadsystem_core-89463984f5576d7ab61303e08f81eb9175afed59.zip
system_core-89463984f5576d7ab61303e08f81eb9175afed59.tar.gz
system_core-89463984f5576d7ab61303e08f81eb9175afed59.tar.bz2
am 81347d27: Merge "adb: Improved detection of big endian architecture"
Merge commit '81347d2764b32ec7224d4e2ab3348103816400b2' into gingerbread-plus-aosp * commit '81347d2764b32ec7224d4e2ab3348103816400b2': adb: Improved detection of big endian architecture
Diffstat (limited to 'adb')
-rw-r--r--adb/file_sync_service.h2
-rw-r--r--adb/transport_local.c6
-rw-r--r--adb/transport_usb.c3
3 files changed, 5 insertions, 6 deletions
diff --git a/adb/file_sync_service.h b/adb/file_sync_service.h
index 11ea06b..e402e06 100644
--- a/adb/file_sync_service.h
+++ b/adb/file_sync_service.h
@@ -17,7 +17,7 @@
#ifndef _FILE_SYNC_SERVICE_H_
#define _FILE_SYNC_SERVICE_H_
-#ifdef __ppc__
+#ifdef HAVE_BIG_ENDIAN
static inline unsigned __swap_uint32(unsigned x)
{
return (((x) & 0xFF000000) >> 24)
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
diff --git a/adb/transport_usb.c b/adb/transport_usb.c
index 2584163..ee6b637 100644
--- a/adb/transport_usb.c
+++ b/adb/transport_usb.c
@@ -27,8 +27,7 @@
#include "usb_vendors.h"
#endif
-/* XXX better define? */
-#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)
{