Put back pqsignal() as an exported libpq symbol.
authorTom Lane <[email protected]>
Thu, 10 Oct 2019 18:24:57 +0000 (14:24 -0400)
committerTom Lane <[email protected]>
Thu, 10 Oct 2019 18:24:57 +0000 (14:24 -0400)
commit7ed1bcaed6ecbb0760169ea193cbe70071012576
treeab52177414a227425e8153ecde31ec274d6ddd58
parentf224c7c11ea7be2751e3342e11317070ffb5622d
Put back pqsignal() as an exported libpq symbol.

This reverts commit f7ab80285.  Per discussion, we can't remove an
exported symbol without a SONAME bump, which we don't want to do.
In particular that breaks usage of current libpq.so with pre-9.3
versions of psql etc, which need libpq to export pqsignal().

As noted in that commit message, exporting the symbol from libpgport.a
won't work reliably; but actually we don't want to export src/port's
implementation anyway.  Any pre-9.3 client is going to be expecting the
definition that pqsignal() had before 9.3, which was that it didn't
set SA_RESTART for SIGALRM.  Hence, put back pqsignal() in a separate
source file in src/interfaces/libpq, and give it the old semantics.

Back-patch to v12.

Discussion: https://postgr.es/m/[email protected]
src/interfaces/libpq/Makefile
src/interfaces/libpq/exports.txt
src/interfaces/libpq/legacy-pqsignal.c [new file with mode: 0644]