diff options
author | Hans Boehm <hboehm@google.com> | 2014-07-16 11:53:31 -0700 |
---|---|---|
committer | Hans Boehm <hboehm@google.com> | 2014-07-16 16:09:37 -0700 |
commit | dfdbe61d28dbf3e45b6108d739170482ca19a03c (patch) | |
tree | e5f1bc5fafde4b40eeb70c0fa89fbbabe7dc0549 /include/cutils/jstring.h | |
parent | 81a640646d3e71dca706cc80579677e35132e365 (diff) | |
download | system_core-dfdbe61d28dbf3e45b6108d739170482ca19a03c.zip system_core-dfdbe61d28dbf3e45b6108d739170482ca19a03c.tar.gz system_core-dfdbe61d28dbf3e45b6108d739170482ca19a03c.tar.bz2 |
Do not typedef char16_t if it is a keyword.
Don't define char16_t on platforms where char16_t is a keyword, as
C11 and C++11 define it to be.
Change-Id: I6717bc2133c1363ecd85861f3869e1eabd2ce96a
Diffstat (limited to 'include/cutils/jstring.h')
-rw-r--r-- | include/cutils/jstring.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/cutils/jstring.h b/include/cutils/jstring.h index ee0018f..a342608 100644 --- a/include/cutils/jstring.h +++ b/include/cutils/jstring.h @@ -24,7 +24,10 @@ extern "C" { #endif -typedef uint16_t char16_t; +#if __STDC_VERSION__ < 201112L && __cplusplus < 201103L + typedef uint16_t char16_t; +#endif + // otherwise char16_t is a keyword with the right semantics extern char * strndup16to8 (const char16_t* s, size_t n); extern size_t strnlen16to8 (const char16_t* s, size_t n); |