diff -ru misc/icu/source/common/putil.c misc/build/icu/source/common/putil.c --- misc/icu/source/common/putil.c 2009-07-01 20:50:38.000000000 +0200 +++ misc/build/icu/source/common/putil.c 2024-06-14 21:17:04.184218726 +0200 @@ -52,7 +52,7 @@ Poorly upgraded Solaris machines can't have this defined. Cleanly installed Solaris can use this #define. */ -#if !defined(_XOPEN_SOURCE_EXTENDED) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L) +#if !defined(_XOPEN_SOURCE_EXTENDED) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) #define _XOPEN_SOURCE_EXTENDED 1 #endif diff -ru misc/icu/source/common/uloc.c misc/build/icu/source/common/uloc.c --- misc/icu/source/common/uloc.c 2009-07-01 20:50:38.000000000 +0200 +++ misc/build/icu/source/common/uloc.c 2024-06-14 21:25:59.612644465 +0200 @@ -1736,7 +1736,7 @@ int32_t variantLen = _deleteVariant(variant, uprv_min(variantSize, (nameCapacity-len)), variantToCompare, n); len -= variantLen; if (variantLen > 0) { - if (name[len-1] == '_') { /* delete trailing '_' */ + if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */ --len; } addKeyword = VARIANT_MAP[j].keyword; @@ -1744,7 +1744,7 @@ break; } } - if (name[len-1] == '_') { /* delete trailing '_' */ + if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */ --len; } } diff -ru misc/icu/source/config/mh-bsd-gcc misc/build/icu/source/config/mh-bsd-gcc --- misc/icu/source/config/mh-bsd-gcc 2009-07-01 20:50:48.000000000 +0200 +++ misc/build/icu/source/config/mh-bsd-gcc 2024-06-14 21:16:18.187059931 +0200 @@ -18,8 +18,12 @@ ## Compiler switch to embed a runtime search path LD_RPATH= -LD_RPATH_PRE= -Wl,-rpath, +LD_RPATH_PRE= -Wl,-z,origin -Wl,-rpath, +## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH +## (incl. the C++ runtime libs potentially found in the URE lib dir): +ENABLE_RPATH=YES +RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib' ## Compiler switch to embed a library name LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) diff -ru misc/icu/source/config/mh-darwin misc/build/icu/source/config/mh-darwin --- misc/icu/source/config/mh-darwin 2009-07-01 20:50:48.000000000 +0200 +++ misc/build/icu/source/config/mh-darwin 2024-06-14 21:19:02.155170814 +0200 @@ -25,7 +25,7 @@ SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) ## Compiler switches to embed a library name and version information -LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET)) +LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(FINAL_SO_TARGET)) ## Compiler switch to embed a runtime search path LD_RPATH= @@ -41,10 +41,6 @@ ## Non-shared intermediate object suffix STATIC_O = ao -## Override Versioned target for a shared library. -FINAL_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO) -MIDDLE_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO) - ## Compilation rules %.$(STATIC_O): $(srcdir)/%.c $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< @@ -76,15 +72,9 @@ ## Versioned libraries rules -%.$(SO_TARGET_VERSION_MAJOR).$(SO): %.$(SO_TARGET_VERSION).$(SO) +%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) $(RM) $@ && ln -s ${(UCOL_SPECIAL_FLAG | (HANGUL_SYLLABLE_TAG << 24)) }, //0 HANGUL_SYLLABLE_TAG,/* AC00-D7AF*/ //{0xD800, 0xDC00, UCOL_SPECIAL_FLAG | (LEAD_SURROGATE_TAG << 24) }, //1 LEAD_SURROGATE_TAG, /* D800-DBFF*/ - {0xDC00, 0xE000, UCOL_SPECIAL_FLAG | (TRAIL_SURROGATE_TAG << 24) }, //2 TRAIL_SURROGATE DC00-DFFF + {0xDC00, 0xE000, static_cast(UCOL_SPECIAL_FLAG | (TRAIL_SURROGATE_TAG << 24)) }, //2 TRAIL_SURROGATE DC00-DFFF // Now directly handled in the collation code by the swapCJK function. //{0x3400, 0x4DB6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24) }, //3 CJK_IMPLICIT_TAG, /* 0x3400-0x4DB5*/ //{0x4E00, 0x9FA6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24) }, //4 CJK_IMPLICIT_TAG, /* 0x4E00-0x9FA5*/ --- misc/icu/source/configure 2009-07-01 14:51:26.000000000 -0400 +++ misc/build/icu/source/configure 2024-10-19 16:35:02.000000000 -0400 @@ -7061,8 +7061,10 @@ # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. + echo "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( - *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + *-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=no;; + *-arch*ppc*) ac_cv_c_bigendian=yes;; esac else $as_echo "$as_me: failed program was:" >&5 --- misc/icu/source/i18n/uspoof.cpp 2009-07-01 14:50:10.000000000 -0400 +++ misc/build/icu/source/i18n/uspoof.cpp 2024-10-19 16:36:44.000000000 -0400 @@ -366,7 +366,7 @@ // u_strToUTF8() in preflight mode is an easy way to do it. U_ASSERT(position16 <= len16); u_strToUTF8(NULL, 0, position, text16, position16, status); - if (position > 0) { + if (position) { // position is the required buffer length from u_strToUTF8, which includes // space for a terminating NULL, which we don't want, hence the -1. *position -= 1;