Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command. - Mailing list pgsql-committers

From Thomas Munro
Subject Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.
Date
Msg-id CA+hUKGJCLgEbaHMeCDetu+PwSy5v5N2x4gd_suAjNiBnPe+bXw@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-committers
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.

Attachment

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.
Next
From: Thomas Munro
Date:
Subject: Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.