pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Condor <condor@stz-bg.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Unable to compile postgres 13.1 on Slackware current x64
Date: Mon, 16 Nov 2020 19:02:55 +0100
Message-ID: <6f728bb717a30a78a16a10fe592fefa8921b8566.camel@cybertec.at> (raw)
In-Reply-To: <772035.1605547803@sss.pgh.pa.us>
References: <7a6f3336165bfe3ca66abcda7966f9d0@stz-bg.com>
	<72da0c8a1303691faed52afc641713a65b5eb80f.camel@cybertec.at>
	<CA+hUKG+XnrPeVJaSE2cscA3ouvxeNzwTGU-cHpAKd-Jfzew8uA@mail.gmail.com>
	<772035.1605547803@sss.pgh.pa.us>

On Mon, 2020-11-16 at 12:30 -0500, Tom Lane wrote:
> Thomas Munro <thomas.munro@gmail.com> 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

Attachments:

0001-Fix-build-for-libicu-68-and-later.patch (text/x-patch, 882B) download From 393a0a0c75cf74d93c6186ea00ff34f6b96df011 Mon Sep 17 00:00:00 2001 From: Laurenz Albe <laurenz.albe@cybertec.at> 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

view thread (14+ messages)  latest in thread

Message-ID: <6f728bb717a30a78a16a10fe592fefa8921b8566.camel@cybertec.at>
Permalink:  ../6f728bb717a30a78a16a10fe592fefa8921b8566.camel@cybertec.at/
Also on:    postgresql.org/message-id/6f728bb717a30a78a16a10fe592fefa8921b8566.camel@cybertec.at

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, tgl@sss.pgh.pa.us, thomas.munro@gmail.com, condor@stz-bg.com
  Subject: Re: Unable to compile postgres 13.1 on Slackware current x64
  In-Reply-To: <6f728bb717a30a78a16a10fe592fefa8921b8566.camel@cybertec.at>
  References: <7a6f3336165bfe3ca66abcda7966f9d0@stz-bg.com> <72da0c8a1303691faed52afc641713a65b5eb80f.camel@cybertec.at> <CA+hUKG+XnrPeVJaSE2cscA3ouvxeNzwTGU-cHpAKd-Jfzew8uA@mail.gmail.com> <772035.1605547803@sss.pgh.pa.us> <6f728bb717a30a78a16a10fe592fefa8921b8566.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox