Re: cpluspluscheck vs ICU again

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: cpluspluscheck vs ICU again
Date: 2025-08-06 12:16:00
Message-ID: CANWCAZYw7CC2RxiG1Y4fa_TMuV6Wn4z8tQ9=a0BMEZZzSXKhkQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 6, 2025 at 12:26 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h
> index 931f5b3b880..2b072cafb4d 100644
> --- a/src/include/utils/pg_locale.h
> +++ b/src/include/utils/pg_locale.h
> @@ -18,6 +18,8 @@
> /* only include the C APIs, to avoid errors in cpluspluscheck */
> #undef U_SHOW_CPLUSPLUS_API
> #define U_SHOW_CPLUSPLUS_API 0
> +#undef U_SHOW_CPLUSPLUS_HEADER_API
> +#define U_SHOW_CPLUSPLUS_HEADER_API 0
> #include <unicode/ucol.h>
> #endif
>
> This shouldn't complicate extensions' lives any further than
> before; the rule still is "include ICU headers first
> if you want their C++ symbols".
>
> BTW, I see that you applied ed26c4e25 only to master, but don't
> we want to back-patch? cpluspluscheck is not just an exercise in a
> vacuum, it's to ensure that C++-coded extensions don't have trouble
> with our headers.

I was thinking that it was run only when developing new features, not
for backpatch-able bug fixes, but that's a flawed assumption. I'll
remedy that soon along with the new symbols above, unless you beat me
to it.

--
John Naylor
Amazon Web Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2025-08-06 12:43:58 Re: Logical Replication of sequences
Previous Message 厉超 2025-08-06 12:07:13 Re: Re: Enhance Makefiles to rebuild objects on map file changes