diff options
author | 2020-01-17 00:44:53 +0100 | |
---|---|---|
committer | 2020-01-17 03:50:17 +0100 | |
commit | a7228509a3911a2988bf0e5b9415fec49488c86b (patch) | |
tree | 2e433816599deee1ced8a15cddd8ecd8f5a2df80 /dev-libs/icu/files | |
parent | app-office/libreoffice-l10n: Drop 6.2.8.2 (diff) | |
download | gentoo-a7228509a3911a2988bf0e5b9415fec49488c86b.tar.gz gentoo-a7228509a3911a2988bf0e5b9415fec49488c86b.tar.bz2 gentoo-a7228509a3911a2988bf0e5b9415fec49488c86b.zip |
dev-libs/icu: Drop 64.2
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-libs/icu/files')
-rw-r--r-- | dev-libs/icu/files/icu-58.1-remove-bashisms.patch | 224 | ||||
-rw-r--r-- | dev-libs/icu/files/icu-64.2-extern_c.patch | 789 |
2 files changed, 0 insertions, 1013 deletions
diff --git a/dev-libs/icu/files/icu-58.1-remove-bashisms.patch b/dev-libs/icu/files/icu-58.1-remove-bashisms.patch deleted file mode 100644 index ef60ce4569b8..000000000000 --- a/dev-libs/icu/files/icu-58.1-remove-bashisms.patch +++ /dev/null @@ -1,224 +0,0 @@ -diff -ruN a/config/Makefile.inc.in b/config/Makefile.inc.in ---- a/config/Makefile.inc.in 2016-09-09 23:28:18.000000000 +0200 -+++ b/config/Makefile.inc.in 2016-11-05 19:43:07.688466668 +0100 -@@ -124,12 +124,6 @@ - # with usually. Many applications will want to add $(ICULIBS_I18N) as well. - ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA) - --# Proper echo newline handling is needed in icu-config --ECHO_N=@ICU_ECHO_N@ --ECHO_C=@ICU_ECHO_C@ --# Not currently being used but good to have for proper tab handling --ECHO_T=@ICU_ECHO_T@ -- - ################################################################## - ################################################################## - # -diff -ruN a/config/icu-config-bottom b/config/icu-config-bottom ---- a/config/icu-config-bottom 2016-09-09 23:28:18.000000000 +0200 -+++ b/config/icu-config-bottom 2016-11-05 19:49:00.854481361 +0100 -@@ -218,65 +218,65 @@ - ;; - - --cflags) -- echo $ECHO_N "${CFLAGS} ${ECHO_C}" -+ printf "%s" "${CFLAGS} " - ;; - - --cc) -- echo $ECHO_N "${CC} ${ECHO_C}" -+ printf "%s" "${CC} " - ;; - - --cxx) -- echo $ECHO_N "${CXX} ${ECHO_C}" -+ printf "%s" "${CXX} " - ;; - - --cxxflags) -- echo $ECHO_N "${CXXFLAGS} ${ECHO_C}" -+ printf "%s" "${CXXFLAGS} " - ;; - - --cppflags) - # Don't echo the -I. - it's unneeded. -- echo $ECHO_N "${CPPFLAGS} ${ECHO_C}" | sed -e 's/-I. //' -+ printf "%s" "${CPPFLAGS} " | sed -e 's/-I. //' - ;; - - --cppflags-searchpath) -- echo $ECHO_N "-I${prefix}/include ${ECHO_C}" -+ printf "%s" "-I${prefix}/include " - ;; - - --cppflags-dynamic) -- echo $ECHO_N "${SHAREDLIBCPPFLAGS} ${ECHO_C}" -+ printf "%s" "${SHAREDLIBCPPFLAGS} " - ;; - - --cxxflags-dynamic) -- echo $ECHO_N "${SHAREDLIBCXXFLAGS} ${ECHO_C}" -+ printf "%s" "${SHAREDLIBCXXFLAGS} " - ;; - - --cflags-dynamic) -- echo $ECHO_N "${SHAREDLIBCFLAGS} ${ECHO_C}" -+ printf "%s" "${SHAREDLIBCFLAGS} " - ;; - - --ldflags-system) -- echo $ECHO_N "${LIBS} ${ECHO_C}" -+ printf "%s" "${LIBS} " - ;; - - --ldflags) -- echo $ECHO_N "${LDFLAGS} ${ICULIBS} ${ECHO_C}" -+ printf "%s" "${LDFLAGS} ${ICULIBS} " - # $RPATH_LDFLAGS - ;; - - --ldflags-libsonly) -- echo $ECHO_N "${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA} ${ECHO_C}" -+ printf "%s" "${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA} " - ;; - - --ldflags-icuio) -- echo $ECHO_N " ${ICULIBS_ICUIO} ${ECHO_C}" -+ printf "%s" " ${ICULIBS_ICUIO} " - ;; - - --ldflags-obsolete) -- echo $ECHO_N "${ICULIBS_OBSOLETE} ${ECHO_C}" -+ printf "%s" "${ICULIBS_OBSOLETE} " - ;; - - --ldflags-toolutil) -- echo $ECHO_N " ${ICULIBS_TOOLUTIL} ${ECHO_C}" -+ printf "%s" " ${ICULIBS_TOOLUTIL} " - ;; - - --ldflags-layout) -@@ -285,7 +285,7 @@ - ;; - - --ldflags-searchpath) -- echo $ECHO_N "-L${libdir} ${ECHO_C}" -+ printf "%s" "-L${libdir} " - ;; - - --detect-prefix) -@@ -321,47 +321,47 @@ - ;; - - --shared-datadir) -- echo $ECHO_N "${datadir} ${ECHO_C}" -+ printf "%s" "${datadir} " - ;; - - --incfile) -- echo $ECHO_N "${pkglibdir}/Makefile.inc ${ECHO_C}" -+ printf "%s" "${pkglibdir}/Makefile.inc " - ;; - - --incpkgdatafile) -- echo $ECHO_N "${pkglibdir}/pkgdata.inc ${ECHO_C}" -+ printf "%s" "${pkglibdir}/pkgdata.inc " - ;; - - --icudata) -- echo $ECHO_N "${ICUDATA_NAME} ${ECHO_C}" -+ printf "%s" "${ICUDATA_NAME} " - ;; - - --icudata-mode) -- echo $ECHO_N "${PKGDATA_MODE} ${ECHO_C}" -+ printf "%s" "${PKGDATA_MODE} " - ;; - - --icudata-install-dir) -- echo $ECHO_N "${ICUPKGDATA_DIR} ${ECHO_C}" -+ printf "%s" "${ICUPKGDATA_DIR} " - ;; - - --icudatadir) -- echo $ECHO_N "${ICUDATA_DIR} ${ECHO_C}" -+ printf "%s" "${ICUDATA_DIR} " - ;; - - --shlib-c) -- echo $ECHO_N "${SHLIB_c} ${ECHO_C}" -+ printf "%s" "${SHLIB_c} " - ;; - - --shlib-cc) -- echo $ECHO_N "${SHLIB_cc} ${ECHO_C}" -+ printf "%s" "${SHLIB_cc} " - ;; - - --version) -- echo $ECHO_N $VERSION -+ printf "%s" "$VERSION" - ;; - - --unicode-version) -- echo $ECHO_N $UNICODE_VERSION -+ printf "%s" "$UNICODE_VERSION" - ;; - - --host) -diff -ruN a/configure.ac b/configure.ac ---- a/configure.ac 2016-10-04 21:30:20.000000000 +0200 -+++ b/configure.ac 2016-11-05 19:43:07.688466668 +0100 -@@ -22,24 +22,6 @@ - PACKAGE="icu" - AC_SUBST(PACKAGE) - --# Use custom echo test for newline option --# Current autoconf (2.65) gives incorrect echo newline option --# for icu-config --# This may be removed later - mow (June 17, 2010) --ICU_ECHO_C= ICU_ECHO_N= ICU_ECHO_T= --case `/bin/sh -c "echo -n x"` in ---n*) -- case `/bin/sh -c "echo 'x\c'"` in -- *c*) ICU_ECHO_T=' ';; # ECHO_T is single tab character. -- *) ICU_ECHO_C='\c';; -- esac;; --*) -- ICU_ECHO_N='-n';; --esac --AC_SUBST(ICU_ECHO_N) --AC_SUBST(ICU_ECHO_C) --AC_SUBST(ICU_ECHO_T) -- - AC_MSG_CHECKING(for ICU version numbers) - - # Get the ICU version from uversion.h or other headers -diff -ruN a/icudefs.mk.in b/icudefs.mk.in ---- a/icudefs.mk.in 2016-09-09 23:28:18.000000000 +0200 -+++ b/icudefs.mk.in 2016-11-05 19:43:07.688466668 +0100 -@@ -157,11 +157,6 @@ - ENABLE_STATIC = @ENABLE_STATIC@ - ENABLE_SHARED = @ENABLE_SHARED@ - --# Echo w/o newline -- --#ECHO_N = @ICU_ECHO_N@ --#ECHO_C = @ICU_ECHO_C@ -- - # Commands to compile - COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c - COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c -diff -ruN a/test/hdrtst/Makefile.in b/test/hdrtst/Makefile.in ---- a/test/hdrtst/Makefile.in 2016-09-28 06:17:24.000000000 +0200 -+++ b/test/hdrtst/Makefile.in 2016-11-05 19:43:07.688466668 +0100 -@@ -35,9 +35,6 @@ - include $(shell icu-config --incfile) - DIRS=$(prefix)/include/unicode - LDIRS=$(prefix)/include/layout --ECHO_T=@ECHO_T@ --ECHO_C=@ECHO_C@ --ECHO_N=@ECHO_N@ - - all: - @echo Please read this Makefile for more information. diff --git a/dev-libs/icu/files/icu-64.2-extern_c.patch b/dev-libs/icu/files/icu-64.2-extern_c.patch deleted file mode 100644 index 9a757e12037b..000000000000 --- a/dev-libs/icu/files/icu-64.2-extern_c.patch +++ /dev/null @@ -1,789 +0,0 @@ -From 26bdef634585eb24946dba035611266e9431873b Mon Sep 17 00:00:00 2001 -From: Alon Bar-Lev <alon.barlev@gmail.com> -Date: Sat, 30 Mar 2019 09:59:46 +0300 -Subject: [PATCH] ICU-20530 Fix header issues based on test/hdrtst - -Remove explicit extern "C++" scope. - -Remove C++ macros in C mode. - -Fix issues detected by make -C test/hdrtst. - -Run test/hdrtest during CI to detect future breakage. - -Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> -Closes: https://github.com/unicode-org/icu/pull/613 -Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> -diff --git a/icu4c/source/common/unicode/ucptrie.h b/icu4c/source/common/unicode/ucptrie.h -index 2718c984e4..ce7340b890 100644 ---- a/icu4c/source/common/unicode/ucptrie.h -+++ b/icu4c/source/common/unicode/ucptrie.h -@@ -216,25 +216,6 @@ ucptrie_openFromBinary(UCPTrieType type, UCPTrieValueWidth valueWidth, - U_CAPI void U_EXPORT2 - ucptrie_close(UCPTrie *trie); - --#if U_SHOW_CPLUSPLUS_API -- --U_NAMESPACE_BEGIN -- --/** -- * \class LocalUCPTriePointer -- * "Smart pointer" class, closes a UCPTrie via ucptrie_close(). -- * For most methods see the LocalPointerBase base class. -- * -- * @see LocalPointerBase -- * @see LocalPointer -- * @draft ICU 63 -- */ --U_DEFINE_LOCAL_OPEN_POINTER(LocalUCPTriePointer, UCPTrie, ucptrie_close); -- --U_NAMESPACE_END -- --#endif -- - /** - * Returns the trie type. - * -@@ -642,5 +623,25 @@ ucptrie_internalU8PrevIndex(const UCPTrie *trie, UChar32 c, - U_CDECL_END - - #endif // U_IN_DOXYGEN -+ -+#if U_SHOW_CPLUSPLUS_API -+ -+U_NAMESPACE_BEGIN -+ -+/** -+ * \class LocalUCPTriePointer -+ * "Smart pointer" class, closes a UCPTrie via ucptrie_close(). -+ * For most methods see the LocalPointerBase base class. -+ * -+ * @see LocalPointerBase -+ * @see LocalPointer -+ * @draft ICU 63 -+ */ -+U_DEFINE_LOCAL_OPEN_POINTER(LocalUCPTriePointer, UCPTrie, ucptrie_close); -+ -+U_NAMESPACE_END -+ -+#endif // U_SHOW_CPLUSPLUS_API -+ - #endif // U_HIDE_DRAFT_API - #endif -diff --git a/icu4c/source/common/unicode/udata.h b/icu4c/source/common/unicode/udata.h -index a0286e1e42..325ffcf17d 100644 ---- a/icu4c/source/common/unicode/udata.h -+++ b/icu4c/source/common/unicode/udata.h -@@ -264,25 +264,6 @@ udata_openChoice(const char *path, const char *type, const char *name, - U_STABLE void U_EXPORT2 - udata_close(UDataMemory *pData); - --#if U_SHOW_CPLUSPLUS_API -- --U_NAMESPACE_BEGIN -- --/** -- * \class LocalUDataMemoryPointer -- * "Smart pointer" class, closes a UDataMemory via udata_close(). -- * For most methods see the LocalPointerBase base class. -- * -- * @see LocalPointerBase -- * @see LocalPointer -- * @stable ICU 4.4 -- */ --U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close); -- --U_NAMESPACE_END -- --#endif -- - /** - * Get the pointer to the actual data inside the data memory. - * The data is read-only. -@@ -434,4 +415,23 @@ udata_setFileAccess(UDataFileAccess access, UErrorCode *status); - - U_CDECL_END - -+#if U_SHOW_CPLUSPLUS_API -+ -+U_NAMESPACE_BEGIN -+ -+/** -+ * \class LocalUDataMemoryPointer -+ * "Smart pointer" class, closes a UDataMemory via udata_close(). -+ * For most methods see the LocalPointerBase base class. -+ * -+ * @see LocalPointerBase -+ * @see LocalPointer -+ * @stable ICU 4.4 -+ */ -+U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close); -+ -+U_NAMESPACE_END -+ -+#endif // U_SHOW_CPLUSPLUS_API -+ - #endif -diff --git a/icu4c/source/common/unicode/uversion.h b/icu4c/source/common/unicode/uversion.h -index 4aaa8b4d60..5700f62cbf 100644 ---- a/icu4c/source/common/unicode/uversion.h -+++ b/icu4c/source/common/unicode/uversion.h -@@ -62,26 +62,22 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; - /* C++ namespace if supported. Versioned unless versioning is disabled. */ - /*===========================================================================*/ - -+/* Define C++ namespace symbols. */ -+#ifdef __cplusplus -+ - /** - * \def U_NAMESPACE_BEGIN -- * This is used to begin a declaration of a public ICU C++ API. -- * When not compiling for C++, it does nothing. -- * When compiling for C++, it begins an extern "C++" linkage block (to protect -- * against cases in which an external client includes ICU header files inside -- * an extern "C" linkage block). -+ * This is used to begin a declaration of a public ICU C++ API within -+ * versioned-ICU-namespace block. - * -- * It also begins a versioned-ICU-namespace block. - * @stable ICU 2.4 - */ - - /** - * \def U_NAMESPACE_END - * This is used to end a declaration of a public ICU C++ API. -- * When not compiling for C++, it does nothing. -- * When compiling for C++, it ends the extern "C++" block begun by -- * U_NAMESPACE_BEGIN. -+ * It ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGIN. - * -- * It also ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGIN. - * @stable ICU 2.4 - */ - -@@ -89,9 +85,6 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; - * \def U_NAMESPACE_USE - * This is used to specify that the rest of the code uses the - * public ICU C++ API namespace. -- * This is invoked by default; we recommend that you turn it off: -- * See the "Recommended Build Options" section of the ICU4C readme -- * (http://source.icu-project.org/repos/icu/icu/trunk/readme.html#RecBuild) - * @stable ICU 2.4 - */ - -@@ -105,8 +98,6 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; - * @stable ICU 2.4 - */ - --/* Define C++ namespace symbols. */ --#ifdef __cplusplus - # if U_DISABLE_RENAMING - # define U_ICU_NAMESPACE icu - namespace U_ICU_NAMESPACE { } -@@ -116,8 +107,8 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; - namespace icu = U_ICU_NAMESPACE; - # endif - --# define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE { --# define U_NAMESPACE_END } } -+# define U_NAMESPACE_BEGIN namespace U_ICU_NAMESPACE { -+# define U_NAMESPACE_END } - # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE; - # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE:: - -@@ -133,12 +124,7 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; - # if U_USING_ICU_NAMESPACE - U_NAMESPACE_USE - # endif --#else --# define U_NAMESPACE_BEGIN --# define U_NAMESPACE_END --# define U_NAMESPACE_USE --# define U_NAMESPACE_QUALIFIER --#endif -+#endif /* __cplusplus */ - - /*===========================================================================*/ - /* General version helper functions. Definitions in putil.c */ -diff --git a/icu4c/source/i18n/unicode/reldatefmt.h b/icu4c/source/i18n/unicode/reldatefmt.h -index 16ae91ad03..1e164a581a 100644 ---- a/icu4c/source/i18n/unicode/reldatefmt.h -+++ b/icu4c/source/i18n/unicode/reldatefmt.h -@@ -246,6 +246,7 @@ class SharedPluralRules; - class SharedBreakIterator; - class NumberFormat; - class UnicodeString; -+class FormattedRelativeDateTime; - class FormattedRelativeDateTimeData; - - #ifndef U_HIDE_DRAFT_API -diff --git a/icu4c/source/i18n/unicode/uspoof.h b/icu4c/source/i18n/unicode/uspoof.h -index d15ba4b242..ceb8484b6b 100644 ---- a/icu4c/source/i18n/unicode/uspoof.h -+++ b/icu4c/source/i18n/unicode/uspoof.h -@@ -353,6 +353,8 @@ - * @stable ICU 4.6 - */ - -+U_CDECL_BEGIN -+ - struct USpoofChecker; - /** - * @stable ICU 4.2 -@@ -674,25 +676,6 @@ uspoof_openFromSource(const char *confusables, int32_t confusablesLen, - U_STABLE void U_EXPORT2 - uspoof_close(USpoofChecker *sc); - --#if U_SHOW_CPLUSPLUS_API -- --U_NAMESPACE_BEGIN -- --/** -- * \class LocalUSpoofCheckerPointer -- * "Smart pointer" class, closes a USpoofChecker via uspoof_close(). -- * For most methods see the LocalPointerBase base class. -- * -- * @see LocalPointerBase -- * @see LocalPointer -- * @stable ICU 4.4 -- */ --U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckerPointer, USpoofChecker, uspoof_close); -- --U_NAMESPACE_END -- --#endif -- - /** - * Clone a Spoof Checker. The clone will be set to perform the same checks - * as the original source. -@@ -901,54 +884,6 @@ U_STABLE const USet * U_EXPORT2 - uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status); - - --#if U_SHOW_CPLUSPLUS_API --/** -- * Limit the acceptable characters to those specified by a Unicode Set. -- * Any previously specified character limit is -- * is replaced by the new settings. This includes limits on -- * characters that were set with the uspoof_setAllowedLocales() function. -- * -- * The USPOOF_CHAR_LIMIT test is automatically enabled for this -- * USoofChecker by this function. -- * -- * @param sc The USpoofChecker -- * @param chars A Unicode Set containing the list of -- * characters that are permitted. Ownership of the set -- * remains with the caller. The incoming set is cloned by -- * this function, so there are no restrictions on modifying -- * or deleting the UnicodeSet after calling this function. -- * @param status The error code, set if this function encounters a problem. -- * @stable ICU 4.2 -- */ --U_STABLE void U_EXPORT2 --uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status); -- -- --/** -- * Get a UnicodeSet for the characters permitted in an identifier. -- * This corresponds to the limits imposed by the Set Allowed Characters / -- * UnicodeSet functions. Limitations imposed by other checks will not be -- * reflected in the set returned by this function. -- * -- * The returned set will be frozen, meaning that it cannot be modified -- * by the caller. -- * -- * Ownership of the returned set remains with the Spoof Detector. The -- * returned set will become invalid if the spoof detector is closed, -- * or if a new set of allowed characters is specified. -- * -- * -- * @param sc The USpoofChecker -- * @param status The error code, set if this function encounters a problem. -- * @return A UnicodeSet containing the characters that are permitted by -- * the USPOOF_CHAR_LIMIT test. -- * @stable ICU 4.2 -- */ --U_STABLE const icu::UnicodeSet * U_EXPORT2 --uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status); --#endif -- -- - /** - * Check the specified string for possible security issues. - * The text to be checked will typically be an identifier of some sort. -@@ -1027,43 +962,6 @@ uspoof_checkUTF8(const USpoofChecker *sc, - UErrorCode *status); - - --#if U_SHOW_CPLUSPLUS_API --/** -- * Check the specified string for possible security issues. -- * The text to be checked will typically be an identifier of some sort. -- * The set of checks to be performed is specified with uspoof_setChecks(). -- * -- * \note -- * Consider using the newer API, {@link uspoof_check2UnicodeString}, instead. -- * The newer API exposes additional information from the check procedure -- * and is otherwise identical to this method. -- * -- * @param sc The USpoofChecker -- * @param id A identifier to be checked for possible security issues. -- * @param position Deprecated in ICU 51. Always returns zero. -- * Originally, an out parameter for the index of the first -- * string position that failed a check. -- * This parameter may be NULL. -- * @param status The error code, set if an error occurred while attempting to -- * perform the check. -- * Spoofing or security issues detected with the input string are -- * not reported here, but through the function's return value. -- * @return An integer value with bits set for any potential security -- * or spoofing issues detected. The bits are defined by -- * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) -- * will be zero if the input string passes all of the -- * enabled checks. -- * @see uspoof_check2UnicodeString -- * @stable ICU 4.2 -- */ --U_STABLE int32_t U_EXPORT2 --uspoof_checkUnicodeString(const USpoofChecker *sc, -- const icu::UnicodeString &id, -- int32_t *position, -- UErrorCode *status); --#endif -- -- - /** - * Check the specified string for possible security issues. - * The text to be checked will typically be an identifier of some sort. -@@ -1135,39 +1033,6 @@ uspoof_check2UTF8(const USpoofChecker *sc, - USpoofCheckResult* checkResult, - UErrorCode *status); - --#if U_SHOW_CPLUSPLUS_API --/** -- * Check the specified string for possible security issues. -- * The text to be checked will typically be an identifier of some sort. -- * The set of checks to be performed is specified with uspoof_setChecks(). -- * -- * @param sc The USpoofChecker -- * @param id A identifier to be checked for possible security issues. -- * @param checkResult An instance of USpoofCheckResult to be filled with -- * details about the identifier. Can be NULL. -- * @param status The error code, set if an error occurred while attempting to -- * perform the check. -- * Spoofing or security issues detected with the input string are -- * not reported here, but through the function's return value. -- * @return An integer value with bits set for any potential security -- * or spoofing issues detected. The bits are defined by -- * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) -- * will be zero if the input string passes all of the -- * enabled checks. Any information in this bitmask will be -- * consistent with the information saved in the optional -- * checkResult parameter. -- * @see uspoof_openCheckResult -- * @see uspoof_check2 -- * @see uspoof_check2UTF8 -- * @stable ICU 58 -- */ --U_STABLE int32_t U_EXPORT2 --uspoof_check2UnicodeString(const USpoofChecker *sc, -- const icu::UnicodeString &id, -- USpoofCheckResult* checkResult, -- UErrorCode *status); --#endif -- - /** - * Create a USpoofCheckResult, used by the {@link uspoof_check2} class of functions to return - * information about the identifier. Information includes: -@@ -1199,32 +1064,6 @@ uspoof_openCheckResult(UErrorCode *status); - U_STABLE void U_EXPORT2 - uspoof_closeCheckResult(USpoofCheckResult *checkResult); - --#if U_SHOW_CPLUSPLUS_API -- --U_NAMESPACE_BEGIN -- --/** -- * \class LocalUSpoofCheckResultPointer -- * "Smart pointer" class, closes a USpoofCheckResult via `uspoof_closeCheckResult()`. -- * For most methods see the LocalPointerBase base class. -- * -- * @see LocalPointerBase -- * @see LocalPointer -- * @stable ICU 58 -- */ -- --/** -- * \cond -- * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER. -- * For now, suppress with a Doxygen cond -- */ --U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closeCheckResult); --/** \endcond */ -- --U_NAMESPACE_END -- --#endif -- - /** - * Indicates which of the spoof check(s) have failed. The value is a bitwise OR of the constants for the tests - * in question: USPOOF_RESTRICTION_LEVEL, USPOOF_CHAR_LIMIT, and so on. -@@ -1355,36 +1194,6 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc, - - - --#if U_SHOW_CPLUSPLUS_API --/** -- * A version of {@link uspoof_areConfusable} accepting UnicodeStrings. -- * -- * @param sc The USpoofChecker -- * @param s1 The first of the two identifiers to be compared for -- * confusability. The strings are in UTF-8 format. -- * @param s2 The second of the two identifiers to be compared for -- * confusability. The strings are in UTF-8 format. -- * @param status The error code, set if an error occurred while attempting to -- * perform the check. -- * Confusability of the identifiers is not reported here, -- * but through this function's return value. -- * @return An integer value with bit(s) set corresponding to -- * the type of confusability found, as defined by -- * enum USpoofChecks. Zero is returned if the identifiers -- * are not confusable. -- * -- * @stable ICU 4.2 -- * -- * @see uspoof_areConfusable -- */ --U_STABLE int32_t U_EXPORT2 --uspoof_areConfusableUnicodeString(const USpoofChecker *sc, -- const icu::UnicodeString &s1, -- const icu::UnicodeString &s2, -- UErrorCode *status); --#endif -- -- - /** - * Get the "skeleton" for an identifier. - * Skeletons are a transformation of the input identifier; -@@ -1463,38 +1272,6 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, - char *dest, int32_t destCapacity, - UErrorCode *status); - --#if U_SHOW_CPLUSPLUS_API --/** -- * Get the "skeleton" for an identifier. -- * Skeletons are a transformation of the input identifier; -- * Two identifiers are confusable if their skeletons are identical. -- * See Unicode UAX #39 for additional information. -- * -- * Using skeletons directly makes it possible to quickly check -- * whether an identifier is confusable with any of some large -- * set of existing identifiers, by creating an efficiently -- * searchable collection of the skeletons. -- * -- * @param sc The USpoofChecker. -- * @param type Deprecated in ICU 58. You may pass any number. -- * Originally, controlled which of the Unicode confusable data -- * tables to use. -- * @param id The input identifier whose skeleton will be computed. -- * @param dest The output identifier, to receive the skeleton string. -- * @param status The error code, set if an error occurred while attempting to -- * perform the check. -- * @return A reference to the destination (skeleton) string. -- * -- * @stable ICU 4.2 -- */ --U_I18N_API icu::UnicodeString & U_EXPORT2 --uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, -- uint32_t type, -- const icu::UnicodeString &id, -- icu::UnicodeString &dest, -- UErrorCode *status); --#endif /* U_SHOW_CPLUSPLUS_API */ -- - /** - * Get the set of Candidate Characters for Inclusion in Identifiers, as defined - * in http://unicode.org/Public/security/latest/xidmodifications.txt -@@ -1525,8 +1302,243 @@ uspoof_getInclusionSet(UErrorCode *status); - U_STABLE const USet * U_EXPORT2 - uspoof_getRecommendedSet(UErrorCode *status); - -+/** -+ * Serialize the data for a spoof detector into a chunk of memory. -+ * The flattened spoof detection tables can later be used to efficiently -+ * instantiate a new Spoof Detector. -+ * -+ * The serialized spoof checker includes only the data compiled from the -+ * Unicode data tables by uspoof_openFromSource(); it does not include -+ * include any other state or configuration that may have been set. -+ * -+ * @param sc the Spoof Detector whose data is to be serialized. -+ * @param data a pointer to 32-bit-aligned memory to be filled with the data, -+ * can be NULL if capacity==0 -+ * @param capacity the number of bytes available at data, -+ * or 0 for preflighting -+ * @param status an in/out ICU UErrorCode; possible errors include: -+ * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization -+ * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad -+ * @return the number of bytes written or needed for the spoof data -+ * -+ * @see utrie2_openFromSerialized() -+ * @stable ICU 4.2 -+ */ -+U_STABLE int32_t U_EXPORT2 -+uspoof_serialize(USpoofChecker *sc, -+ void *data, int32_t capacity, -+ UErrorCode *status); -+ -+U_CDECL_END -+ - #if U_SHOW_CPLUSPLUS_API - -+U_NAMESPACE_BEGIN -+ -+/** -+ * \class LocalUSpoofCheckerPointer -+ * "Smart pointer" class, closes a USpoofChecker via uspoof_close(). -+ * For most methods see the LocalPointerBase base class. -+ * -+ * @see LocalPointerBase -+ * @see LocalPointer -+ * @stable ICU 4.4 -+ */ -+/** -+ * \cond -+ * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER. -+ * For now, suppress with a Doxygen cond -+ */ -+U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckerPointer, USpoofChecker, uspoof_close); -+/** \endcond */ -+ -+/** -+ * \class LocalUSpoofCheckResultPointer -+ * "Smart pointer" class, closes a USpoofCheckResult via `uspoof_closeCheckResult()`. -+ * For most methods see the LocalPointerBase base class. -+ * -+ * @see LocalPointerBase -+ * @see LocalPointer -+ * @stable ICU 58 -+ */ -+ -+/** -+ * \cond -+ * Note: Doxygen is giving a bogus warning on this U_DEFINE_LOCAL_OPEN_POINTER. -+ * For now, suppress with a Doxygen cond -+ */ -+U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckResultPointer, USpoofCheckResult, uspoof_closeCheckResult); -+/** \endcond */ -+ -+U_NAMESPACE_END -+ -+/** -+ * Limit the acceptable characters to those specified by a Unicode Set. -+ * Any previously specified character limit is -+ * is replaced by the new settings. This includes limits on -+ * characters that were set with the uspoof_setAllowedLocales() function. -+ * -+ * The USPOOF_CHAR_LIMIT test is automatically enabled for this -+ * USoofChecker by this function. -+ * -+ * @param sc The USpoofChecker -+ * @param chars A Unicode Set containing the list of -+ * characters that are permitted. Ownership of the set -+ * remains with the caller. The incoming set is cloned by -+ * this function, so there are no restrictions on modifying -+ * or deleting the UnicodeSet after calling this function. -+ * @param status The error code, set if this function encounters a problem. -+ * @stable ICU 4.2 -+ */ -+U_STABLE void U_EXPORT2 -+uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status); -+ -+ -+/** -+ * Get a UnicodeSet for the characters permitted in an identifier. -+ * This corresponds to the limits imposed by the Set Allowed Characters / -+ * UnicodeSet functions. Limitations imposed by other checks will not be -+ * reflected in the set returned by this function. -+ * -+ * The returned set will be frozen, meaning that it cannot be modified -+ * by the caller. -+ * -+ * Ownership of the returned set remains with the Spoof Detector. The -+ * returned set will become invalid if the spoof detector is closed, -+ * or if a new set of allowed characters is specified. -+ * -+ * -+ * @param sc The USpoofChecker -+ * @param status The error code, set if this function encounters a problem. -+ * @return A UnicodeSet containing the characters that are permitted by -+ * the USPOOF_CHAR_LIMIT test. -+ * @stable ICU 4.2 -+ */ -+U_STABLE const icu::UnicodeSet * U_EXPORT2 -+uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status); -+ -+/** -+ * Check the specified string for possible security issues. -+ * The text to be checked will typically be an identifier of some sort. -+ * The set of checks to be performed is specified with uspoof_setChecks(). -+ * -+ * \note -+ * Consider using the newer API, {@link uspoof_check2UnicodeString}, instead. -+ * The newer API exposes additional information from the check procedure -+ * and is otherwise identical to this method. -+ * -+ * @param sc The USpoofChecker -+ * @param id A identifier to be checked for possible security issues. -+ * @param position Deprecated in ICU 51. Always returns zero. -+ * Originally, an out parameter for the index of the first -+ * string position that failed a check. -+ * This parameter may be NULL. -+ * @param status The error code, set if an error occurred while attempting to -+ * perform the check. -+ * Spoofing or security issues detected with the input string are -+ * not reported here, but through the function's return value. -+ * @return An integer value with bits set for any potential security -+ * or spoofing issues detected. The bits are defined by -+ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) -+ * will be zero if the input string passes all of the -+ * enabled checks. -+ * @see uspoof_check2UnicodeString -+ * @stable ICU 4.2 -+ */ -+U_STABLE int32_t U_EXPORT2 -+uspoof_checkUnicodeString(const USpoofChecker *sc, -+ const icu::UnicodeString &id, -+ int32_t *position, -+ UErrorCode *status); -+ -+/** -+ * Check the specified string for possible security issues. -+ * The text to be checked will typically be an identifier of some sort. -+ * The set of checks to be performed is specified with uspoof_setChecks(). -+ * -+ * @param sc The USpoofChecker -+ * @param id A identifier to be checked for possible security issues. -+ * @param checkResult An instance of USpoofCheckResult to be filled with -+ * details about the identifier. Can be NULL. -+ * @param status The error code, set if an error occurred while attempting to -+ * perform the check. -+ * Spoofing or security issues detected with the input string are -+ * not reported here, but through the function's return value. -+ * @return An integer value with bits set for any potential security -+ * or spoofing issues detected. The bits are defined by -+ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS) -+ * will be zero if the input string passes all of the -+ * enabled checks. Any information in this bitmask will be -+ * consistent with the information saved in the optional -+ * checkResult parameter. -+ * @see uspoof_openCheckResult -+ * @see uspoof_check2 -+ * @see uspoof_check2UTF8 -+ * @stable ICU 58 -+ */ -+U_STABLE int32_t U_EXPORT2 -+uspoof_check2UnicodeString(const USpoofChecker *sc, -+ const icu::UnicodeString &id, -+ USpoofCheckResult* checkResult, -+ UErrorCode *status); -+ -+/** -+ * A version of {@link uspoof_areConfusable} accepting UnicodeStrings. -+ * -+ * @param sc The USpoofChecker -+ * @param s1 The first of the two identifiers to be compared for -+ * confusability. The strings are in UTF-8 format. -+ * @param s2 The second of the two identifiers to be compared for -+ * confusability. The strings are in UTF-8 format. -+ * @param status The error code, set if an error occurred while attempting to -+ * perform the check. -+ * Confusability of the identifiers is not reported here, -+ * but through this function's return value. -+ * @return An integer value with bit(s) set corresponding to -+ * the type of confusability found, as defined by -+ * enum USpoofChecks. Zero is returned if the identifiers -+ * are not confusable. -+ * -+ * @stable ICU 4.2 -+ * -+ * @see uspoof_areConfusable -+ */ -+U_STABLE int32_t U_EXPORT2 -+uspoof_areConfusableUnicodeString(const USpoofChecker *sc, -+ const icu::UnicodeString &s1, -+ const icu::UnicodeString &s2, -+ UErrorCode *status); -+ -+/** -+ * Get the "skeleton" for an identifier. -+ * Skeletons are a transformation of the input identifier; -+ * Two identifiers are confusable if their skeletons are identical. -+ * See Unicode UAX #39 for additional information. -+ * -+ * Using skeletons directly makes it possible to quickly check -+ * whether an identifier is confusable with any of some large -+ * set of existing identifiers, by creating an efficiently -+ * searchable collection of the skeletons. -+ * -+ * @param sc The USpoofChecker. -+ * @param type Deprecated in ICU 58. You may pass any number. -+ * Originally, controlled which of the Unicode confusable data -+ * tables to use. -+ * @param id The input identifier whose skeleton will be computed. -+ * @param dest The output identifier, to receive the skeleton string. -+ * @param status The error code, set if an error occurred while attempting to -+ * perform the check. -+ * @return A reference to the destination (skeleton) string. -+ * -+ * @stable ICU 4.2 -+ */ -+U_I18N_API icu::UnicodeString & U_EXPORT2 -+uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, -+ uint32_t type, -+ const icu::UnicodeString &id, -+ icu::UnicodeString &dest, -+ UErrorCode *status); -+ - /** - * Get the set of Candidate Characters for Inclusion in Identifiers, as defined - * in http://unicode.org/Public/security/latest/xidmodifications.txt -@@ -1559,34 +1571,6 @@ uspoof_getRecommendedUnicodeSet(UErrorCode *status); - - #endif /* U_SHOW_CPLUSPLUS_API */ - --/** -- * Serialize the data for a spoof detector into a chunk of memory. -- * The flattened spoof detection tables can later be used to efficiently -- * instantiate a new Spoof Detector. -- * -- * The serialized spoof checker includes only the data compiled from the -- * Unicode data tables by uspoof_openFromSource(); it does not include -- * include any other state or configuration that may have been set. -- * -- * @param sc the Spoof Detector whose data is to be serialized. -- * @param data a pointer to 32-bit-aligned memory to be filled with the data, -- * can be NULL if capacity==0 -- * @param capacity the number of bytes available at data, -- * or 0 for preflighting -- * @param status an in/out ICU UErrorCode; possible errors include: -- * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization -- * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad -- * @return the number of bytes written or needed for the spoof data -- * -- * @see utrie2_openFromSerialized() -- * @stable ICU 4.2 -- */ --U_STABLE int32_t U_EXPORT2 --uspoof_serialize(USpoofChecker *sc, -- void *data, int32_t capacity, -- UErrorCode *status); -- -- --#endif -+#endif /* UCONFIG_NO_NORMALIZATION */ - - #endif /* USPOOF_H */ --- -2.21.0 - |