Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38ba6e2

Browse files
j-naylorartemgavrilov
authored andcommitted
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 <[email protected]> Discussion: https://postgr.es/m/1115793.1754414782%40sss.pgh.pa.us Backpatch-through: 13
1 parent 79e35bb commit 38ba6e2

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
@@ -777,14 +777,11 @@ task:
777777
# - Don't use ccache, the files are uncacheable, polluting ccache's
778778
# cache
779779
# - Use -fmax-errors, as particularly cpluspluscheck can be very verbose
780-
# - XXX have to disable ICU to avoid errors:
781-
# https://postgr.es/m/20220323002024.f2g6tivduzrktgfa%40alap3.anarazel.de
782780
###
783781
always:
784782
headers_headerscheck_script: |
785783
time ./configure \
786784
${LINUX_CONFIGURE_FEATURES} \
787-
--without-icu \
788785
--quiet \
789786
CC="gcc" CXX"=g++" CLANG="clang"
790787
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
@@ -16,6 +16,11 @@
1616
#include <xlocale.h>
1717
#endif
1818
#ifdef USE_ICU
19+
/* only include the C APIs, to avoid errors in cpluspluscheck */
20+
#undef U_SHOW_CPLUSPLUS_API
21+
#define U_SHOW_CPLUSPLUS_API 0
22+
#undef U_SHOW_CPLUSPLUS_HEADER_API
23+
#define U_SHOW_CPLUSPLUS_HEADER_API 0
1924
#include <unicode/ucol.h>
2025
#endif
2126

0 commit comments

Comments
 (0)