From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Condor <condor(at)stz-bg(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Unable to compile postgres 13.1 on Slackware current x64 |
Date: | 2020-11-16 18:11:03 |
Message-ID: | 774117.1605550263@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> On Mon, 2020-11-16 at 12:30 -0500, Tom Lane wrote:
>> 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.
What's wrong with s/TRUE/true/ in get_icu_language_tag?
(I have zero interest in undoing 6337865f3, which is what this patch
would amount to.)
A larger issue is that it looks like ICU68 may insist on importing
<stdbool.h> in some headers. That's fine on the platforms where we
use <stdbool.h> anyway, but it's distinctly not fine elsewhere.
We might be able to work around that the same way that dfmgr.h does:
/*
* On macOS, <dlfcn.h> insists on including <stdbool.h>. If we're not
* using stdbool, undef bool to undo the damage.
*/
#ifndef PG_USE_STDBOOL
#ifdef bool
#undef bool
#endif
#endif
This is going to be hard to test without a platform that doesn't use
<stdbool.h> though. [ starts booting up spare PPC Mac ... ]
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-11-16 18:27:04 | Re: Unable to compile postgres 13.1 on Slackware current x64 |
Previous Message | Laurenz Albe | 2020-11-16 18:02:55 | Re: Unable to compile postgres 13.1 on Slackware current x64 |