summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Low2018-07-30 21:53:23 -0500
committerSpencer Low2018-07-30 21:53:23 -0500
commit771ba0c057252d53955665ea1150e365e731543e (patch)
tree41f73f0b3969570bce9541d524241489ab8bf13a
parentd0d7d0a6b92221fcfb1ae772f7ae88280d5e3f6e (diff)
downloadplatform-system-core-771ba0c057252d53955665ea1150e365e731543e.tar.gz
platform-system-core-771ba0c057252d53955665ea1150e365e731543e.tar.xz
platform-system-core-771ba0c057252d53955665ea1150e365e731543e.zip
adb: win32: fix Unicode console output
commandline.cpp includes commandline.h which defines StandardStreamsCallbackInterface which calls fwrite(). In the compilation unit for commandline.cpp, fwrite is getting remapped to adb_fwrite (good), but the compilation unit for bugreport.cpp includes sysdeps.h pretty late, which prevents fwrite from getting remapped to adb_fwrite. Apparently when linking, the version of StandardStreamsCallbackInterface that gets used is the one from bugreport.cpp's compilation unit, which doesn't call adb_fwrite(). And it's necessary to call adb_fwrite() to get Unicode console output on Windows. The fix is to #include "sysdeps.h" earlier in bugreport.cpp. I searched the other object files for other unremapped calls to printf/fwrite/etc. and didn't find any. Bug: https://issuetracker.google.com/issues/111972753 Test: mma, manual test on Windows 10 x64 Change-Id: I322dff75a878397f5e10227e746e77b0024129d0 Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
-rw-r--r--adb/client/bugreport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/client/bugreport.cpp b/adb/client/bugreport.cpp
index 346bb4b2c..fe9873725 100644
--- a/adb/client/bugreport.cpp
+++ b/adb/client/bugreport.cpp
@@ -16,6 +16,8 @@
16 16
17#define TRACE_TAG ADB 17#define TRACE_TAG ADB
18 18
19#include "sysdeps.h"
20
19#include "bugreport.h" 21#include "bugreport.h"
20 22
21#include <string> 23#include <string>
@@ -24,8 +26,6 @@
24#include <android-base/file.h> 26#include <android-base/file.h>
25#include <android-base/strings.h> 27#include <android-base/strings.h>
26 28
27#include "sysdeps.h"
28
29#include "adb_utils.h" 29#include "adb_utils.h"
30#include "client/file_sync_client.h" 30#include "client/file_sync_client.h"
31 31