Guard include of uchar.h in stdatomic.h

Bionic stdatomic.h is also used for the host (via a copy in
prebuilts/clang).  Revert to guarding the include of uchar.h based on
__STDC_VERSION__, so it is included only when needed.

Change-Id: I5b45c7f5d16da223478512104702a3e4e5a975ae
Test: bionic tests on host and Angler.  Confirmed failures I am 
      seeing are KIs.
This commit is contained in:
Pirama Arumuga Nainar 2016-08-04 09:40:18 -07:00
parent f0b53115ae
commit ed3c78771f
1 changed files with 7 additions and 1 deletions

View File

@ -143,7 +143,13 @@ using std::atomic_uintmax_t;
#include <stddef.h> /* For ptrdiff_t. */
#include <stdint.h> /* TODO: don't drag in all the macros, just the types. */
#include <uchar.h> /* For char16_t and char32_t. */
// Include uchar.h only when needed. Bionic's stdatomic.h is also used for the
// host (via a copy in prebuilts/clang) and uchar.h is not available in the
// glibc used for the host.
#if __STDC_VERSION__ >= 201112L
# include <uchar.h> /* For char16_t and char32_t. */
#endif
#ifdef __clang__
# if __has_extension(c_atomic) || __has_extension(cxx_atomic)