Skip to content

Commit dd29262

Browse files
committed
Update ICU C++ API symbols
Recent ICU versions have added U_SHOW_CPLUSPLUS_HEADER_API, and we need to set this to zero as well to hide the ICU C++ APIs from pg_locale.h Per discussion, we want cpluspluscheck to work cleanly in backbranches, so backpatch both this and its predecessor commit ed26c4e to all supported versions. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1115793.1754414782%40sss.pgh.pa.us Backpatch-through: 13
1 parent 1084e76 commit dd29262

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.cirrus.tasks.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,14 +938,11 @@ task:
938938
# - Don't use ccache, the files are uncacheable, polluting ccache's
939939
# cache
940940
# - Use -fmax-errors, as particularly cpluspluscheck can be very verbose
941-
# - XXX have to disable ICU to avoid errors:
942-
# https://postgr.es/m/20220323002024.f2g6tivduzrktgfa%40alap3.anarazel.de
943941
###
944942
always:
945943
headers_headerscheck_script: |
946944
time ./configure \
947945
${LINUX_CONFIGURE_FEATURES} \
948-
--without-icu \
949946
--quiet \
950947
CC="gcc" CXX"=g++" CLANG="clang-16"
951948
make -s -j${BUILD_JOBS} clean

src/include/utils/pg_locale.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
#define _PG_LOCALE_
1414

1515
#ifdef USE_ICU
16+
/* only include the C APIs, to avoid errors in cpluspluscheck */
17+
#undef U_SHOW_CPLUSPLUS_API
18+
#define U_SHOW_CPLUSPLUS_API 0
19+
#undef U_SHOW_CPLUSPLUS_HEADER_API
20+
#define U_SHOW_CPLUSPLUS_HEADER_API 0
1621
#include <unicode/ucol.h>
1722
#endif
1823

0 commit comments

Comments
 (0)