On Tue, Jul 13, 2021 at 4:15 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Huh ... gaur did this:
>
> /usr/ccs/bin/ld: Unsatisfied symbols:
> sigwait (code)
>
> which is not what I was expecting, because there is a definition for
> sigwait in /usr/include (though not in a header file we use). It must
> be in some add-on library instead of libc.
Could be part of "DCE threads" (= "draft 4"), from last time I googled
this topic when gaur blew up.
> However, wrasse did this:
>
> "/export/home/nm/farm/studio64v12_6/HEAD/pgsql.build/../pgsql/src/bin/psql/command.c", line 5062: prototype mismatch:
2args passed, 1 expected
> cc: acomp failed for /export/home/nm/farm/studio64v12_6/HEAD/pgsql.build/../pgsql/src/bin/psql/command.c
>
> which I was expecting even less. Evidently, prehistoric HPUX is not the
> only platform still using the pre-POSIX API for this function. So we
> really do need the full configure check.
Huh, that is surprising. Apparently it has "draft 6" and also final,
depending on a macro:
https://illumos.org/man/2/sigwait
https://docs.oracle.com/cd/E36784_01/html/E36872/sigwait-2.html
Here's a first swing at a configure check. Could probably be improved
a bit, as I haven't yet tried to share the check with thread_test.c (I
was going to ask if it might be entirely removable since draft 4
systems like gaur surely can't compile the rest of thread_test.c due
to other differences we know about, but now that I know that there are
also draft 6 systems out there...). Note also the errno change, which
I (ironically) did the pre-standard way by mistake.