diff options
author | Tim Murray <timmurray@google.com> | 2014-04-07 14:11:21 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2014-04-07 14:11:21 -0700 |
commit | ae83f84548ef3878625c5df9bf50b7f991852430 (patch) | |
tree | 6ee02fe2d08663d59371042f908de0e1d908f5c3 /include/utils | |
parent | 6b91fefdb22b33d7cdebe10fab4db834f5f8784d (diff) | |
download | system_core-ae83f84548ef3878625c5df9bf50b7f991852430.zip system_core-ae83f84548ef3878625c5df9bf50b7f991852430.tar.gz system_core-ae83f84548ef3878625c5df9bf50b7f991852430.tar.bz2 |
Add guards to prevent typedefs when C++11 is available.
char32_t and char16_t are both defined in C++11.
Change-Id: I44fe8f4f05f230c18a1b77fa21b6a40c8f8ecc2d
Diffstat (limited to 'include/utils')
-rw-r--r-- | include/utils/Unicode.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/utils/Unicode.h b/include/utils/Unicode.h index c8c87c3..5b98de2 100644 --- a/include/utils/Unicode.h +++ b/include/utils/Unicode.h @@ -22,8 +22,11 @@ extern "C" { +// Definitions exist in C++11 +#if defined __cplusplus && __cplusplus < 201103L typedef uint32_t char32_t; typedef uint16_t char16_t; +#endif // Standard string functions on char16_t strings. int strcmp16(const char16_t *, const char16_t *); |