Ver código fonte

Merge branch 'candidate-6.4.14'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 anos atrás
pai
commit
54871e4c14

+ 8 - 1
cmake_modules/commonSetup.cmake

@@ -109,7 +109,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
       option(USE_TBB "Enable Threading Building Block support" OFF)
   else()
       option(USE_TBB "Enable Threading Building Block support" ON)
-      option(USE_TBBMALLOC "Enable Threading Building Block scalable allocator proxy support" ON)
+      option(USE_TBBMALLOC "Enable Threading Building Block scalable allocator proxy support" OFF)
       option(USE_TBBMALLOC_ROXIE "Enable Threading Building Block scalable allocator proxy support in Roxie" OFF)
   endif()
   option(LOGGING_SERVICE "Configure use of logging service" ON)
@@ -258,6 +258,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
     set( PORTALURL "http://hpccsystems.com/download" )
   endif()
 
+  option(ICU_REQUIRES_CPP11 "Require C++11 for ICU support" OFF)
 
   if(UNIX AND SIGN_MODULES)
       execute_process(COMMAND bash "-c" "gpg --version | awk 'NR==1{print $3}'"
@@ -735,6 +736,9 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
         find_package(ICU)
         IF (ICU_FOUND)
           add_definitions (-D_USE_ICU)
+          IF (NOT WIN32)
+            add_definitions (-DUCHAR_TYPE=uint16_t)
+          ENDIF()
           include_directories(${ICU_INCLUDE_DIR})
         ELSE()
           message(FATAL_ERROR "ICU requested but package not found")
@@ -901,6 +905,9 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
       if(USE_TBBMALLOC)
           message(STATUS "Enabled use of TBBMALLOC")
           add_definitions (-D_USE_TBBMALLOC)
+          if(USE_TBBMALLOC_ROXIE)
+              message(STATUS "Enabled use of TBBMALLOC_ROXIE")
+          endif(USE_TBBMALLOC_ROXIE)
       endif(USE_TBBMALLOC)
 
   ENDIF()

+ 11 - 0
plugins/unicodelib/unicodelib.cpp

@@ -26,6 +26,9 @@
 #include "unicode/coll.h"
 #include "unicode/stsearch.h"
 #include "unicode/translit.h"
+#if U_ICU_VERSION_MAJOR_NUM >= 44
+#include "unicode/normalizer2.h"
+#endif
 #include "unicode/rbbi.h"
 #include "../stringlib/wildmatch.tpp"
 
@@ -196,7 +199,11 @@ int doUnicodeCompareAtStrength(unsigned src1Len, UChar const * src1, unsigned sr
     UErrorCode error = U_ZERO_ERROR;
     Collator * coll = Collator::createInstance(error);
     coll->setStrength(strength);
+#if U_ICU_VERSION_MAJOR_NUM>=58
+    Collator::EComparisonResult ret = coll->compare((char16_t *)src1, src1Len, (char16_t *)src2, src2Len);
+#else
     Collator::EComparisonResult ret = coll->compare(src1, src1Len, src2, src2Len);
+#endif
     delete coll;
     return ret;
 }
@@ -207,7 +214,11 @@ int doUnicodeLocaleCompareAtStrength(unsigned src1Len, UChar const * src1, unsig
     Locale locale(localename);
     Collator * coll = Collator::createInstance(locale, error);
     coll->setStrength(strength);
+#if U_ICU_VERSION_MAJOR_NUM>=58
+    Collator::EComparisonResult ret = coll->compare((char16_t *)src1, src1Len, (char16_t *)src2, src2Len);
+#else
     Collator::EComparisonResult ret = coll->compare(src1, src1Len, src2, src2Len);
+#endif
     delete coll;
     return ret;
 }

+ 1 - 1
rtl/eclrtl/CMakeLists.txt

@@ -79,7 +79,7 @@ include_directories (
 ADD_DEFINITIONS( -D_USRDLL -DECLRTL_EXPORTS )
 
 if (USE_BOOST_REGEX)
-    if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
+    if ((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) AND NOT ICU_REQUIRES_CPP11)
         set_source_files_properties(eclregex.cpp PROPERTIES COMPILE_FLAGS -std=c++98)
     endif ()