Fix Uchar type due to ICU upgrade 45/140745/7
authorHyunjee Kim <hj0426.kim@samsung.com>
Wed, 26 Jul 2017 07:51:53 +0000 (16:51 +0900)
committerhyunjee Kim <hj0426.kim@samsung.com>
Tue, 12 Dec 2017 05:17:41 +0000 (05:17 +0000)
Change-Id: Ibc5b8413ed214282469ab0191aeeef2244b17b83
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
src/include/utils_i18n_types.h

index 85e6c84..bbc536f 100644 (file)
@@ -202,10 +202,25 @@ i18n_error_code_e;
  * @brief i18n_uchar.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
+#if U_ICU_VERSION_MAJOR_NUM >= 59
+#if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
+       defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
+// Inside the ICU library code, never configurable.
+typedef char16_t i18n_uchar;
+#elif defined(UCHAR_TYPE)
+typedef UCHAR_TYPE i18n_uchar;
+#elif defined(__cplusplus)
+typedef char16_t i18n_uchar;
+#else
+typedef uint16_t i18n_uchar;
+#endif
+
+#else //!(U_ICU_VERSION_MAJOR_NUM >= 59)
 #if defined(UCHAR_TYPE)
 typedef UCHAR_TYPE i18n_uchar;
 /* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers
-       typedef char16_t i18n_uchar;  */
+   typedef char16_t i18n_uchar;  */
+
 #elif U_SIZEOF_WCHAR_T == 2
 typedef wchar_t i18n_uchar;
 #elif defined(__CHAR16_TYPE__)
@@ -213,7 +228,7 @@ typedef __CHAR16_TYPE__ i18n_uchar;
 #else
 typedef uint16_t i18n_uchar;
 #endif
-
+#endif // END OF (U_ICU_VERSION_MAJOR_NUM >= 59)
 
 /**
  * @brief i18n_uchar32.