Jacob Champion <jacob.champion@enterprisedb.com> writes:
> On Tue, Jun 24, 2025 at 2:03 PM Tom Lane <tgl@sss.pgh.pa.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