diff options
| author | Pirama Arumuga Nainar <pirama@google.com> | 2018-06-25 11:48:58 -0700 |
|---|---|---|
| committer | Pirama Arumuga Nainar <pirama@google.com> | 2018-06-25 11:52:54 -0700 |
| commit | a2df1ef4413144fe7d09a22f4750df05e83c13fb (patch) | |
| tree | 703bdbfdcb8acbe75e5dfb13f492030fa72eb322 /adb | |
| parent | 8e52362e45c7d14d30c158e3c5f05e53e499bea4 (diff) | |
| download | system_core-a2df1ef4413144fe7d09a22f4750df05e83c13fb.tar.gz system_core-a2df1ef4413144fe7d09a22f4750df05e83c13fb.tar.bz2 system_core-a2df1ef4413144fe7d09a22f4750df05e83c13fb.zip | |
Do not customize __format__ for Windows/MinGW to gnu_printf
Bug: http://b/69933090
Bug: http://b/69933068
MinGW uses gnu_printf to force C99 printf analysis with GCC, but clang
does not support gnu_printf. So just use the default that's used for
other platforms. This also mirrors upstream commit
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/015e637b4b24d9915162ab877ed539ad0e657951/.
Test: m native-host-cross with Clang.
Change-Id: I3deb266d70e25296c4ae1d58637afbabc3d949c1
Diffstat (limited to 'adb')
| -rw-r--r-- | adb/sysdeps.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/adb/sysdeps.h b/adb/sysdeps.h index 3be99f635..fe0ecd6ea 100644 --- a/adb/sysdeps.h +++ b/adb/sysdeps.h @@ -41,16 +41,8 @@ // Some printf-like functions are implemented in terms of // android::base::StringAppendV, so they should use the same attribute for -// compile-time format string checking. On Windows, if the mingw version of -// vsnprintf is used in StringAppendV, use `gnu_printf' which allows z in %zd -// and PRIu64 (and related) to be recognized by the compile-time checking. +// compile-time format string checking. #define ADB_FORMAT_ARCHETYPE __printf__ -#ifdef __USE_MINGW_ANSI_STDIO -#if __USE_MINGW_ANSI_STDIO -#undef ADB_FORMAT_ARCHETYPE -#define ADB_FORMAT_ARCHETYPE gnu_printf -#endif -#endif #ifdef _WIN32 |
