qt5-webkit-icu59.patch 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h
  2. index ead844f..e62cfd4 100644
  3. --- a/Source/WTF/wtf/Compiler.h
  4. +++ b/Source/WTF/wtf/Compiler.h
  5. @@ -61,6 +61,7 @@
  6. #define WTF_COMPILER_SUPPORTS_HAS_TRIVIAL_DESTRUCTOR __has_feature(has_trivial_destructor)
  7. #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums)
  8. #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions)
  9. +#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES !defined(_LIBCPP_HAS_NO_UNICODE_CHARS)
  10. #endif
  11. @@ -142,6 +143,7 @@
  12. #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1
  13. #endif
  14. #if GCC_VERSION_AT_LEAST(4, 5, 0)
  15. +#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES 1
  16. #define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1
  17. #endif
  18. #if GCC_VERSION_AT_LEAST(4, 6, 0)
  19. diff --git a/Source/WTF/wtf/TypeTraits.h b/Source/WTF/wtf/TypeTraits.h
  20. index b9e46bc..876fa45 100644
  21. --- a/Source/WTF/wtf/TypeTraits.h
  22. +++ b/Source/WTF/wtf/TypeTraits.h
  23. @@ -75,6 +75,10 @@ namespace WTF {
  24. #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
  25. template<> struct IsInteger<wchar_t> { static const bool value = true; };
  26. #endif
  27. +#if COMPILER_SUPPORTS(CXX_NEW_CHAR_TYPES)
  28. + template<> struct IsInteger<char16_t> { static const bool value = true; };
  29. + template<> struct IsInteger<char32_t> { static const bool value = true; };
  30. +#endif
  31. template<typename T> struct IsFloatingPoint { static const bool value = false; };
  32. template<> struct IsFloatingPoint<float> { static const bool value = true; };
  33. ---qtwebkit-opensource-src-5.5.1/Source/JavaScriptCore/API/JSStringRef.h.orig 2015-10-13 06:37:10.000000000 +0200
  34. +++ qtwebkit-opensource-src-5.5.1/Source/JavaScriptCore/API/JSStringRef.h 2017-04-24 12:26:42.495345570 +0200
  35. @@ -32,6 +32,7 @@
  36. #include <stdbool.h>
  37. #endif
  38. #include <stddef.h> /* for size_t */
  39. +#include <uchar.h>
  40. #ifdef __cplusplus
  41. extern "C" {
  42. @@ -43,7 +44,7 @@
  43. @typedef JSChar
  44. @abstract A Unicode character.
  45. */
  46. - typedef unsigned short JSChar;
  47. + typedef char16_t JSChar;
  48. #else
  49. typedef wchar_t JSChar;
  50. #endif
  51. --- qtwebkit-opensource-src-5.5.1/Source/WebKit2/Shared/API/c/WKString.h.orig 2015-10-13 06:37:12.000000000 +0200
  52. +++ qtwebkit-opensource-src-5.5.1/Source/WebKit2/Shared/API/c/WKString.h 2017-04-24 12:27:33.432011867 +0200
  53. @@ -31,6 +31,7 @@
  54. #ifndef __cplusplus
  55. #include <stdbool.h>
  56. #endif
  57. +#include <uchar.h>
  58. #ifdef __cplusplus
  59. extern "C" {
  60. @@ -38,7 +39,7 @@
  61. #if !defined(WIN32) && !defined(_WIN32) \
  62. && !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */
  63. - typedef unsigned short WKChar;
  64. + typedef char16_t WKChar;
  65. #else
  66. typedef wchar_t WKChar;
  67. #endif