diff -ru a/source/common/udata.cpp b/source/common/udata.cpp --- a/source/common/udata.cpp 2024-01-01 00:00:00.000000000 +0000 +++ b/source/common/udata.cpp 2024-01-01 00:00:00.000000000 +0000 @@ -18,11 +18,10 @@ #include "unicode/utypes.h" /* U_PLATFORM etc. */ -#ifdef __GNUC__ -/* if gcc -#define ATTRIBUTE_WEAK __attribute__ ((weak)) -might have to #include some other header -*/ +#if defined(__GNUC__) || defined(__SUNPRO_CC) +# define ATTRIBUTE_WEAK __attribute__ ((weak)) +#else +# define ATTRIBUTE_WEAK #endif #include "unicode/putil.h" @@ -649,10 +648,9 @@ * partial-data-library access functions where each returns a pointer * to its data package, if it is linked in. */ -/* -extern const void *uprv_getICUData_collation() ATTRIBUTE_WEAK; -extern const void *uprv_getICUData_conversion() ATTRIBUTE_WEAK; -*/ +U_CDECL_BEGIN +const void *uprv_getICUData_conversion(void) ATTRIBUTE_WEAK; +U_CDECL_END /*----------------------------------------------------------------------* * * @@ -710,10 +708,11 @@ if (uprv_getICUData_collation) { setCommonICUDataPointer(uprv_getICUData_collation(), false, pErrorCode); } + */ if (uprv_getICUData_conversion) { setCommonICUDataPointer(uprv_getICUData_conversion(), false, pErrorCode); } - */ + #if !defined(ICU_DATA_DIR_WINDOWS) // When using the Windows system data, we expect only a single data file. setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, false, pErrorCode); { diff -ru a/source/common/unicode/uconfig.h b/source/common/unicode/uconfig.h --- a/source/common/unicode/uconfig.h 2024-01-01 00:00:00.000000000 +0000 +++ b/source/common/unicode/uconfig.h 2024-01-01 00:00:00.000000000 +0000 @@ -53,6 +53,11 @@ #include "uconfig_local.h" #endif +// Tensorflow is statically linked on all platforms. +#ifndef U_STATIC_IMPLEMENTATION +#define U_STATIC_IMPLEMENTATION +#endif + /** * \def U_DEBUG * Determines whether to include debugging code.