From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson |
Date: | 2025-06-24 21:50:05 |
Message-ID: | 1169453.1750801805@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> writes:
> On Tue, Jun 24, 2025 at 2:03 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I confirm Jacob's result that our meson.build fails to think
>> that <sys/event.h> is available, so we do need to do something.
> (To clarify for other readers: it's the OAuth feature test I added
> that fails. The existing test for HAVE_SYS_EVENT_H is working fine. I
> accidentally made mine stricter.)
Ah, you're correct: I saw "Check usable header "sys/event.h" : NO"
in the meson log, but that came from the check in the
oauth_flow_supported stanza. We do end up with
build/src/include/pg_config.h:#define HAVE_SYS_EVENT_H 1
after a second test that tries to compile
#ifdef __has_include
#if !__has_include("sys/event.h")
#error "Header 'sys/event.h' could not be found"
#endif
#else
#include <sys/event.h>
#endif
Can't say that I find this to be impressive software engineering:
rather than having only one probe failure mode to worry about,
we have two, depending on whether the compiler knows __has_include().
Pretty close to the worst of all possible worlds.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2025-06-24 22:11:39 | Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson |
Previous Message | Nathan Bossart | 2025-06-24 21:34:24 | Re: add function for creating/attaching hash table in DSM registry |