Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.
Date: 2021-07-13 05:18:33
Message-ID: CA+hUKGJCLgEbaHMeCDetu+PwSy5v5N2x4gd_suAjNiBnPe+bXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Tue, Jul 13, 2021 at 4:15 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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: 2 args 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 Content-Type Size
0001-Add-checks-around-sigwait.patch text/x-patch 6.5 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-07-13 06:43:43 Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.
Previous Message Tom Lane 2021-07-13 04:15:48 Re: pgsql: Add PSQL_WATCH_PAGER for psql's \watch command.