From 6f88821e5dc4894dc2905cbe53ae21c782354f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Fri, 24 Apr 2015 16:21:38 +0200 Subject: [PATCH] Define char16_t and char32_t to make gcc 5.1 happy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc 5.1 doesn't define char16_t and char32_t (unless in C++ mode), causing compile failures. Change-Id: I08dcd13cdf8cd59a4a2f191864bedf4c0d1bb313 Signed-off-by: Bernhard Rosenkränzer --- libc/include/uchar.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/include/uchar.h b/libc/include/uchar.h index e1fcb5c65..0ec9d2eb5 100644 --- a/libc/include/uchar.h +++ b/libc/include/uchar.h @@ -34,6 +34,11 @@ __BEGIN_DECLS +#if defined(__GNUC__) && __GNUC__ >= 5 && !defined(__cplusplus) +typedef __CHAR16_TYPE__ char16_t; +typedef __CHAR32_TYPE__ char32_t; +#endif + #define __STD_UTF_16__ 1 #define __STD_UTF_32__ 1