forked from yaml/libyaml
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend range of printable unicode characters
Before the patch IS_PRINTABLE macros was used to determine if given character is printable or not. This macros did not take into account characters encoded with 4 bytes. After the patch IS_PRINTABLE is replaced with new corresponding function. Now the range of printable characters is: (libyaml old range) U (icu range). This new range include characters encoded with 4 bytes. Related to tarantool/tarantool#4090
- Loading branch information
Showing
6 changed files
with
120 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
*.BAK | ||
*.a | ||
*.cmake | ||
*.dll | ||
*.exe | ||
*.la | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# - Find ICU header and library | ||
# The module defines the following variables: | ||
# | ||
# ICU_FOUND - true if ICU was found | ||
# ICU_INCLUDE_DIRS - the directory of the ICU headers | ||
# ICU_LIBRARIES - the ICU libraries needed for linking | ||
# | ||
|
||
if(DEFINED ICU_ROOT) | ||
set(ICU_FIND_OPTS NO_CMAKE NO_CMAKE_SYSTEM_PATH) | ||
set(ICU_FIND_LIBRARY_HINTS "${ICU_ROOT}/lib") | ||
set(ICU_FIND_PATH_HINTS "${ICU_ROOT}/include") | ||
else() | ||
set(ICU_FIND_OPTS) | ||
set(ICU_FIND_LIBRARY_HINTS) | ||
set(ICU_FIND_PATH_HINTS) | ||
endif() | ||
|
||
find_path(ICU_INCLUDE_DIR | ||
unicode/ucol.h | ||
HINTS ${ICU_FIND_PATH_HINTS} | ||
${ICU_FIND_OPTS} | ||
) | ||
|
||
if(BUILD_STATIC) | ||
set(ICU_I18N_LIB_NAME libicui18n.a) | ||
set(ICU_UC_LIB_NAME libicuuc.a) | ||
set(ICU_DATA_LIB_NAME libicudata.a) | ||
else() | ||
set(ICU_I18N_LIB_NAME icui18n) | ||
set(ICU_UC_LIB_NAME icuuc) | ||
set(ICU_DATA_LIB_NAME icudata) | ||
endif() | ||
|
||
find_library(ICU_LIBRARY_I18N NAMES ${ICU_I18N_LIB_NAME} | ||
HINTS ${ICU_FIND_LIBRARY_HINTS} | ||
${ICU_FIND_OPTS} | ||
) | ||
find_library(ICU_LIBRARY_UC NAMES ${ICU_UC_LIB_NAME} | ||
HINTS ${ICU_FIND_LIBRARY_HINTS} | ||
${ICU_FIND_OPTS} | ||
) | ||
|
||
find_library(ICU_LIBRARY_DATA NAMES ${ICU_DATA_LIB_NAME} | ||
HINTS ${ICU_FIND_LIBRARY_HINTS} | ||
${ICU_FIND_OPTS} | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(ICU | ||
REQUIRED_VARS ICU_INCLUDE_DIR ICU_LIBRARY_I18N ICU_LIBRARY_UC) | ||
set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) | ||
set(ICU_LIBRARIES ${ICU_LIBRARY_I18N} ${ICU_LIBRARY_UC} ${ICU_LIBRARY_DATA}) | ||
mark_as_advanced(ICU_INCLUDE_DIR ICU_INCLUDE_DIRS | ||
ICU_LIBRARY_I18N ICU_LIBRARY_UC ICU_LIBRARIES) | ||
|
||
# | ||
# Check presence of ucol_strcollUTF8 function from ICU | ||
# | ||
set(CMAKE_REQUIRED_LIBRARIES ${ICU_LIBRARIES}) | ||
set(CMAKE_REQUIRED_INCLUDES ${ICU_INCLUDE_DIRS}) | ||
set(CMAKE_REQUIRED_FLAGS "-std=c++11") | ||
set(CMAKE_REQUIRED_DEFINITIONS "") | ||
set(CMAKE_REQUIRED_LIBRARIES "") | ||
set(CMAKE_REQUIRED_INCLUDES "") | ||
set(CMAKE_REQUIRED_FLAGS "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters