Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson
Date
Msg-id 59b9c7c7-4263-4fb1-b758-14253133f16b@eisentraut.org
Whole thread Raw
Responses Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson
Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson
List pgsql-hackers
On 24.06.25 01:36, Jacob Champion wrote:
> I noticed that the OpenBSD build in CI wasn't running the libcurl
> tests. Turns out the feature test I added in b0635bfda is subtly
> broken, because it uses cc.check_header() rather than cc.has_header().
> On OpenBSD, apparently, the <sys/event.h> header can't be compiled
> without including additional prerequisite headers.
> 
> The attached patch fixes that by just switching to has_header(). (I
> could add the prerequisites to the test instead, but I'd prefer to
> exactly match the logic we use to determine the value of the
> HAVE_SYS_EVENT_H macro. I don't think I had a good reason not to in
> the first place.)

Note that Autoconf uses a compilation test, not a preprocessor test, for 
its AC_CHECK_HEADERS, so it uses .check_header() semantics.  And this 
was the result of a long transition, because the compile test was 
ultimately deemed to be better.  So in general, I would be wary about 
moving away from .check_header() toward .has_header().  But it looks 
like meson.build mixes those without much of a pattern, so maybe it 
doesn't matter for now.

But I'm also suspicious, because by this explanation, the 
AC_CHECK_HEADERS calls on sys/event.h should fail on OpenBSD, but they 
do not on the existing buildfarm members.




pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: problems with toast.* reloptions
Next
From: Tomas Vondra
Date:
Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view