-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
The recent version (v68) of libicu deprecates its defined boolean constants for TRUE/FALSE: https://github.com/unicode-org/icu/blob/master/docs/userguide/dev/codingguidelines.md#primitive-types
Traditionally, ICU4C has defined its own FALSE=0 / TRUE=1 macros for use with UBool. Starting with ICU 68 (2020q4), we no longer define these in public header files (unless U_DEFINE_FALSE_AND_TRUE=1), in order to avoid name collisions with code outside ICU defining enum constants and similar with these names.
Also see this changeset: unicode-org/icu@c3fe7e0#diff-5e55234a9864fa25c27093e7e3e3542e2ae3a4976dba37ff6ca65e8293656fab
This causes compilation errors in our globalization pal, eg.:
[ 0%] Building CXX object pal/src/CMakeFiles/coreclrpal_dac.dir/exception/remote-unwind.cpp.o
/home/manicka/Repositories/runtime/src/libraries/Native/Unix/System.Globalization.Native/pal_calendarData.c:129:59: error: use of undeclared identifier 'FALSE'
GetLocale(localeName, locale, ULOC_FULLNAME_CAPACITY, FALSE, &err);
^
This will cause issue only on distros with libicu 86 and higher, e.g.: current Manjaro 20.2.1 Nibia.
We should update our globalization pal to make use of standard <stdbool.h> and true/false.