On Mon, 2020-11-16 at 12:30 -0500, Tom Lane wrote: > Thomas Munro <thomas.munro@xxxxxxxxx> writes: > > It looks like something happened to ICU's boolean macros . See this > > commit in FreeBSD ports: > > https://github.com/freebsd/freebsd-ports/commit/81a88b4506ec06d07be10d199170ef4003eb0e30 > > It'd be so nice if people would tell us about their problems, instead of > just hacking-and-slashing. > > In this case, I see one use of the constant TRUE in collationcmds.c, > but I wonder how come that's there given that we deprecated upper-case > TRUE some time ago. I find it hard to believe that sprinkling "#include > <stdbool.h>" into random places is either necessary (on modern platforms > anyway) or a good idea (if we're not using <stdbool.h>, this seems pretty > much guaranteed to break things); so I think the rest of that patch is > foolhardy. How about this patch? It fixes the problem for me. Yours, Laurenz Albe
From 393a0a0c75cf74d93c6186ea00ff34f6b96df011 Mon Sep 17 00:00:00 2001 From: Laurenz Albe <laurenz.albe@xxxxxxxxxxx> Date: Mon, 16 Nov 2020 19:01:22 +0100 Subject: [PATCH] Fix build for libicu 68 and later ICU commit c3fe7e09d8 got rid of TRUE and FALSE and uses "true" and "false" from "stdbool.h" instead. Reported by Atul Kumar, diagnosis by Thomas Munro. --- src/include/utils/pg_locale.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h index 96da132c03..cf20dbc049 100644 --- a/src/include/utils/pg_locale.h +++ b/src/include/utils/pg_locale.h @@ -34,6 +34,12 @@ #endif #endif +/* ICU 68 has got rid of TRUE and FALSE and uses stdbool.h instead */ +#if U_ICU_VERSION_MAJOR_NUM >= 68 +#define TRUE true +#define FALSE false +#endif + /* GUC settings */ extern char *locale_messages; -- 2.26.2