@@ -31,7 +31,7 @@ static void* libicui18n = NULL;
31
31
bool FindICULibs (const char * versionPrefix , char * symbolName , char * symbolVersion )
32
32
{
33
33
#ifndef OSX_ICU_LIBRARY_PATH
34
- static_assert (false, "The ICU Library path is not defined" );
34
+ c_static_assert_msg (false, "The ICU Library path is not defined" );
35
35
#endif // OSX_ICU_LIBRARY_PATH
36
36
37
37
// Usually OSX_ICU_LIBRARY_PATH is "/usr/lib/libicucore.dylib"
@@ -119,10 +119,10 @@ bool OpenICULibraries(int majorVer, int minorVer, int subVer, const char* versio
119
119
char libicuucName [64 ];
120
120
char libicui18nName [64 ];
121
121
122
- static_assert (sizeof ("libicuuc.so" ) + MaxICUVersionStringLength <= sizeof (libicuucName ), "The libicuucName is too small" );
122
+ c_static_assert_msg (sizeof ("libicuuc.so" ) + MaxICUVersionStringLength <= sizeof (libicuucName ), "The libicuucName is too small" );
123
123
GetVersionedLibFileName ("libicuuc.so" , majorVer , minorVer , subVer , versionPrefix , libicuucName );
124
124
125
- static_assert (sizeof ("libicui18n.so" ) + MaxICUVersionStringLength <= sizeof (libicui18nName ), "The libicui18nName is too small" );
125
+ c_static_assert_msg (sizeof ("libicui18n.so" ) + MaxICUVersionStringLength <= sizeof (libicui18nName ), "The libicui18nName is too small" );
126
126
GetVersionedLibFileName ("libicui18n.so" , majorVer , minorVer , subVer , versionPrefix , libicui18nName );
127
127
128
128
libicuuc = dlopen (libicuucName , RTLD_LAZY );
@@ -263,7 +263,7 @@ int32_t GlobalizationNative_LoadICU()
263
263
264
264
// Get pointers to all the ICU functions that are needed
265
265
#define PER_FUNCTION_BLOCK (fn , lib ) \
266
- static_assert ((sizeof(#fn) + MaxICUVersionStringLength + 1) <= sizeof(symbolName), "The symbolName is too small for symbol " #fn); \
266
+ c_static_assert_msg ((sizeof(#fn) + MaxICUVersionStringLength + 1) <= sizeof(symbolName), "The symbolName is too small for symbol " #fn); \
267
267
sprintf(symbolName, #fn "%s", symbolVersion); \
268
268
fn##_ptr = (__typeof(fn)*)dlsym(lib, symbolName); \
269
269
if (fn##_ptr == NULL) { fprintf(stderr, "Cannot get symbol %s from " #lib "\nError: %s\n", symbolName, dlerror()); abort(); }
0 commit comments