Add fallback implementation for setenv()
authorMichael Paquier
Tue, 1 Jun 2021 00:27:25 +0000 (09:27 +0900)
committerMichael Paquier
Tue, 1 Jun 2021 00:27:25 +0000 (09:27 +0900)
commite2f21ff606dae2f7f7a9e323a88c99b464d2f787
treec29f9d8101a001d6c977d3003e3cbfaa677b9830
parentfe6f63286a00a49d0f82ac73fc252a3ad40d73b4
Add fallback implementation for setenv()

This fixes the code compilation on Windows with MSVC and Kerberos, as
a missing implementation of setenv() causes a compilation failure of the
GSSAPI code.  This was only reproducible when building the code with
Kerberos, something that buildfarm animal hamerkop has fixed recently.

This issue only happens on 12 and 13, as this code has been introduced
in b0b39f7.  HEAD is already able to compile properly thanks to
7ca37fb0, and this commit is a minimal cherry-pick of it.

Thanks to Tom Lane for the discussion.

Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 12
configure
configure.in
src/include/pg_config.h.in
src/include/port.h
src/include/port/win32_port.h
src/port/setenv.c [new file with mode: 0644]
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Solution.pm