summaryrefslogtreecommitdiffstats
path: root/adb/Android.mk
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-08-03 21:16:26 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-08-03 21:16:26 +0000
commit6b940e1349da720bdba4c5eeb9741e5fffe30913 (patch)
treec6ef8c0adc0eddda4db153c0f51ff8a83c03f342 /adb/Android.mk
parent6355f2c1400b531fb71a46351a0c26e666af2e88 (diff)
parente347c1dd475ab83b2ec483f43879b105be145ea2 (diff)
downloadsystem_core-6b940e1349da720bdba4c5eeb9741e5fffe30913.tar.gz
system_core-6b940e1349da720bdba4c5eeb9741e5fffe30913.tar.bz2
system_core-6b940e1349da720bdba4c5eeb9741e5fffe30913.zip
Merge "adb: win32: define UNICODE/_UNICODE, Unicode error messages, misc"
Diffstat (limited to 'adb/Android.mk')
-rw-r--r--adb/Android.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/adb/Android.mk b/adb/Android.mk
index 46905b335..e2d0bb1b1 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -22,6 +22,15 @@ ADB_COMMON_CFLAGS := \
-Wno-missing-field-initializers \
-DADB_REVISION='"$(adb_version)"' \
+# Define windows.h and tchar.h Unicode preprocessor symbols so that
+# CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the
+# build if you accidentally pass char*. Fix by calling like:
+# CreateFileW(widen(utf8).c_str()).
+ADB_COMMON_windows_CFLAGS := \
+ -DUNICODE=1 -D_UNICODE=1 \
+
+ADB_COMMON_CFLAGS += $(ADB_COMMON_$(HOST_OS)_CFLAGS)
+
# libadb
# =========================================================